Yoo Posted February 13, 2014 Posted February 13, 2014 This is not intended for advanced users, just for people that is starting to dive in the dark waters of Havok and HDT Since more people is starting to be interested in doing mods using the awesome HDT Physics Extension plugin, we are probably going to see some incompatibilities just because of collisions. Imagine this situation, "Modder X" makes a pendant with a simple hinge constraint to add some movement to it. He finishes his work, does the XML stuff and he sees that his model behaves correctly. He releases his mod and another user says "your pendant moves in a really weird way when I use it along whit a Hair/clothing/whatever HDT mod". What happened? There were incompatibilities between the mods because one mod had a rigid body at the Spine and it was touching/over the pendant rigid body. How do we solve it? Using collision filters, these filters in some way are like layers that havok use to define stuff like "The rigid bodies at layer 10 cant collide with the rigid bodies at layer 11" So, you can have a lot of rigid bodies at the same place from different mods and they will still work like if they were separated simulations. I would even suggest to create some kind of convention, like the filter number 10 is reserved to Hair Mods while 14 is reserved to Clothing and 15 is for accessories and so on... So, how do I set these groups/filter stuff? Max users. You will find it at the Rigid Body Modifier, Advanced Properties and find a check called "Collision Filter Info" check the box and set a number for the filter. Thats all, in this case, I've set the rigid body called "Box001" at layer 10. XML Editing approach. If you are using XML Editing, you will have to go to your rigid bodies containers and look for something like this: <hkobject name="#0091" class="hkpRigidBody" signature="0xd0313594"> <!-- memSizeAndFlags SERIALIZE_IGNORED --> <!-- referenceCount SERIALIZE_IGNORED --> <!-- world SERIALIZE_IGNORED --> <hkparam name="userData">0</hkparam> <hkparam name="collidable"> <hkobject> <hkparam name="shape">#0092</hkparam> <hkparam name="shapeKey">4294967295</hkparam> <!-- motion SERIALIZE_IGNORED --> <!-- parent SERIALIZE_IGNORED --> <!-- ownerOffset SERIALIZE_IGNORED --> <hkparam name="forceCollideOntoPpu">8</hkparam> <!-- shapeSizeOnSpu SERIALIZE_IGNORED --> <hkparam name="broadPhaseHandle"> <hkobject> <!-- id SERIALIZE_IGNORED --> <hkparam name="type">1</hkparam> <!-- ownerOffset SERIALIZE_IGNORED --> <hkparam name="objectQualityType">2</hkparam> <hkparam name="collisionFilterInfo">0</hkparam> </hkobject> </hkparam> <!-- boundingVolumeData SERIALIZE_IGNORED --> <hkparam name="allowedPenetrationDepth">0.100000</hkparam> <!-- collisionEntries SERIALIZE_IGNORED --> </hkobject> </hkparam> At the <hkparam name="collisionFilterInfo">0</hkparam> You change the "0" for the Filter group you want and there you are, your rigid body is at that Layer. JFF Aproach. Thanks to blabba for the info So, we've talked about filters, what they do and how to set them, but... which groups should I use? Here is a table with the different groups we can use. Looking at the "Default" layers of the "Create world modifier from Havok Content Tools" we can tell which group/layer is used for each rigid body quality and that we have 22 free groups (thats A LOT). We can also see aswell that little comment that says "ALL the rigid bodies at all Layers will collide with the rigid bodies at Layer 0". You should also know that if you dont set a collision filter for a rigid body, it will be assigned to layer 0, so it will collide with all the ridid bodies of all the HDT Mods on the character. So use the group 0 ONLY for stuff that you are REALLY sure that they wont cause problems with other mods or you are completly sure that you need it to collide with the rigid bodies of other mods. Well, that was all, I hope this horrible post helps you and... Happy Modding!
blabba Posted February 13, 2014 Posted February 13, 2014 Great tutorial, and for even more beginners there's the JFF tool as well. (you checkmark the collisions) Also, here's what the author of the JFF tool came up with in terms of creating a convention for what filters are what: -1 = Virtual (Doesn't Collide with anything) 0 = Default (Collide with everything) 1 = Body, Main Part (Torso?) 2 = Body, Breasts and Butt 3 = Body, Arms 4 = Body, Hands 5 = Body, Legs 6 = Body, Feet 7 = Body, Pussy and Asshole 8 = Body, Head 9 = Body, Tail 10 = Body, Undefined (Changed to Hair) 11 = Cloth, Undefined (Capes?) 12 = Cloth Undefined (Skirts/Lower Torso?) 13 = Cloth Undefined 14 = Cloth, Undefined 15 = Hair, Undefined 16 = Hair, Undefined 17 = Hair, Undefined 18 = Weapons, Undefined (Maces/Free Swinging?) 19 = Weapons, Undefined 20 = Reserved 21 = Reserved 22 = Reserved 23 = Reserved I'm not saying that this should be the convention, I'm just saying it's whatever HydrogensaysHDT (or whoever made the JFF tool) thinks the convention should be, and I agree with it so far. Also, anything written in parentheses and/or with a question mark at the end is my own suggestions and not what the actual tool states.
Yoo Posted February 13, 2014 Author Posted February 13, 2014 Nice, I'll try to follow that rule ^^ Meanwhile, Im gonna change XP32 Hair to layer 15, found out that he was using Layer 0 when the chains at the chest of my character started to behave like crazy xD UPDATE, Setting the Hair at Layer 15 caused me some issues, works perfectly at layer 10 (or maybe I did something wrong while I was editing the XML, it was like 3am...)
blabba Posted February 13, 2014 Posted February 13, 2014 Not sure if this was done on purpose, but... 'Collision Filters and Yoo' Pretty subliminal, not sure I can trust yoo now To not be completely off-topic, here's a pic of the JFF area for selecting the Collision Filters:
Yoo Posted February 13, 2014 Author Posted February 13, 2014 Mew... u reminded me the old Beth Forums, ppl used to make jokes like that about my username... and I gotta say the pun was intended xD Btw, hope you dont mind if I put your image on my OP, just to wrap the 3 current possibilities ^^
kyukatsuki Posted February 19, 2014 Posted February 19, 2014 Does this mean that in JFF, I should set breasts to group 2, then uncheck boxes for things I want to have them collide with?
jacques00 Posted February 28, 2014 Posted February 28, 2014 Does this mean that in JFF, I should set breasts to group 2, then uncheck boxes for things I want to have them collide with? Late response, but just to answer the question in case it wasn't already realized: Yes. c :
boo Posted July 19, 2014 Posted July 19, 2014 Has anyone defined a full body collision filter for both male and female bodies?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.