Jump to content

How do you "add physics" to an object?


fireundubh

Recommended Posts

As for the collision, for now it remains injecting "BSTriShape" using NifSkope if I understand it correctly?

 

I'm not sure what you mean.  A BSTriShape cannot be the physics for an item.  Physics takes place in the bhkNPCollisionObject block, and it needs to be a bhkPhysicsSystem or bhkRagdollSystem.  The exception to that is BSClothExtraData which is treated like NiExtraData and is always the child of the root NiNode.

 

There are a few things which can extract the data from a bhkPhysicsSystem and turn it into hkt (Havok XML),  and if you know how to edit this, there are also things which can turn it back into binary (I think).

 

The first step for me to even show collision in NifSkope is to make a new Havok binary parser.  We know how to read the vertices for the collision to display them.   I could also export the collision to OBJ,  but actually sticking valid data back into a bhkPhysicsSystem is another story.  There are some parts of the hkt we don't even know the use of.   Materials for collision faces are done differently now and would be difficult to export/import.  So at first most collisions would just be forced to all be one material.

 

So, like mentioned here the only recourse for now is to just take bhkNPCollisionObject blocks from other meshes.  Probably by the time we figure anything else out the official exporter will be fixed. 

Link to comment
Share on other sites

So you're doing exactly what I said, in reverse.  Why would you put the shape into the other file instead of the collision object into your NIF?  All the header strings would have to be edited so that the shape names and material paths are correct.   Inserting the bhkNPCollision object into your actual file, you just need to add BSXFlags to make sure collision is set for the file.

Link to comment
Share on other sites

So you're doing exactly what I said, in reverse.

Because I had problems with copying "bhkNPCollisionObject" in new or edited NIF from MAX.

 

And edit the header does not bother me. (a matter of habit)

Link to comment
Share on other sites

It now drops (yay), but it also clips into the ground, can't be grabbed from most angles, and spins when pushed.

Because collisions are from MrHandyFuel_Prewar.nif and this is more or less cylinder and collisions are less than the cardboard, for this I have no answer.

Link to comment
Share on other sites

Here is my way of doing statics -> miscellaneous NIF.

 

Open in NifSkope NIF that you want to do "miscellaneous" NIF. (for example -> "Meshes\SetDressing\PlayerHouse_Ruin\PlayerHouse_Ruin_HandyBox01.nif" now called NIF1)

 

Now find NIF which corresponds in size to NIF1 (because it will have a collision on which we depend), and his "BSXFlags" must have "194" (for example -> "Meshes\Props\MrHandyFuel.nif" now called NIF2)

I may be wrong with "194", but since that NIF what I did worked, so I base my assumptions on this, I also noticed that all the NIF that you can moved they hawe "194" in "BSXFlags" (Stimpack, Jet, Mentats, Abraxo)

MHC7uBUm.jpg

 

Copy from NIF1 "BSTriShape" in to NIF2

sGC5JQEm.jpg

yToKBAum.jpg

p5WUQTMm.jpg2

jquwA7Em.jpg

IuFsxN6m.jpg

Eg77GOKm.jpg

OoVZPq8m.jpg

T4T9Srfm.jpg

I hope that this will help you.

I'm tired, so I could mess up something.

Now I am going to celebrate the birthday of my brother's second child.

I wish you fun.

Link to comment
Share on other sites

Thanks. Changing BSXFlags to 194 and replacing the collision node seems to be working. I still can't get the Mr. Handy Box to behave like a box and stop clipping into the ground though.

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
×
×
  • Create New...