Silgrad Tower from the Ashes

Full Version: Be careful packing Havok Strips in NifSkope 0.9.8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
It can change the Havok material out from under you. Sad I've enclosed two NIFs to show before and after; compare the material in the Sub Shapes area of the member bhkPackedNiTriStripsShape of the "after" with the material of the bhkNiTriStripsShape member of the "before". I'll post this on the NifTools board as well.

Steve
I see you tried to have 2 different havok materials under one listshape/collision block. I am not certain that even works. if I'm right thats probably why when you packed it it inherited the listshapes material and changed from wood to stone.
In general, different Havok materials under a single bhkListShape are fine. For example, I do that in my lighthouse (I think) and my bar counter (included here) and arrows embed in wood and bounce off of stone or metal. What is probably happening in NifSkope is that the code is looking at the material of the list instead of the material of the block being packed.

Steve
I had some bad results back when I tried to get different havok materials to co-exist under the same branch. Since then I always put them in their own NiNode branch, i.e. group them in 3D Studio Max before export, because I know that method works. Not saying I think that's the best way to do it, just that I like sticking with methods I know work.
I've done a little experimenting and it seems that things are not as simple as I thought. Using the new CM scheme in the Max plugin, mixed materials seem to work as expected if the CM geometries are the basic ones. This is the case with the bar counter. Things do seem to get weird with tristrips (packed or unpacked). I'm going to experiment more systematically and then report the results on this thread.

One more thing: according to taxpn, if using the new scheme, collision bodies are parents to the scene or to their linked parent if and only if their parent is a bone. I'll also try to use both old and new schemes in the same model to see how that goes.

Steve
Looking forward to reading the results of your continued testing Smile
If you stick to the basic geometries, the "new" method of CM generation works fine. So if you have a lot of boxes, spheres and capsules, even if they are different materials, feel free to use the bhkRigidBody modifier and group them under a single bhkRigidBody helper. Animstatics of course would be grouped under a different helper linked to a bone.

Tristrips are a different issue. They should be grouped separately as described in this thread. Right now, the "new" method has scaling issues with any CM that follows a Tristrip in the shape. A deeper issue is that apparently normals are calculated differently in the new method, and I got really inconsistent arrow behavior until I returned to the old ways. Smile Both the old and new methods may be used on different parts of the same mesh.

One final note: Packing Tristrips destroys arrow properties; everything bounces. Please don't pack my Tristrips. Big Grin

For searches: multiple collision mesh havok 3ds max plugin

Later,
Steve
When you say "feel free to use the bhkRigidBody modifier and group them under a single bhkRigidBody helper" what do you mean, exactly? Is there a helper (Create panel > Helpers) object called bhkRigidBody, and if so, how do I get it to display in the panel? I've tried using the bhkRigidBody modifier on capsules but in my attempts the export doesn't calculate either the radius or position/sizes correctly.

Thanks for the info about arrows. I'll be sure not to pack collision for penetrable materials in the future Smile
OK, I did forget: capsules are bad under the current version. It looks simple to fix once tazpn returns from sabbatical. Smile So stick to boxes, spheres and covex shapes for now.

Here's what I do to use the new set-up to import multiple geometric CMs in Max; this assumes plugin version 0.2.16 or later.
- Under Create Helper you'll find NifTools in the drop-down. Select bhkRigidBody and click to plunk it out in the scene. That's really ally you can do at creation.
- Select that helper and move it to the origin.
- Go forth and create various model things. Big Grin If you do a box shape that will be subsequently rotated, clone it at creation. This is because the boxes generated by the plugin are bounded by the axes; so if your box is to be tilted 30 degrees, you're better off cloning the box upon generation, applying the modifiers listed below, and then tilting it. Play with it a little and you'll see what I mean. Smile
- Once the model is created, examine it to see how it can be broken down into the convex shapes listed above for collision. Then clone and detach until you have a set of objects to define your collision set. There is a "collision proxy" that is supposed to automatically clone your mesh; I haven't figured it out yet. Smile
- To each member of that set, apply Reset Xform. The usual Reset Xform warnings apply; check for flipped normals and weird distortions, particularly if mirroring has been used.
- Then apply the bhkRigidBody modifier to each member. Here the material and the bounding shape may be changed. Right now, both capsules and TriStrips are buggy; convex shapes work except for arrow interaction.
- Finally return to the helper object and under Modify, hit the Add button under the text box labeled Collision Meshes: and add all your CMs.
- One note for AnimStatic meshes: create another helper and link to your bone object. Create your AnimStatic CMs and link them to that bone. Finally add them to the helper. There are currently other issues with getting simple static anims into OB; see this thread for more.

An untested-by-me feature that may prove useful for Razorwing is the ability to clone a CM as a regular mesh. This may be useful in producing public model versions.

Later,
Steve
He might be gone for awhile seeing as Civilization can be disastrously addictive Big Grin I actually didn't like Civilization IV very much... despite the advances made to the game I couldn't help but feel like it was a graphical upgrade of Civ3, which I had already played to death. It sucked me in for a solid six months. But I digress.

Found it! *waves hand* I looked through the list before my last post but that name in the list must've fell in my blind spot because I didn't see it until just now.

For the record what does the term "origin" mean? Is it the center of Max's universe and/or the exact center of the model? (I got it to work btw so I'm just curious what the term meant.)

I've done some preliminary tests too. I was able to add fourteen boxes of different sizes and different rotations to the bhkRigidBody helper. I did clone the boxes from the first box, but I didn't use the Reset XForm modifier on them. But perhaps you meant that using Reset XForm is only necessary for tristrips? I attached a copy of the scene in case it can be of use. It turned out exactly like I wanted though, so I don't have a problem at the moment Smile

Thankyou so much for your help, this will save me oodles of time :goodjob:
Pages: 1 2