Multi-material collision

Post » Fri May 13, 2011 1:58 pm

Hi,

I am a noob in Blender and NifScope, but manage to do some simpler stuff (static objects, clutter, furniture).

Right now I have hit a snag. I need to create a multi-material collision for one of my beds. The original collision of the beds really can't do, since the shape is quite different. It's all nice and good as long as I have just one material for the collision, like the wooden parts, I just don't see a way how to make also a cloth part of the collision to work. I always end up with a collision that is either wood or cloth, but not both at the same time. :banghead:

I heard there is a way to do this in NifScope too, if you have two separate collisions exported (the wood part one and the cloth part one) and then be able to somehow put both of them in one mesh by creating another NiNode and add the collision there. I tried to do that and failed. It looks all good in NifScope and the CS - once in game the secon collision just isn't there.

Does someone know how to do this? Either in Blender or NifScope is fine, just please bear in mind that my skills with both are in their diapers. ^_^ If you know how to solve this or about a tutorial you could point me to, then I'd be very grateful to you.
User avatar
A Boy called Marilyn
 
Posts: 3391
Joined: Sat May 26, 2007 7:17 am

Post » Fri May 13, 2011 2:12 pm

I had a lot of difficulty with this as well, so I understand your pain. There's no way to do this in Blender, yet, but you can assemble them in NifSkope. Koniption is the expert here, so I'll just quote her:

what you can do, is make your differnet collision meshes for the different parts of your model that are different materials (wood, metal, organic, etc). Keep those collision meshes separate from each other - don't collapse nor connect them. Export each collision separately from your modeling program.

Then just combine them together in Nifskope where your mesh is in this tree hierarchy order: a single bhkCollisionObject comes first, single bhkRigidBody next, a bhkListShape after that (attached to the bhkrigidbody), add the number of slots to the bhkListShape to be the # of different collision meshes you have and then expand the green arrow underneath that field, add some bhkTransformShapes to fill in each of those fields that appeared next to the green arrow on ListShape, then directly connect your bhkMoppBvTreeShapes (and everything below it in each collision you exported) to a bhkTransformShape - one bhkMoppBvTreeShape to one bhkTransformShape.

The bhkTransformShape allows you to move the collision attached to it, if you need to tweak where it sits on the mesh. It has Translation, Rotation, and Scale fields you can alter.


I stole this from a thread on the Silgrad Tower forums -> http://www.silgrad.com/wbb2/thread.php?threadid=11644. It has some additional troubleshooting attached.

I got multiple collision materials to work on a tileset piece, but I had to add a NiStringExtra data stolen from a similar vanilla piece to get the nif to work properly in-game. It's been months since I've worked with these though so I can't remember the exact steps I used.
User avatar
Dan Stevens
 
Posts: 3429
Joined: Thu Jun 14, 2007 5:00 pm

Post » Fri May 13, 2011 6:20 am

Hi guys,

Whatever you do, don't alter the values of the "Scale" field in the bhkTransformShape. It should have X, Y, and Z field values set at 1.000 each, period. No more, no less.

Also, it's been a while since I did a multiple MOPP collision under a single bhkCollisionObject / etc. Please tell me if you come across a situation, where, after you set up your mult. MOPP collision in NIfskope and test it in the game, the various havok materials you use only react as if they were one material. In other words, I'd like to know if the various havok materials you used, don't react separately and individually with their own unique sounds and visual shrapnel, when hit on the various collisioned parts with a weapon.

Last time I tested a nif with such a setup, I got only one material's reaction, and I don't know why, nor can I remember if I came across this before (it's been a few years since I did some MOPPs testing for Niftools team).

Koniption
User avatar
Roberto Gaeta
 
Posts: 3451
Joined: Tue Nov 06, 2007 2:23 am

Post » Fri May 13, 2011 7:01 pm

I hope this will work. Thanks, I'll give it a try.
User avatar
Jennie Skeletons
 
Posts: 3452
Joined: Wed Jun 21, 2006 8:21 am


Return to IV - Oblivion