Jump to content

Multiple Collisions on Mesh


ElfyPers0n

Recommended Posts

I've been working on a mesh that needs to have several different collisions for different materials, so I looked at some vanilla meshes that also had multiple materials. I noticed that they tend to still only have one bhkcollisionobject, like so:

 

http://i.imgur.com/K2jT8GZ.jpg

 

The havok material shows up as stone in Nifskope, yet importing into Blender or simply shooting it in the game reveals that there are actually three collision objects, all with different materials. How does this work, and how do I do this with a custom mesh of my own?

Link to comment
Share on other sites

There are actually three materials. If you go to hkPackedNitriStripsData, on the lower screen you can see subshapes. There are three of them, for wood, glass and metal and each of those subshapes have vertices number that form that shape.

As to how to make for your custom models, that's a good question. I haven't seen a way to do it, honestly.
The way I do it is to simply make separate colliders for each material I need.

If someone knows more about this, I would really like to know.

Link to comment
Share on other sites

When creating custom meshes, I've always just created individual collision meshes and let Blender and the nif tools figure it out.

 

When creating something like a log cabin with a stone base, for example, I would just create one collision mesh for the stone base and another collision mesh for the wooden parts. The stone part would have a string property of HAV_MAT_STONE and the wood part would have a collision of HAV_MAT_WOOD.

 

Seems to work.

Link to comment
Share on other sites

Primitive collisions (box, sphere, capsule) can be created in NifSkope as well as convex shapes.

The nature of your object will require to create them in Blender, in this case.

 

It is interesting to know that a collider will relate to an object part when it encompasses it, not by the child/parent relation inside a nif.

 

Here's three video that might help you to venture into collisions with Blender.

 

http://www.nexusmods.com/oblivion/mods/19739/?

Link to comment
Share on other sites

I've been trying to get some collisions to work with exports from Blender 2.78, since I can't get 2.49b to work atm, but they don't seem to be working.

 

Here's an example.

 

Could I have some pointers as to what is wrong with this? I've been trying to compare it to other similar nifs (With triangle mesh collisions), but can't find the issue. Is it something that can be fixed, even if painstakingly, in Nifskope, or is it something that I'll just have to find a better way of exporting in order to fix?

Link to comment
Share on other sites

And yes, I know that Blender 2.78 isn't recommended for NV (Or any game for that matter; the nif scripts for it are still in alpha after all) but I've managed to get the meshes themselves working with some simple tweaks in Nifskope and I'm hoping that the same can be done with the collisions. And yes, I know that I can make the collision for that particular mesh in Nifskope instead of Blender, but I'm trying to figure it out for a more complex mesh that has a triangle mesh (hence the triangle mesh on this rather than cylinder).

Link to comment
Share on other sites

The last I heard (which was a while ago), you still had to export back to 2.49b to do the nif conversion. I have no idea if that is still accurate or not.

 

I use 2.49b just because everything works, so I don't keep up with what works and what doesn't in the newer versions.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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