Ragdoll test on stairs - Blender 2.66 RC

A quick test of viewport rigid body physics using the Feb 14 2013 Blender 2.66 release candidate. A low poly proxy ragdoll of my character is rigged with rigid body constraints; then an armature mesh is parented to the ragdoll objects using ‘child of’ constraints. This then drives the character mesh… Yup, there’s some mesh penetrating in this one that I could fix if I really wanted to waste more time on this, that’s gotta hurt :slight_smile:

blend file on my google docs:
https://docs.google.com/file/d/0B2uvwo42PkSmQ081MGdwZjJIc1k/edit?usp=sharing

Not bad. There are a few places of ‘impossible’ intersection, but overall, pretty darned good.

Was this done in slow motion, or is that a side effect of the rag doll physics engine?

Yeah it does seem a bit slow motion, that’s the new bullet physics in the viewport physics engine, the developers might still have some tweaks to do on it, there’s probably a few settings somewhere that I’ve missed as well. As for the intersections, that’s due to the way I parented the armature to the ragdoll rig, the idea is to parent the IK targets of the bones to the ragdoll objects so that I can walk the character to the top of the stairs, and at that point ease in to the parenting using the influence slider, so at that point the armature is driven by the ragdoll physics.

Sounds pretty cool. Thanks for the extra info.

An updated version with better constraints on the limbs, with less damping on the translation motion of the ragdoll objects, and more realistic mass assignments than the default ‘1 kg’

plus a little surprise at the end :slight_smile:

Hey! Really nice to play! Thank you foe sharing!!!

Ouch! :slight_smile:

So, what did you do to speed it up? I’ve never played with this stuff, so I’m clueless.

Originally I had the masses of all the ragdoll parts (torso…legs…arms… head) at 1 kg, the default it gives the mass when you enable the rigid body physics. I set those to ‘reasonable’ values, 80 kg for the torso, 35,20,5 for the upper arm, lower arm, hand… same with the legs. I also set the damping low for translation and rotation for all the objects. I originally had it set high to see what it would do… makes things look like they’re moving through molasses :wink: The key thing is to create a set of low poly objects that kind of match the character mesh, then set rigid body constrains between all the parts of the ragdoll, so that the physics solver can move them as they should.

The ragdoll can be posed, and if every object is set to ‘start deactivated’ then it’ll hold the pose until it gets hit by another physics object (such as a giant monkey head…) You can also animate the armature while it’s ‘waiting’, or even during the physics as well, because the armature is parented to the ragdoll objects. So you can have lead- in animation and lead-out animation on top of the physics simulation, and the best thing about the new rigid body integration is that it’s all realtime in the viewport, so no messing around with the game engine anymore :wink:

another demo showing animation on the character armature leading into the physics simulation. Animating on the armature can be edited for the whole time segment, even while the physics simulation is active, enabling lead in, reaction, and lead out animation to overlay the physics simulation.

That’s really exciting. I’m definitely going to look into this when I get caught up.

Hey that could be after a few too many Rum & Cokes :slight_smile: I remember seeing someone mention ragdolls and I had no idea what they were. I’ll have to check out that blend file you posted.

https://docs.google.com/file/d/0B2uvwo42PkSmQzFvY3BmWGRGcjg/edit?usp=sharing Here’s a new blend file with the updated ragdoll rig with proper mass and damping settings.

A new test with a walk cycle (around a corner, no less :wink: ) which is then driven by the ragdoll rig after frame 80:

and a different version, with bananan peels:

I like the twitching. :slight_smile:

NIce results!
Actually I’m kinda impressed this is working at all :wink:
Hopefully we can improve such setups in the future, one thing I definitely want to do is add a ragdoll constraint (like a ball-socket joint with limits).
I imagine the biggest problem is managing the two rigs, the animation rig and the rigid body setup, and switching between them. That’s a tricky one to solve (would be simpler if bones were individual objecs), we’ll have to think of something…

A script or tool to align the ragdoll objects to specific bones in the armature would be handy: line up the objects and hit a “store offsets” button, and it would store the xyz offsets of the ragdoll objects without actually parenting them… then click “restore offsets” and the objects all snap into place where the armature is currently posed… right now it’s a bit of a manual process to align the ragdoll to the armature / character at the frame you want the physics to take over.

[edit]: A quick test and I was able to parent the ragdoll objects to a second armature and then copy and paste a pose:




and the physics on the ragdoll worked fine, even with the objects being parented to armature bones. Now the reason you wouldn’t want to parent the objects to the original armature is becuause IT is going to be driven by the ragdoll objects (using ChildOf bone constraints…) which would cause a circular reference… Not sure what Blender would do in that situtation… might be funny to find out…