Jump to content

Changing/editing object collision boxes


gigi86

Recommended Posts

I downloaded a mod for metal railings and used them to build a nice big wall around Sanctuary with towers and everything. Then I placed guards in the towers right near the railings and spawned some supermutants to test the defenses but lo and behold! My guards were shooting mostly in the edge of the railings. So I opened the railing model in NifSkope and painstakingly made the thing shorter, vertice by vertice (I have nearly zero experience in modeling so this seemed the best option). Then I went into the construction kit to take a look at the railing object, pressed F4 to see the red collision meshes and found out that the smooth straight metal railing is using the same collision mesh as the uneven and taller plywood vanilla railing called workshop_ShackBalconyRailing04 in the editor.

 

http://i1108.photobucket.com/albums/h414/imgen-blog/metal%20railing_zpstafwux4k.png http://i1108.photobucket.com/albums/h414/imgen-blog/plywood%20railing_zpspuqyer4r.png http://i1108.photobucket.com/albums/h414/imgen-blog/metal%20railing%20short_zps4pcef2pz.png

 

Now I looked everywhere but I can't seem to find where I could even change this collision box with a different one. Ideally I would like to edit the vertices of the collision box to make it a really simple 6 sided thin box. All I could tell so far is that the collision box is assigned in the mesh of the object it's self but couldn't find where in NifSkope.

 

So does anyone here know how to do this? Can I at least change the bounding box with another one? Would I be able to edit it with NifSkope? If not I would try to do it in Blender but exporting objects from NifSkope to Blender and then back seems like a real pain. Another more simple option would be to lower the collision box like the author of the mod did but that's just as big a mystery.

Edited by gigi86
Link to comment
Share on other sites

There is no way to edit or resize the vanilla collision with Nifskope. The best you can do is delete the original collision from the nif and replace it with smaller pieces taken from other nifs, and add lots of these smaller pieces to more-or-less make the shape that you want. The only modder I know that has made custom collision boxes for FO4 models is Ethreon, you could ask him about which tools he used.

Link to comment
Share on other sites

I believe you can now make new collision with Autodesk 3DMax 2013 (maybe a new version too, but I don't recall exactly).

...though it is not easy.

 

If you can find and grab a preexisting object with suitable collision, that can be quite a bit easier (at least it was for me).

...probably why the object in question has 'close enough' collision now.

Link to comment
Share on other sites

Ok, so I'm probably not gonna be able to edit the collision mesh or make a new one. It would also work if I could just lower the existing one by 8 points in NifSkope. It should be possible because the author of this mod clearly aligned the edge of the railing to that of the collision mesh. But where do I find it in NifSkope?

 

EDIT:

 

In the case of this railing model I found a node called bhkNPCCollisionObject and messed around a bit with it's subnodes trying to lower them by 8 points but nothing happened in the editor. I think I messed around with every coordinates I could find to no effect. Any tips where I could find the coordinates of this collision mesh in the nif?

Edited by gigi86
Link to comment
Share on other sites

If I need to move the collision box, I add a new NiNode under the root node, and then I attach the collision (bhkNPCCollisionObject tree) to this new NiNode instead of it being attached below the mesh node (BSTriShape or whatever). Then I can simply translate this new NiNode to make the collision box move independently of all the other stuff. I usually go to-and-fro from Nifskope to CK to visually see where the mesh is (using the F4 key as you did). It's a bit painstaking but it gets the job done.

Edited by steve40
Link to comment
Share on other sites

If I need to move the collision box, I add a new NiNode under the root node, and then I attach the collision (bhkNPCCollisionObject tree) to this new NiNode instead of it being attached below the mesh node (BSTriShape or whatever). Then I can simply translate this new NiNode to make the collision box move independently of all the other stuff. I usually go to-and-fro from Nifskope to CK to visually see where the mesh is (using the F4 key as you did). It's a bit painstaking but it gets the job done.

 

Could you please describe your process? I sort of managed to get the bhkNPCCollisionObject tree under a NiNode that was under the root one but the process was a mess and the CK crashed instantly when I loaded the new model. First I added a new NiNode under the root, gave it a name (is the name important?) but then there was no way to move the bhkNPCCollisionObject tree under it except to copy and paste it but then it would paste as a new node on the same level as the root. I started from scratch, right clicked on the bhkNPCCollisionObject tree, attached a parent Ni-Node to it and what it did was create new NiNode at the bottom of the list (thought it was subordinate to root) with a new copy of the bhkNPCCollisionObject tree under it. Again I removed the original bhkNPCCollisionObject tree and again I got the glorious crash. This is what the model tree looks like initially. I also tried transforming the NiNode under bhkNPCCollisionObject but it moves the whole object.

 

Ni_Node.png

Link to comment
Share on other sites

 

Thank you, that one did the trick! Now I can have my guards effectively shoot beyond the railings and miss fair and square :laugh:, This was bugging me for a long time, thanks everyone.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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