Jump to content

3ds Max: How to do proper collisions (Static)


Site Bot

Recommended Posts

Article link: 3ds Max: How to do proper collisions (Static)

 

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

 

Image 1:

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

http://theduckcompany.biz/mods/PartOne.jpg

 

Image 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.

http://theduckcompany.biz/mods/PartTwo.jpg

 

Image 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.

http://theduckcompany.biz/mods/PartThree.jpg

 

Image 4:

Now select the bhkCollProxy, set it to Packed Strips Shape.

Add it somewhere next to the model.

http://theduckcompany.biz/mods/PartFour.jpg

 

Image 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).

http://theduckcompany.biz/mods/PartFive.jpg

 

Image 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.

http://theduckcompany.biz/mods/PartSix.jpg

 

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

http://theduckcompany.biz/mods/PartSeven.jpg

 

Image 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.

http://theduckcompany.biz/mods/PartEight.jpg

 

Image 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.

http://theduckcompany.biz/mods/PartNine.jpg

 

Image 10:

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

and into the head01 NIF.

http://theduckcompany.biz/mods/PartTen.jpg

 

Image 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.

http://theduckcompany.biz/mods/PartEleven.jpg

 

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.

Link to comment
Share on other sites

FYI - To increase performance, you could create an extremely low-poly version of the object...just enough verticies to cover the basic shape rather than trying to make it match perfectly. You could reduce the amount of verts it would be based on from 1,000 down to 30 ro 40 pretty easy. Once you create the collision model from the low-poly version, simply delete the low-poly object since it is just a temporary object.

 

LHammonds

Link to comment
Share on other sites

  • 2 weeks later...

you do not need to use the rigidbody helper for statics. Just export an object with a bhkrigidbodymodifier on it, and it'll export as a static as default.

 

all the post export nif hacking you did is really not the best way to go about creating custom content for F3. It is entirely a waste of time, and a good place to introduce error. You can use the nifs that max outputs in game- asuming you have the scene correctly setup for export. just change the shader setup on all the mesh objects and the nif will work as a static out of the box. max outputs them with the shader setup for a skinned mesh, which doesn't work on everything else that is not an actor- as they are the only things hardcoded to cast shadows...

 

Also the collproxy seems to center the collision object on where you position it, Not where the mesh is located. you would do well to align both collproxy and the rigidbody helper to the collision meshes center pivot. or else your collision mesh will be likely be misaligned.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...