3ds Max how to do proper collisions

From Nexus Mods Wiki
Jump to: navigation, search

How to do proper collisions for custom static models in Fallout 3

Step 1

First of all, you need a model. I've used the teapot Primitive in 3ds max for this example.

Step 2

When you've got your model and have added materials, unwrapped it etc. I don't bother in this tutorial :-). Then you go into Create -> Helpers NifTools.

Step 3

Select the bhkRigidBody and add it somewhere next to the model. Note: Default the Mass is set to 0. Don't touch this! You can experiment with the layer part if it's supposed to be static or animated object etc. I've not experimented to much with that part, but had weird results using other mass than 0.

Step 4

Now select the bhkCollProxy, set it to Packed Strips Shape. Add it somewhere next to the model.

Step 5

Now we will modify it. Go to the modify-part of 3ds max and select the bhkCollProxy you just added. Double-check that Packed Strips Shape are selected. Now click on add and add the model(s) you wish to use. You can also change material type in "Material". Like stone, wood, metal, flesh etc.

Note: This is made so you can have multiple bhkCollProxy with different materials, but I only use one in this tutorial (I'm lazy).

Now you can actual see the havok on the model (this is the thing I first saw when messing around in 3ds max).

Step 6

Now select the bhkRigidBody in the Modify part of 3ds max. Click add and then select the bhkCollProxy. DO NOT, I repeat DO NOT select the model. It won't work in NifSkope then. If accidentaly added the model, just remove it from the Collision Meshes list.

Here you can also choose what material it should use. But in this tutorial it doesent matter.

Step 7

Now we're ready to export it. Just have it look like this image and you'll be fine.

Step 8

This is just an overview of what stuff from the NIF-skope file you want.

hkPackedNiTriStripData: The one you'll be using in this tutorial.
bhkPackedNiTriStripsShape: Not be using in this tutorial.
bhkRigidBodyT: Usefull, but we won't be using it in this tutorial.
NiTriStripsData (From the model we just exported): Figures, as you've probably done a few times before.

Step 9

From the model you exported, copy/paste over into the head01 (found in statues, the first and best NIF-file from my archive I could find). As you've probably done many times before, you get this result. And it really don't work so good in games.

Step 10

Now the fun part begins. Copy and paste over hkPackedNiTriStripsData from the model you exported and into the head01 NIF.

Step 11

As you can see, the model and havok is not matching. The shape is correct, so we just move it. It never goes to much over or under for some reason. Also, if some bigger models like interiors, spaceships etc. Then scale down the model from 1.0 to 0.9900. But not when doing small static objects.

Authors notes: When modelling, always use something from ingame as a scale. Cos you can't scale the havok (You can, but it takes like 2 weeks).

This worked for me and I hope it work for you. I stumbled over this when messing around with 3ds max.