Mocap Chap
Mocap Chap
In the previous tutorials we've turned a character rig into a full ragdoll, driven by your animation.
This time we'll look at applying physics to only parts of a character, like the upper body of this mocap clip found in Maya's default Content Browser.
Version 1.1 - Up to date
Written for Ragdoll 2021.12.10 and above.
Estimated Time
- 🕐 10 minutes
You will learn
- ✔️ How to apply physics to mocap
- ✔️ How to simulate only part of a character
Where to find help
If you find or run into any issues with these tutorials, here's what you can do.
- ✔️ Ask in the chat
- ✔️ Ask on the forums
Overview
When and why would you even want simulation on parts of a character?
- Tails
- Props
- Muscles
Are three simple and somewhat obvious examples, more complex examples include what we're about to do in this tutorial. Namely, edit the mass of an object picked up during the original motion capture.
Setup
Let's start by importing our motion capture clip; this can be any clip but if you'd like to follow along here's what you do.
- Windows -> General Editors -> Content Browser
- Drag and drop Smash.fbx
Unrecognized file type?
Make sure the fbxmaya.mll plug-in is loaded via the Maya Plug-in Manager.
Here's what this clip looks like.
Symmetry (optional)
In order for Ragdoll to recognise symmetry later when we edit the shapes using the Manipulator, we'll need to assign markers in a symmetrical pose.
- Rewind to frame 0
- Select the root
- Set Translate XandTranslate Zto 0
- Run Select -> Select Hierarchy
- Right-click and hold
- Run Assume Preferred Angle
- Set a keyframe on everything
Assign Markers
In this case, I'm ignoring fingers along with the center joint in each limb, like the lower arms and upper legs.
From here, we can move our simulation to frame to 1. We don't need frame 0 anymore.
Animated Legs
In this tutorial, we're only going to worry about the upper body, so let's turn those legs into 100% animation via the Animated behaviour.
Tuning
The stage is set, it's time to tune!
Shapes
Nothing special here, and since we have no geometry to fill we have some creative freedom in how we want our character to look!
Let's have a look at where defaults values gets us.
Not bad! But since we want our simulation to be close to the original mocap, we'll need to make some changes.
Stiffness and Substeps
The default solver substeps and iterations get you to a Stiffness of about 10. In order to achieve a higher stiffness, we'll need more of those.
- Select rSolver
- Set Substeps = 8
- Set Iterations = 8
- Select Hips_rGroup
- Set Rotate Stiffness = 40
- Set Rotate Damping = 0.25
Box
Let's get the box in on the action.
Attach Hands to Box
He does a good job holding onto that box through friction between hand and box alone, but let's help him out by "glueing" the two together using a Distance Constraint
- Select the box
- Shift select the left hand
- Run Ragdoll -> Constrain -> Distance
- Repeat the process for the right hand
The default distance will be From Start, meaning it will try and keep whatever the distance was between the box and the hands at the start of the simulation.
What we want however is for the Maximum distance to be 0, and for it to only start having an effect once the hands overlap the box.
Now let's edit the point at which the hand and box snap together.
- Select one of the constraints
- Edit the Parent Offset
Since we selected the box first, it is considered the "parent".
Animate On and Off
Next, let's activate this constraint once hands are in place.
- Go to frame 80
- Set a keyframe on both constraints Stiffness = 0
- Go to frame 81
- Key Stiffness = 0.5
Likewise, we'll want the hands to release the box at some point later.
- Go to frame 178
- Key Stiffness = 0.5
- Go to frame 179
- Key Stiffness = 0
Finalise
And that's it! We've now massaged our original motion capture into carrying a box of similar weight to the motion.
Let's make some changes and see what happens.
More Mass
What if the box was heavier?
- Select the box
- Select the rMarker_pCube1in the Channel Box
- Press Ton your keyboard
- Set Mass = 10
Mass and Cache
When tuning single values like this, it can be helpful to leave the Maya timeline in place and let the simulation update independently.
Next Steps
At this point, you're able to turn any old motion capture hierarchy into a partial or fully-fledged ragdoll. Why not try a few more from the Content Browser? Or download any of the hundreds of freely available clips from here.