View Full Version : Bullet Physics : Kinematic / Deforming Item interaction

07-08-2017, 11:25 AM
Ok, I have a scene which has two objects controlled by Bullet:
1) Is a collision hull, set as a kinematic object, driven by the bones of the character.
2) Is a deforming object (hair guides), with all the finicky values set where I want them.

Now, as the bone that controls #2 swings the hair around, It interacts with #1 as expected; the hair guides deform around the collision hull.
However, the inverse is NOT true; when #2 is rotated, #1 is NOT pushed/deformed, like one expects it to be.

Any suggestions? I can bastardize the content for posting if needed, but it will take a while...

07-08-2017, 04:17 PM
That's correct.

It's been awhile since I did this but here's what I recall: to make a bones deforming object have collision with another deforming object, you need to .mdd the mesh being deformed by bones first and then set it to be deforming object rather than a kinematic object.

For character interaction with hair, I normally suggest against this approach because it becomes significantly slower to calculate (to slow for me anyway, and also too slow for the studios I've worked at.) This is why parenting proxy collision of objects and using Kinematic mode is usually recommended for collision. With proxies, the calculations can take a few seconds or minutes compared to hours using all deforming objects with high-res geometry.

It seemed like there was a trick using one of DP tools that 'pre-scanned' your mesh when you added or opened your scene, and this allowed the object work as a deforming object with collision. This worked but the downside was that it took awhile to open your scene because of the 'pre-scanning' process, and I preferred to just have the .mdd applied and forget about it. If you're curious, I can check my notes about that method.

One more thing to consider: If you use a sub-d object for collision, Bullet will use the base state rather than the sub-d version. If you need the sub-d version for collision, you'll need to use a higher res version of the object. Depending on how you modeled the base mesh, it might not be necessary though. (It's one of the reasons I avoid making my meshes too minimalist as far as polygon counts go these days.)

I hope this info is accurate. I writing mostly from memory and it's been awhile since I last dealt with this stuff. I'll write more if I think of anything else.