On this page |
The ragdoll tool in the animate state allows you to add a ragdoll simulation to your animation. To enter the ragdoll tool, click on the top toolbar, or select Ragdoll from the radial menu (press C over the viewport).
Setup ¶
Before using the ragdoll tool in the animate state, the following steps must be performed:
-
Update the character’s skeleton with a set of joint limits.
-
Create ragdoll collision shapes for the character.
-
Add the collision shapes to the character.
-
Map the controls on the character’s rig to points on the character’s skeleton.
-
Set the ragdoll configurations used by the animate state.
-
Add the character to the animation scene.
See ragdoll simulations for more information on setting joint limits and creating collision shapes.
Setup for Electra ¶
The Electra test geometry has a Configure Ragdoll option that performs all the above setup steps automatically:
-
On the Electra SOP, set Output to APEX Scene.
-
Turn on Configure Ragdoll.
-
Specify a name for the ragdoll in the Ragdoll Character Name parameter. This is the name of the ragdoll that will appear in the selection sets HUD in the animate state.
-
Click
Animate on the left toolbar. This automatically connects the Electra SOP to an
APEX Scene Animate SOP, and enters the animate state.
-
Click
on the top toolbar to enter the ragdoll tool.
Setup for a general character ¶
The APEX Configure Ragdoll recipe puts down all the nodes that are required to set up ragdoll for a character. You can then manually tweak the configurations for your specific character.
Note
The character that is input to the recipe must be in a packed character folder structure.
In this example, we set up ragdoll for Electra using the APEX Configure Ragdoll recipe:
-
Put down an Electra SOP in the network view.
-
On the Electra SOP, set Output to APEX Character.
-
In the network view TAB menu, search for “APEX Configure Ragdoll”. This recipe puts down a set of nodes that sets up a character for the ragdoll tool.
-
Connect the 1st output of the Electra SOP to the
Null SOP at the top of the set of nodes.
The network below shows the animate state ragdoll workflow. The APEX Configure Ragdoll recipe names and lays out the nodes differently, but the workflow is the same:

-
Set joint limits on the Electra skeleton:
-
The
Unpack Folder SOP,
skeleton
, extracts the skeleton from Electra. -
The
Configure Joint Limits SOP sets joint limits on the Electra skeleton. See set joint limits for more information.
-
-
Create ragdoll collision shapes:
-
The
Unpack Folder SOP,
skin
, extracts the skin geometry from Electra. -
The
Ragdoll Collision Shapes SOP creates collision shapes for Electra. See create collision shapes for more information.
Note
In the SOP workflow for ragdoll simulations, the
Rig Stash Pose SOP creates the rest pose for the character by storing the
rest_transform
attribute that is used later by the ragdoll solver. In contrast, the ragdoll solver in the animate state reads the rest transform from the rest skeleton,Base.skel
. However, a warning is still displayed on the Configure Joint Limits and Ragdoll Collision Shapes SOPs stating that no rest transform is configured, but this warning can be ignored. -
-
The
Pack Folder SOP adds the updated skeleton (with joint limits) and ragdoll collision shapes (the two inputs on its multi-input) to the set of character files. On the Pack Folder SOP, the Name and Type parameters for the two inputs are set to the following values:
-
1st input, updated skeleton: Same name as the skeleton extracted from the character in the
skeleton
Unpack Folder SOP, for example, Name =Base
, Type =skel
. -
2nd input, ragdoll shapes: The Name and Type parameters for the ragdoll shapes can be set to anything.
See assembling character data for more information about naming character elements in the packed character folder structure.
-
-
The
APEX Map Character SOP maps Electra’s rig controls to skeleton joints. This is so that the ragdoll motion can be baked back onto the rig controls.
-
If the Map By Name parameter is turned on, an automatic mapping is performed between controls and joints that have the same name.
-
To manually map the controls and joints, enter the Map Character viewer state - select the APEX Map Character SOP, turn on its display flag, and click
Show Handle on the left toolbar or press Enter over the viewport. In the viewer state, click between the controls and skeleton joints. Entries in the Mappings multiparm will be automatically created:
Map character rig controls to skeleton joints
-
-
The
APEX Configure Character SOP configures ragdoll properties on the character. The Character Name is the name of the ragdoll that will appear in the selection sets HUD in the animate state.
-
The
APEX Scene Add Character SOP adds the character files to an animation scene. The Character Name is the name of the character that will appear in the selection sets HUD in the animate state.
-
Enter the animate state - select the
APEX Scene Animate SOP, turn on its display flag, and click
Animate on the left toolbar or press Enter over the viewport.
-
Enter the ragdoll tool by clicking
on the top toolbar. In the selection sets HUD, under All Controls, there will be sets for the Electra character and Electra ragdoll.
Note
The Electra ragdoll only appears in the selection sets if you are in the ragdoll tool.
-
Play the animation by pressing
Play on the playbar. The ragdoll will fall on the ground plane, which is the default behavior for a ragdoll.
Tip
If the ragdoll does not fall on the ground plane, check the MotionClip that is input to the
Configure Joint Limits SOP. For Electra, you can use the
motionclip_limits
Stash SOP within the Electra HDA as the MotionClip input to the Configure Joint Limits SOP.
Working with props ¶
To get a prop to work with ragdoll, you need to turn the prop into a “character”. In this example, we add a thin box platform to the scene for Electra to stand on:

