Skip to content

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 this tutorials, here's what you can do.


Overview

When and why would you even want simulation on parts of a character?

  1. Tails
  2. Props
  3. 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.

  1. Windows -> General Editors -> Content Browser
  2. 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.

  1. Rewind to frame 0
  2. Select the root
  3. Set Translate X and Translate Z to 0
  4. Run Select -> Select Hierarchy
  5. Right-click and hold
  6. Run Assume Preferred Angle
  7. 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.


Kinematic 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 Kinematic 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.

  1. Select rSolver
  2. Set Substeps = 8
  3. Set Iterations = 8
  4. Select Hips_rGroup
  5. Set Pose Stiffness = 40
  6. Set Pose 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

  1. Select the box
  2. Shift select the left hand
  3. Run Ragdoll -> Constrain -> Distance
  4. 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.

  1. Select one of the constraint
  2. 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.

  1. Go to frame 80
  2. Set a keyframe on both constraints Stiffness = 0
  3. Go to frame 81
  4. Key Stiffness = 0.5

Likewise, we'll want the hands to release the box at some point later.

  1. Go to frame 178
  2. Key Stiffness = 0.5
  3. Go to frame 179
  4. 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?

  1. Select the box
  2. Select the rMarker_pCube1 in the Channel Box
  3. Press T on your keyboard
  4. 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.


Last update: 2022-04-04