Weighted bodies, following joints in gLTF? #804
-
Hi, I succeeded to make everything rolling using the ragdoll. Now, I would like to go one step further. It implies to modify the attached Shape step by step to have vertices perfectly in place. Right now, once the shape is set up and attached to a ragdoll part, it cannot be changed at the vertex level to apply the differing weights (maybe I am wrong). The position/rotation applies to the whole object using Strategies I can see here:
Maybe there is something I missed, but I am targeting a realism as high as I can in this game sequence; Pre-baking is an option ( I could make it a quick time event sequence for a best looking result). Is it guaranteed that at least options {2-3} are a viable approach ? Did I miss a simpler approach that's already there ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
What you're describing is not a rigid body simulation. In a rigid body simulation, the body itself remains constant in shape. You can switch to a soft body and animate the velocities of the vertices to reach the desired skinned position in the next physics step: each vertex gets velocity = (next_skinned_position - current_simulated_position) / time_step_delta_time every frame. That would ensure it can push dynamic objects away. A simple example is here: SoftBodyKinematicTest. I have to say, to do it this way would be pretty unconventional and CPU intensive. Usually we accept that there is some discrepancy between the skinned mesh and the physics sim so we model body parts as simple (tapered) capsules attached to joints. |
Beta Was this translation helpful? Give feedback.
No soft vs soft is not implemented, but if your 'ragdoll' is keyframed then it won't collide with another keyframed ragdoll anyway, it will only collide with dynamic bodies (which keyframed soft bodies will also collide with).