-
Set up
Electra for ragdoll:
-
Set Output to APEX Scene.
-
Turn on Configure Ragdoll.
-
Specify a name for the ragdoll in Ragdoll Character Name.
-
-
The
APEX Scene Add Prop SOP turns the prop into a character and adds it to the scene.
-
The Prop Name parameter specifies the name of the prop character that will appear in the selection sets HUD. The ragdoll collision shapes for the prop will appear in the selection sets HUD as
<prop_name>_ragdoll
. -
Turn on Ragdoll, which creates a collision shape for the box. Turn off Active so that the box is not affected by gravity.
-
In the rig tree view, we can see that the APEX Scene Add Prop SOP creates a box character (.char) that contains a skeleton, rig, skin, and ragdoll collision shape.
-
-
Enter the ragdoll tool in the animate state and play the simulation:
Starting ragdoll simulation -
In the selection sets HUD, under All Controls, there are sets for the Electra character, the Electra ragdoll, the box prop, and the box ragdoll. Turn on the display of the Electra character (
) and Electra’s controls (
).
-
Use the control handles to pose the Electra character on top of the box. The Electra ragdoll automatically updates to match Electra’s pose.
-
Increase the stiffness of Electra’s joints:
-
In the selection sets HUD, select the Electra ragdoll. This selects all of Electra’s collision shapes.
-
Press G to bring up the parameters HUD.
-
In the Ragdoll ▸ Animation tab, increase the Stiffness.
-
-
Make the box slippery:
-
Select the box collision shape.
-
In the parameters HUD, Ragdoll ▸ Physical tab, decrease the Friction.
Electra on the prop -
Tethering objects together ¶
In this example, we tether Electra’s hand to a box.
-
Use the same network as the previous example to add a box prop to the animation scene.
-
Enter the ragdoll tool in the animate state.
-
In the selection sets HUD, under All Controls, there are sets for the Electra character, the Electra ragdoll, the box prop, and the box ragdoll. Turn off the display of the Electra and box prop characters (
), and turn on the display of the ragdolls (
) and controls (
).
-
Move the box using its control handle.
-
Play the simulation. The box is not affected by gravity because it was set to inactive in the
APEX Scene Add Prop SOP:
Ragdoll simulation without tethers -
Tether Electra’s hand to the box:
-
Select Electra’s hand control or collision shape.
-
Hold ⇧ Shift and select the box control or collision shape. The order of selecting Electra’s hand and box doesn’t matter.
-
Press H over the viewport.
Electra’s hand tethered to the box Note
If the tether doesn’t show up when you play the simulation, turn off Hide Controls During Playback in the handle parameters window.
-
To... | Do this |
---|---|
Create a tether within a frame range |
This sets keyframes on the Enable parameter (parameters HUD, Ragdoll ▸ Tethers tab) and creates a bookmark at the frame range. To change the active frame range of an existing tether:
|
Remove a tether |
Select the tether and press ⌃ Ctrl + H over the viewport. |
Tether settings ¶
Parameters for tethers are available in the parameters HUD, Ragdoll ▸ Tethers tab. Select the tether to adjust its parameter values. See ragdoll::Solve for the parameters that can be animated.
Option |
Description |
---|---|
Enable |
When turned on, enables the tether. |
Lock |
When turned on, locks the length and position of the tether so that it doesn’t change. Similar to having a very high stiffness. |
Stiffness |
The strength of the force that tries to keep the original tether length and position. This option is available when Lock is turned off. |
Damping |
The damping that is applied to the motion. A value of 0 specifies no damping, and a value of 1 provides just enough damping to prevent oscillation. Values between 0 and 1 allow oscillation (with some damping), and values greater than 1 provide increasingly damped motion that with no oscillation. This option is available when Lock is turned off. |
Rest Length |
The distance to enforce between the two objects. A rest length of 1 means the tether tries to keep the two objects the original distance away from each other. With a rest length of 0.5, the tether tries to keep the two objects half the original distance away from each other. The strength of the force used to maintain the rest length depends on the Stiffness. This option is available when Lock is turned off. |
Recompute Initial Conditions |
Recomputes the offset, rotation, and rest length of the tethered object. This can be used to avoid unexpected behavior after repositioning the tethered objects. |
Disable Collisions |
When turned on, the tethered objects do not collide - when they're brought close enough, they could go through each other. |
Override Rotation Stiffness |
When turned on, allows you to specify a different stiffness for the rotation (in Rotation Stiffness). This option is available when Lock is turned off. |
Rotation Stiffness |
When Override Rotation Stiffness is turned on, this is the rotation stiffness to use. |
Adding ragdoll to existing animation ¶
In this example, the top character has existing animation, and we add a ragdoll simulation on top of the animation:
Create the ragdoll motion ¶
-
Set up the top character for the ragdoll simulation.
-
Enter the ragdoll tool in the animate state. You will see the character’s collision shapes. If you play the animation, the ragdoll will fall on the ground plane, which is the default behavior for the ragdoll.
Starting ragdoll behavior -
To get a better view of the ragdoll, move the ragdoll to the side of the original animation:
-
Press ⌃ Ctrl + G to bring up the settings HUD.
-
In the Ragdoll ▸ Actions tab, turn on Show Visualizer Offset Handle.
-
Use the handle to move the ragdoll.
Visualize ragdoll -
-
Set the spine joints to follow the animation, while the rest of the character is simulated as ragdoll:
-
Select the collision shapes along the spine and press G to bring up the parameters HUD.
-
In the Ragdoll ▸ Animation tab, turn off Active. The selected collision shapes will not be affected by the ragdoll solver.
-
Alt click the Active checkbox to set keyframes at the current frame for each of the selected collision shapes. Channels for the selected collision shapes will appear in the channel list appended with
_active
.
Partial ragdoll -
-
Specify that the ragdoll simulation takes over for the entire character at the end of the throw:
-
On the playbar timeline, go to the frame where you want the ragdoll simulation to take over.
-
Turn on Active.
-
Alt click the Active checkbox to set keyframes at the current frame for each of the selected collision shapes.
Switch to full ragdoll at the end of the throw -
Put the ragdoll motion back onto the animation ¶
To put the ragdoll motion back onto the top Electra:
-
Select all the controls on the top Electra (select the top Electra from the selection sets HUD).
-
Press ⌃ Ctrl + G to bring up the settings HUD and go to the Bake tab. See baking settings for descriptions of the available options.
If you turn on Bake to New Layer, the new keyframes for the ragdoll motion are added to a new animation layer that is set to be an override layer (the new layer overrides the base animation).
-
Go to the frame on the timeline to start putting the ragdoll motion back onto the animation.
-
Click Start Recording Poses.
-
Scrub the timeline to the end of the ragdoll motion.
-
Click Stop Recording Poses. The ragdoll motion is added to a new animation layer as an override layer.
-
To apply the ragdoll motion only after the throw, set weights on the new layer:
-
Select the range of frames after the throw by holding ⇧ Shift and dragging along the timeline.
-
click the override layer and select Set Weight from Playbar Selection. Keyframes are added on the layer weight at the beginning and end of the frame range.
Final animation -
You can put the ragdoll motion back onto the original animation in the following ways:
-
Turn on Bake to New Layer and only bake keys within the frame range of the ragdoll motion. On the animation layer that is created, set weights on the new layer. This is the same as the previous example.
-
Turn on Bake to New Layer and bake keys over the entire frame range of the animation and ragdoll motion. The entire frame range will be written out to a new layer as an override layer.
-
Turn off Bake to New Layer and only bake keys within the frame range of the ragdoll motion. The ragdoll motion will replace the original animation within this frame range.
Ragdoll posing ¶
In ragdoll pose mode, you can manipulate the character’s controls to pose the character while the ragdoll simulation runs in the background.
-
We use the same network as a previous example to add a box prop to the animation scene.
-
Enter the ragdoll tool in the animate state.
-
From within the ragdoll tool, enter ragdoll pose mode by pressing O or selecting Ragdoll Posing from the radial menu (press C over the viewport).
-
Pose Electra and play the animation:
Ragdoll pose starting scene -
In the selection sets HUD, under All Controls, there are sets for the Electra character, the Electra ragdoll, the box prop, and the box ragdoll. In ragdoll pose mode, we manipulate the Electra character’s controls along with the Electra and box ragdoll collision shapes. So in the selection sets HUD:
-
Turn on the display of the Electra character’s controls (
).
-
Turn on the display of the Electra and box ragdoll collision shapes (
).
-
Turn off the display of the Electra character and box geometries (
). This makes it easier to see the ragdoll collision shapes.
-
-
To see the collision shapes that are active, in the settings HUD, Ragdoll Pose Settings ▸ Actions tab, set Display Mode to Collision Shapes. The shapes that are light gray are active, and the dark shapes are inactive. An inactive shape does not react to other objects. In the below image, only the head is active:
Active and inactive shapes in ragdoll pose mode -
When a control is selected, its associated collision shape becomes active. In the below video, the hand control is selected, so the hand collision shape becomes active (turns a light gray color). The hand shape reacts to the box while the fingers remain inactive and go through the box:
Selected collision shape reacts to objects -
To have the fingers also react to the box, make the fingers active:
-
Select the finger collision shapes.
-
Press ⌃ Ctrl + E to toggle the active state of the collision shapes.
Fingers react to the box Note
The character controls do not react to the collision shapes, so they appear to go through the box when the hand is being moved. Once the mouse is released, the controls snap back to the position of the collision shapes.
-
Electra pushes the box ¶
To have Electra push the box:
-
Set the box to be active:
-
Select the box ragdoll shape.
-
Press ⌃ Ctrl + E.
-
-
Select and move the hand control:
Electra pushes the box -
Gravity can be applied to active objects in ragdoll pose mode:
-
In the selection sets HUD, turn on the display of the box ragdoll’s control (
).
-
Select the control for the box ragdoll.
-
Scroll down on the
to apply gravity. Hold ⌃ Ctrl while scrolling to increase the gravity strength.
Apply gravity to box ragdoll shape -
-
Exit ragdoll pose mode by pressing O. Keyframes are written out on the controls that had moved in ragdoll pose mode. If Auto Reload Target Animation in the settings HUD is turned on, the ragdoll is automatically updated to match the character pose. (Turn on the display of the Electra character and box geometries (
) if it was previously turned off for ragdoll pose mode.)
After exiting ragdoll pose mode If Auto Reload Target Animation is turned off, you will see a mismatch between the character’s pose and its ragdoll shapes when you exit ragdoll pose mode:
Mismatch between the character and its ragdoll Do the following to update the ragdoll to match the character:
-
Press ⌃ Ctrl + G to bring up the settings HUD.
-
Select the Ragdoll ▸ Actions tab.
-
Click Reload Target Animation.
-
In the dialog that pops up, select the Electra and box ragdolls.
-
Click Accept.
-
How-to ¶
To... | Do this |
---|---|
Display the ragdoll off to the side of the character |
|
Visualize the ragdoll with the character skin or collision shapes |
|
Bring in props that can collide with the ragdoll |
See working with props. |
Toggle the active state of a collision shape |
or
|
Set a collision shape to follow the original animation |
Other objects can still collide against the collision shape. |
Set certain joints to match the joint positions of the original skeleton |
The selected joints will follow the original skeleton joints, while the rest of the character will be ragdoll. If you want to see how far the joint moves from its original position:
|
Set a character to be a ragdoll |
|
Set certain collision shapes to not collide with other shapes |
|
Add the ragdoll motion to a new animation layer |
For more information, see put the ragdoll simulation back onto the animation. |
Update the ragdoll to match the character’s pose |
To have the ragdoll automatically update to match the character’s pose, turn on Auto Reload Target Animation. |
Set keyframes on ragdoll parameters |
|
Change the density, bounce, and friction of the collision shapes |
|
Copy and paste collision shape parameter values |
|
Reset the collision shape parameter values |
|
Show the collision shapes that intersect |
|
Apply gravity to an active object in ragdoll pose mode |
|
Turn on or off the ground plane |
|
Show or hide the ground plane |
|
Descriptions for the ragdoll parameters (parameters HUD, Ragdoll tab) and ragdoll solver settings (settings HUD, Ragdoll ▸ Solver tab) can be found in the ragdoll::Solve and
Ragdoll Solver SOP node docs.