Houdini 20.5 Character KineFX

Animate state tools and functionality

On this page
This feature is still under development. The current functionality is unfinished and subject to change, and may have thin or no documentation. Please bear this in mind when using it.

The animate state provides several convenient options for posing characters in your animation scene, and manipulating the motion path of controls. Tools are also available for adding constraints, dynamic motion, and ragdoll simulations to your animation.

Posing

Copying and pasting controls

The copy and paste functionality for controls is accessed through the following options in the context menu:

Copy Selection

Copies the selected controls to the clipboard.

Paste World Transforms

Moves the selected controls to the world position of the controls that were copied with the Copy Selection option. The paste operation tries to match up the control names that are copy/pasted.

Select controls to copy (left); select controls to move/paste (middle); pasted world transforms (right)

If multiple controls are selected with Copy Selection, and the paste operation is not able to match up the control names between the copy and paste operations, the selected controls for the paste operation is moved to the position of the primary control from the Copy Selection. The primary control is the control on which the transform handle is placed during the copy operation.

Paste Local Transforms

Performs the same local transforms on the selected controls as was done on the Copy Selection controls. The paste operation tries to match up the control names that are copy/pasted.

Select controls to copy (left); select controls to move/paste (middle); pasted local transforms (right)

If multiple controls are selected with Copy Selection, and the paste operation is not able to match up the control names between the copy and paste operations, the selected controls for the paste operation is moved to the local position of the primary control from the Copy Selection. The primary control is the control on which the transform handle is placed during the copy operation.

Mirroring poses

In the animate state, you can mirror the position, rotation, and scale of controls. To mirror controls on a single character or on multiple characters:

  1. Select the control(s) you want to mirror. Hold ⇧ Shift or box select to select multiple controls.

  2. click in the viewport and select Mirror with Default or Mirror with Plane:

    • Mirror with Default mirrors the selected controls across the same plane that the rig is mirrored across without any additional user input. The plane that the rig controls are mirrored across is determined in the rig setup.

    • Mirror with Plane puts you in the mirror pose state, where you can adjust the mirror plane. Press ⌃ Ctrl + G to bring up a HUD with the mirror settings, which allow you to set certain configurations before mirroring is applied. Press Enter while hovering over the viewport to apply the mirroring.

In the example below, Electra’s leg controls (left image) are mirrored to the other side of the rig (right image).

Original pose (left); mirrored pose (right)

For singular controls that don’t have an equivalent control on the other side of the rig (for example, the spine and chest controls), mirroring is performed by flipping the control across the mirror plane:

Mirrored singular controls

Note

By default, the mirroring operation expects the mirrored controls on the rig to be named <control>_l and <control>_r. If the controls are not named in this way, the APEX Configure Character SOP can be used to specify how the controls on the rig are named, and this information is then used in the mirroring operation. See the How-to for information on how to do this.

Mirror settings

The mirror settings allow you to set configurations for the mirroring operation. To bring up the mirror settings:

  1. Select the control(s) you want to mirror. Hold ⇧ Shift or box select to select multiple controls.

  2. click in the viewport and select Mirror with Plane.

  3. Press ⌃ Ctrl + G to bring up the settings HUD.

  4. Select the Mirror Settings tab.

Setting

Description

Flip Axes

Use this option to fix strange rotations when mirroring.

Mirror to Opposite Control

When turned on, performs mirroring on the opposite control. When turned off, performs mirroring on the currently selected control.

Move Planes Together

This option is only available when controls on multiple characters are selected. When turned on, moves the mirror planes on the multiple selected characters together.

Rig Mirror Plane

The plane within the rig that the controls are mirrored across when the character is at rest position.

Components

The tranform components to mirror - translate (T), rotate (R), and scale (S).

Selection Mode

The controls that are selected after mirroring.

Original

The originally selected controls remain selected after mirroring.

Mirrored

The mirrored controls are selected after mirroring.

All

Both the originally selected controls and mirrored controls are selected after mirroring.

Live Preview

When turned on, shows a live preview of the mirroring performed.

Outline Overlay

When turned on, shows a live preview of the mirroring as an overlay layer.

Note

When mirroring singular controls, turn on the Outline Overlay option. Using Live Preview without Outline Overlay does not work well with singular controls, as singular controls are itself mirrored, which results in the display of the rig switching between the original control position and the mirrored result every time the control is moved.

How-to

To...Do this

Specify how the controls on the rig are named

Use the APEX Configure Character SOP to specify how the controls on the rig are named if they are named differently than the default <control>_l and <control>_r that is expected by the mirroring operation.

The APEX Configure Character SOP takes in a packed character:

APEX Configure Character SOP to specify control naming

For example, if the rig has controls named like leg_l_ik, set the following parameters:

  • Token Position = Middle.

  • Left Token = _l_

  • Right Token = _r_

The mirror pattern is stored in the detail attribute mirror_pattern on the character rig. To view the mirror_pattern attribute, extract the rig using the Unpack Folder SOP, and use the geometry spreadsheet:

Extract rig to view mirror pattern
  1. In the Unpack Folder SOP, set Extract Pattern to /**/*rig.

  2. Select the Unpack Folder SOP in the network view.

  3. At the top of the pane where you want to open the geometry spreadsheet, click the New Tab icon and select New Pane Tab Type ▸ Inspectors ▸ Geometry Spreadsheet.

  4. In the geometry spreadsheet, select Detail from the top toolbar.

  5. click the entry in the properties row under the Detail column, and select Inspect. The Inspect Attribute window that pops up will display the following mirror pattern:

    "mirror_pattern":{
        "left_pattern":"*_l_*",
        "right_pattern":"*_r_*"
    

The controls named with the *_l_* and *_r_* pattern are now recognized by the mirroring operation.

Note

If there is no mirror_pattern in the detail attribute on the rig, the default pattern of *_l and *_r is used.

Swap the poses on the two sides of a character

  1. Select the “mirrored” controls on both sides of the character, for example, arm_l and arm_r.

  2. click in the viewport and select Mirror with Default or Mirror with Plane.

The example below displays the original pose (left image) and the swapped pose after mirroring (right image).

Original pose (left); swapped pose (right)

Perform mirroring on the selected control

  1. Select the control(s) you want to mirror.

  2. click in the viewport and select Mirror with Plane.

  3. In the mirror settings, turn off Mirror to Opposite Control.

  4. Adjust the mirror plane in the viewport using the handle.

  5. Press Enter.

Mirror a character in world space

  1. Select all the controls on a character.

  2. click in the viewport and select Mirror with Plane.

  3. Move the mirror plane in the viewport using the handle.

  4. Press Enter.

Mirror in world space

Mirror the control position while keeping the original orientation

  1. Select the control(s) you want to mirror.

  2. click in the viewport and select Mirror with Plane.

  3. In the mirror settings, go to the Advanced tab.

  4. In the Components field, deselect the rotate (R) and scale (S).

  5. Press Enter.

In the example below, only the position of Electra’s hand is mirrored. The rotation of Electra’s right hand remains unchanged.

Only mirror control position

Mirror across a joint

  1. Select the control(s) you want to mirror.

  2. click in the viewport and select Mirror with Plane.

  3. Select a joint on the character to mirror the controls across.

  4. Press Enter.

Change the live preview options

In the settings HUD, Mirror Settings ▸ Advanced tab, set the Live Preview and Outline Overlay options.

Adjust the planes of multiple characters

  1. Select controls on multiple characters.

  2. click in the viewport and select Mirror with Plane.

  3. In the mirror settings, turn on Move Planes Together.

Fix strange rotations when mirroring

In the mirror settings, try selecting different axes in the Flip Axes option.

Override the plane that the rig controls are mirrored across

The mirroring operation expects the controls on the rig to be mirrored across the YZ plane. This is the default rig mirror plane. If the controls are mirrored across a non-YZ plane on the rig, this must be specified in one of two ways:

  • Use the APEX Configure Character SOP and set the Rig Symmetry Plane parameter to the plane that the rig controls are mirrored across when the character is at rest position. See “Specify how the controls on the rig are named” above for information on where to place the APEX Configure Character SOP in the network and how to view the mirror axis information in the geometry spreadsheet.

    The mirror axis information is stored in the mirror_axis detail attribute on the rig. It has the following format, which can be viewed in the geometry spreadsheet:

    "mirror_axis":[1,0,0]
    

    For example, if Rig Symmetry Plane is set to XY in the APEX Configure Character SOP, then setting Rig Mirror Plane to Use Rig Value in the mirror settings (Advanced tab) will tell the mirroring operation that the controls on the rig are mirrored across the XY plane.

    The APEX Configure Character SOP adds this information directly on the rig.

    or

  • If the rig mirror plane has not been set properly in the rig, the Rig Mirror Plane option in the mirror settings can be used to specify the plane that the rig controls are mirrored across when the character is at rest position.

Note

The rig mirror plane is the plane that the controls are mirrored across within the rig. The mirror plane is the plane that is used to perform the mirroring operation in the animate state. You should not change the Rig Mirror Plane value in the mirror settings to set the position/orientation of the plane for mirroring. Use the mirror plane handle in the viewport for the mirroring operation instead.

Specify the controls that are selected after mirroring

In the mirror settings, Advanced tab, set the Selection Mode option.

Move the mirror plane back to the local rig plane

in the viewport and select Revert ▸ Revert Handle to Default Values.

Locators

A locator is an element that is added to the animate state for use as a pivot point for rotating groups of controls. It can be used to perform FK-type posing for a character. A locator is not part of the rig.

Locators are created using the Add Locator tool, which can be accessed by clicking Add Locator on the top toolbar, or selecting Add Locator from the radial menu (press C over the viewport).

To...Do this

Create a locator as a pivot

Place your mouse over the desired locator position and press H.

Rotate about a locator / Perform FK-type posing

  1. Select the locator.

  2. Select the selection set or group of controls you want to rotate about the locator.

  3. Hold ⌃ Ctrl + ⇧ Shift when rotating.

Note

If you don’t hold ⌃ Ctrl + ⇧ Shift when rotating groups of controls, all the controls will rotate about their local axes. See global transform mode.

Rotate about locator
FK-type posing

Change the size and shape of a locator

changes the shape of the selected locator.

⇧ Shift + changes the size of the selected locator.

Change the color of a locator

  1. Press G to bring up the parameters HUD.

  2. In the Locator tab, set the color of the locator.

Motion paths

Motion paths allow you to visualize the motion of controls as curves in 3D space, and alter the curves in the viewport. Options for motion paths can be set in the settings HUD, Animate Settings ▸ Motion Path tab.

To display the motion path for a control:

  1. Select the control in the animate state.

  2. In the settings HUD, Animate Settings ▸ Motion Path tab, click Bind. The motion path for the control is displayed, and the keys on the control are displayed as dots on the motion path. These dots are the motion path controls.

    To display the entire motion path, turn off Limit Number of Frames. You could also control the visibility of the motion path using selection sets - the motion path is found in All Controls ▸ motionpath.

    Note

    A motion path can only be displayed for one control at a time.

  3. Move the motion path around by selecting the motion path controls and adjusting the handle:

    Motion paths
To...Do this

Create a motion path for a control

  1. Select the control in the animate state.

  2. In the settings HUD, Animate Settings ▸ Motion Path tab, click Bind.

Remove a motion path

In the settings HUD, Animate Settings ▸ Motion Path tab, click Unbind.

Move the motion path

Select the motion path control(s). A transform handle is displayed, which can be manipulated to move the selected keys on the motion path.

Display the entire motion path

In the settings HUD, Animate Settings ▸ Motion Path tab, turn off Limit Number of Frames.

Limit the number of frames shown on the motion path

In the settings HUD, Animate Settings ▸ Motion Path tab, turn on Limit Number of Frames, and adjust the Frames Before and Frames After values.

Turn on/off the display of the motion path

In the selection sets HUD/pane:

  • Toggle / for the motion path.

  • Toggle / for the motion path controls.

Change the size of the motion path ticks

In the settings HUD, Animate Settings ▸ Motion Path tab, adjust the Path Width.

Change the size of the motion path controls

In the settings HUD, Animate Settings ▸ Motion Path tab, adjust the Key Size.

Constraints

Constraints create a parent-child relationship between controls, where the child control follows the parent control. Two types of constraints can be created in the animate state - transient constraints and regular constraints.

Transient constraints

Transient constraints can be dynamically updated within an animation scene.

Regular constraints

Regular constraints are used for controls that are intended to be constrained for the entire animation scene.

Transient constraints

Options for transient contraints can be set in the settings HUD, Animate Settings ▸ Transient Constraints tab.

In this example, we want to transfer the ball from one hand to another. The original animation is shown below:

Original animation
  1. Constrain the ball to the hand:

    • Select the driven object (ball), hold SHIFT, then select the driver (hand).

    • On the timeline, select the range of frames to make the constraint active (hold SHIFT and drag on the timeline).

    • Hover over the viewport and press A.

    The constraint is created between the ball and the hand, and the keys for the ball are baked to every frame in the selected frame range.

    Note

    The constraint behavior is only active within the transient constraint frame range.

    Constrain ball to hand

    An arrow visualizer shows the constraint relationship between the ball and hand:

    Transient constraint visualizer
  2. Fix the position of the ball on the hand.

    Once the transient constraint is created, the driven object (ball) can be moved around, and the changes are automatically applied to the entire frame range that the transient control is active. Make sure you are currently within the frame range that the transient control is active, or the changes will not be applied to the entire frame range.

    Note

    If the changes are not applied to the entire transient control frame range, make sure that Auto Update Follow Ranges is turned on in the settings HUD, Animate Settings ▸ Transient Constraints tab.

    Move driven object (ball)
  3. Constrain the ball to the other hand.

    Ball contrained to both hands at different frame ranges
  4. Fix the ball on the second hand.

    Fix ball on second hand
  5. Fix the pop on the animation as the ball transitions from one hand to the other.

    Animation pop
    • Select the ball (driven object).

    • Click in the timeline so that the current frame is within the frame range of the first transient constraint.

    • In the settings HUD, Animate Settings ▸ Transient Contraints tab, click the button. This updates the offset on the ball to match the frame after the current contraint range so that there is a smooth transition between the current range and the next range.

    Match offsets between contraint ranges
  6. Fix the hand on the first constraint range without moving the ball. Select the hand (driver), hold ⇧ Shift + A, and adjust the hand.

    Adjust the hand (driver)
To...Do this

Add a transient contraint

  1. Select the driven object, hold SHIFT, then select the driver object.

  2. On the timeline, select the range of frames to make the constraint active (hold SHIFT and drag on the timeline).

  3. Hover over the viewport and press A.

Remove a transient contraint

  1. Select the driver or driven object.

  2. In the timeline, move within the transient constraint frame range and press ⌃ Ctrl + A.

    or

    click the transient constraint bookmark, and select Delete.

Adjust the driver object

Hold ⇧ Shift + A and move the driver object.

Adjust the driven object to match the offsets of an adjacent constraint frame range

  1. Select the driven object.

  2. Click in the timeline so that the current frame is within the frame range of the transient constaint you want to adjust.

  3. In the settings HUD, Animate Settings ▸ Transient Contraints tab:

    • Click the button to update the offset on the driven object to match the frame before the current contraint range so that there is a smooth transition between the previous range and the current range.

    • Click the button to update the offset on the driven object to match the frame after the current contraint range.

Update the existing keys when adding a constraint

  1. Set keyframes on the two controls you want to contrain together.

  2. In the settings HUD, Animate Settings ▸ Transient Contraints tab, Bake Mode field, select the Update option.

  3. Add a transient constraint:

    • Select the driven object, hold SHIFT, then select the driver object.

    • On the timeline, select the range of frames to make the constraint active (hold SHIFT and drag on the timeline).

    • Hover over the viewport and press A.

The keyframes within the selected range of frames is updated with the constraint behavior.

Add keys to every frame in the constraint frame range when adding a constraint

  1. In the settings HUD, Animate Settings ▸ Transient Contraints tab, Bake Mode field, select the Dense option.

  2. Add a transient constraint:

    • Select the driven object, hold SHIFT, then select the driver object.

    • On the timeline, select the range of frames to make the constraint active (hold SHIFT and drag on the timeline).

    • Hover over the viewport and press A.

Keyframes are added to every frame in the selected frame range.

Turn off display of the constraint visualizer

In the settings HUD, Animate Settings ▸ Transient Contraints tab, turn off Show Constraint Visualizer.

Regular constraints

Regular (non-transient) constraints are created and updated in the Add Constraints tool, which can be accessed by clicking Add Constraint on the top toolbar, or selecting Add Constraint from the radial menu (press C over the viewport).

To...Do this

Add a constraint

  1. Select the child control.

  2. Hold ⇧ Shift and select the parent control. A dotted line will appear with an arrow pointing from the parent to the child.

  3. Press H. A constraint will be added and the child control will turn gray.

In the below example, the right hand initially comes off the pole. Once a constraint is added, the right hand stays on the pole.

Before adding a constraint on the right hand
After adding a constraint

Remove a constraint

Select the child control and press ⌃ Ctrl + H. The child control will change back to its original color.

Turn a constraint on or off

  1. Select the child control.

  2. Press G to bring up the parameters HUD.

  3. In the Constraint tab, turn on or off the Enable Constraints option.

Bake the constraint over a frame range

  1. Select the child control.

  2. Press G to bring up the parameters HUD. In the Constraint tab, make sure Enable Constraints is turned on.

  3. Select a frame range on the playbar.

  4. Click Bake Range.

Keyframes will be added to every frame in the selected frame range. If you turn off Enable Constraints, the child control will still look like it is constrained to the parent within the frame range.

Update existing keyframes over a frame range to match the constrained position

Similar to Bake Range, but only updates the existing keyframes.

  1. Select the child control.

  2. Press G to bring up the parameters HUD. In the Constraint tab, make sure Enable Constraints is turned on.

  3. Select a frame range on the playbar.

  4. Click Update Range.

If you turn off Enable Constraints, the child control will still match the constrained position at the existing keyframes.

Dynamic motion

The dynamic motion tool allows you to add physically-accurate projectile motion trajectory to your animation. See physics-based motion for more information.

To enter the dynamic motion tool, click Dynamic Motion on the top toolbar, or select Dynamic Motion from the radial menu (press C over the viewport).

Create dynamic motion

To replace the current motion paths in an animation with dynamic motion:

  1. Select the center of mass control(s) that will be used to calculate the dynamic motion path, and press H over the viewport.

    To see the entire dynamic motion path, go into the settings HUD (press Ctrl+G over the viewport), Dynamic Motion Settings ▸ Path Settings tab, and turn off Limit Number of Frames. The path of the current keyframed animation with rough posing will be shown.

    Animation trajectory with rough posing
  2. Set the start and end of a section of dynamic motion:

    • On the playbar timeline, move the animation to the start of the first jump, and press H over the viewport.

    • Move to the end of the first jump and press H over the viewport. The path of the first jump will be replaced with dynamic motion.

    Replace path with dynamic motion
  3. Add dynamic motion for the remaining jumps:

    Animation with dynamic motion

Put the dynamic motion back onto the animation

At this point, the dynamic motion can only be seen within the Dynamic Motion tool, and not in the default Animate mode. To put the dynamic motion back onto the original animation:

  1. Press Ctrl+G to bring up the settings HUD.

  2. In the Dynamic Motion Settings ▸ Bake tab, click Update Keys.

    The existing keyframes will be moved to the dynamic motion path.

Add additional keyframes

To add additional keyframes to the dynamic motion regions:

  1. Press Ctrl+G to bring up the settings HUD.

  2. In the Dynamic Motion Settings ▸ Bake tab, the following options are available:

    Keep Existing Keys

    When turned off, the existing keys are replaced by the new keys.

    Bake Essential Keys

    When turned on, adds keyframes at the most important points of the arc - the landing points, halfway up the arc on either side, and the peak of the arc.

    Resample Keys

    When turned on, resamples the dynamic motion regions Every N Frames.

  3. (Optional) To add the keyframes to a new animation layer, turn on Bake Keys to New Layer.

  4. Click Bake Keys.

    • If Bake Keys to New Layer is turned off, the keyframes are added to the current animation layer.

    • If Bake Keys to New Layer is turned on, the keys are added to a new animation layer named dynamicmotion. dynamicmotion is an override layer. See animation layers for more information.

Adjust the start, end, and height of the dynamic motion

To adjust the start position, end position, and height of the dynamic motion, enter advanced mode in the dynamic motion tool:

  1. Press G over the viewport to bring up the parameters HUD.

  2. In the Dynamic Motion tab, set Mode to Advanced.

  3. In the dialog that pops up, choose whether to work on a new animation layer or on the current layer. In advanced mode, changing the height of the dynamic motion results in the entire animation needing to be retimed. As a result, you are locked into working on one animation layer and will be prompted if you try to switch layers.

  4. In the Dynamic Motion Source Animation window, choose the character rig(s) you want the retiming to be applied to. For example, if you have a character throwing a ball in the air, select the rigs for both the character and the ball. In this way, if you increase the height of the ball’s dynamic motion arc, the character’s hand motion will also slow down to catch the ball even though the ball is in the air for longer.

  5. Click Accept.

    In advanced mode, the dynamic motion controls (start position, end position, and height) are displayed. You could set the visibility of these controls using selection sets - the dynamic motion controls are found under All Controls ▸ dynamicmotion.

  6. Adjust the height of the dynamic motion by selecting the height plane that appears at the top of the dynamic motion arc, and adjusting the handles:

    Change height of dynamic motion arc

    Note

    Select the height plane and press R to switch the transform handle to rotate mode. This allows you to rotate the plane so that the dynamic motion path skims the plane instead of reaching a specific height.

  7. Change the start or end position of a dynamic motion section by selecting the green/red arrow at the start/end of the dynamic motion path, and adjusting the position using the handle:

    Change dynamic motion end position

If you try to switch to another animation layer while in advanced mode, a prompt will appear with the following options:

Operate on <new layer>

Applies the dynamic motion changes to the new layer, and resets the current layer to the original animation.

Activate <current layer>

Stays on the current animation layer.

Bake a new layer

Creates a new layer with the changes from the current layer.

Reset Dynamic Motion

Removes all dynamic motion, resetting the dynamic motion tool to its original state.

Note

If you switch from advanced mode to basic mode, any changes made in advanced mode since the last bake is discarded.

To...Do this

Display the entire dynamic motion path

In the settings HUD, Dynamic Motion Settings ▸ Path Settings tab, turn off Limit Number of Frames.

Limit the number of frames shown on the dynamic motion path

In the settings HUD, Dynamic Motion Settings ▸ Path Settings tab, turn on Limit Number of Frames, and adjust the Frame Before and Frame After values.

Adjust the height of the dynamic motion

Select the height plane that appears at the top of the dynamic motion arc, and adjust the height using the handles.

or

  1. On the timeline, move the animation within the frame range of the dynamic motion section.

  2. Press G to bring up the parameters HUD.

  3. In the Dynamic Motion tab, adjust the Life value.

Change the start or end position of the dynamic motion section

Select the green/red arrow at the start/end of the dynamic motion path, and adjust the position using the handle.

Put the dynamic motion back onto the animation

  1. Press Ctrl+G to bring up the settings HUD.

  2. In the Dynamic Motion Settings ▸ Bake tab, click Update Keys.

Add additional keyframes to the dynamic motion regions

See add additional keyframes.

Display the controls for all the dynamic motion paths

  1. Press Ctrl+G to bring up the settings HUD.

  2. In the Dynamic Motion Settings ▸ Bake tab, set Visible Controls to All Motions. The Visible Controls option is only applicable in advanced mode.

    In the example below, the dynamic motion controls (start position, end position, and height) for the 3 balls are displayed:

    Display all dynamic motion controls

You could also set the visibility of the dynamic motion controls using selection sets, found under All Controls ▸ dynamicmotion.

Remove a section of dynamic motion

  1. On the timeline, move the animation within the frame range of the dynamic motion section.

  2. Press ⌃ Ctrl + H over the viewport.

Remove all dynamic motion

  1. Press Ctrl+G to bring up the settings HUD.

  2. In the Dynamic Motion Settings ▸ Path Settings tab, click Reset.

Change the size of the dynamic motion path ticks

⇧ Shift +

Change the size of the dynamic motion height planes

⌃ Ctrl +

Ragdoll

The ragdoll tool allows you to add a ragdoll simulation to your animation. To enter the ragdoll tool, click Ragdoll on the top toolbar, or select Ragdoll from the radial menu (press C over the viewport).

In this example, we add a ragdoll simulation to the Electra test geometry.

Setup

Before using the ragdoll tool, perform the following setup steps:

  1. Update the Electra skeleton with a set of joint limits.

  2. Create ragdoll collision shapes for Electra.

  3. Add the collision shapes to the list of Electra character elements.

  4. Map the controls on Electra’s rig to points on Electra’s skeleton.

  5. (Optional) Set the ragdoll configurations used by the animate state.

See ragdoll simulations for more information.

Note

The Configure Ragdoll parameter on the Electra test geometry performs all the above setup steps automatically.

Animate state ragdoll workflow
  1. On the Electra test geometry, set the Output parameter to APEX Character.

  2. Set joint limits on the Electra skeleton:

  3. Create ragdoll collision shapes:

    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.

  4. The Pack Folder SOP adds the updated skeleton (with joint limits) and ragdoll collision shapes to the set of character files.

    Set the Name and Type parameters to:

    • Updated skeleton: Name = Base, Type = skel.

    • Ragdoll shapes: Name = RagdollCollision. The Name and Type parameters for the ragdoll shapes can be set to anything.

    See assemble character data for information about naming character elements in the packed character format.

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

    • Set Rig Path to /Base.rig.

    • Set Skeleton Path to /Base.skel.

    • Keep Map By Name turned on, so that the APEX Map Character SOP automatically performs a mapping between controls and joints that share the same name.

    • Enter the Map Character viewer state - select the APEX Map Character SOP, turn on its display flag, and 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
  6. (Optional) The APEX Configure Character SOP configures ragdoll properties on the character.

    If this node is included in the ragdoll setup, a ragdoll for the character is automatically created in the ragdoll tool. Otherwise, you will need to manually create a ragdoll in the animate state.

    Click beside Ragdoll Configurations. The Character Name is the name of the ragdoll that will appear in the animate state selection sets HUD.

  7. The APEX Scene Add Character SOP adds the character files to an animation scene. Set the Character Name parameter to Electra.

Manually create a ragdoll

If an APEX Configure Character SOP is not used in the ragdoll setup, you will need to manually create a ragdoll and specify the ragdoll configuration information in the prompts that come up.

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

  2. Enter the ragdoll tool.

  3. Press H to start creating a ragdoll simulation.

  4. Enter a name for the ragdoll and click OK.

    Warning

    Only names without spaces are supported.

    Note

    Enter a name that is different from the character. If the character and ragdoll names are the same, the ragdoll collision shapes will be added under the actual character in the selection sets.

  5. In the Character Source Data window, select the skeleton (.skel) of the character you want to turn into a ragdoll. Click Accept.

  6. Select the ragdoll collision shapes that were previously set up for the character.

    The collision shapes are generated by the 2nd output of the Ragdoll Collision Shapes SOP. If these collision shapes are packed into the character and named, say, RagdollCollision, then select RagdollCollision, which appears under the character (.char).

    If you bring in a copy of a character that is already in the scene, but this new character doesn’t already have collision shapes, you can use the collision shapes from the original character.

  7. Click Accept.

  8. Specify the output skeleton from the character rig graph. This is the deformed skeleton.

    We want the ragdoll to inherit the original animation of the character before the ragdoll simulation takes over. On the character rig, the movement of the skeleton is driven by the animation. The skeleton input of the rig is in its rest pose. The skeleton output of the rig has updated joint positions that are driven by the animation. This skeleton output is used to build a MotionClip, which stores a set of skeleton poses over a frame range.

    In the dialog, specify the skeleton output (.skel) of the character rig. The character format hierarchy is as follows: character > rig > rig output node > skeleton output. For example:

    character
      -- Base.rig
        -- output
          -- Base.skel
    
  9. Click Accept. You will see the character’s collision shapes overlaid on top of the character.

Default ragdoll simulation

Once the Electra ragdoll has been set up, there will be an entry for both the Electra character and Electra ragdoll in the selection sets HUD, under All Controls.

Note

The Electra ragdoll only appears in the selection sets if you are in the ragdoll tool.

To turn off the display of the ground plane:

  • Press ⌃ Ctrl + G to open the settings HUD.

  • In the Ragdoll Settings ▸ Solver tab, turn off Ground Display.

To have a better view of the ragdoll collision shapes, use the handle to offset the ragdoll from the original animation:

Offset the ragdoll display

Note

If the ragdoll handle doesn’t appear, press ⌃ Ctrl + G to open the settings HUD, and in the Ragdoll Settings ▸ Actions tab, turn on Show Visualiser Offset Handle.

If you play the animation, the ragdoll will fall on the ground plane, which is the default behavior for a ragdoll:

Default ragdoll behavior

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:

Add prop to ragdoll network
  1. 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. In this example, we set Prop Name to box_prop.

    • 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, and skin.

  2. The APEX Map Character SOP maps the box’s one control to its joint.

    • Set Rig Path to /box_prop.char/Base.rig.

    • Set Skeleton Path to /box_prop.char/Base.skel.

  3. (Optional) The APEX Configure Character SOP configures ragdoll properties on the box.

    If this node is included in the ragdoll setup, a ragdoll for the prop is automatically created in the ragdoll tool. Otherwise, you will need to manually create a prop ragdoll in the animate state.

    • Set Rig Path to /box_prop.char/Base.rig.

    • Click beside Ragdoll Configurations. The Character Name is the name of the prop ragdoll that will appear in the animate state selection sets HUD.

    Note

    By default, the Skeleton Path and Collision Shapes Path are relative to the character (.char) in the packed folder structure (seen in the rig tree view).

  4. Create the ragdoll collision shape for the box:

    Note

    If the prop has a concave surface, in the Ragdoll Collision Shapes viewer state, set Shape to Convex Hull, and Algorithm to Convex Decomposition. In the G HUD, adjust the Max Concavity to more closely match the shape of the prop.

  5. The Pack Folder SOP adds the ragdoll collision shape to the set of character files for the box:

    • Set the Parent Folder parameter to box_prop.char.

    • The Name and Type parameters for the box ragdoll shape can be set to anything. We set Name to RagdollCollision.

    Note

    In contrast to the ragdoll setup for Electra, joint limits are not necessary for our box prop. As a result, the skeleton for the box is not updated with joint limits, and so we don’t need to add the box skeleton back into the set of character files.

  6. Enter the ragdoll tool in the animate state, and play the simulation:

    Starting ragdoll simulation
  7. Use the handles to pose Electra on top of the box.

  8. Update the ragdoll collision shapes to match the pose on Electra:

    • Press ⌃ Ctrl + G to open the settings HUD.

    • In the Ragdoll Settings ▸ Actions tab, click Reload Target Animation.

    • In the Reload Target Animation window that pops up, select the Electra ragdoll.

    • Click Accept.

    Pose Electra on box
  9. Set the box to not be actively simulated ragdoll:

    • Select the box ragdoll.

    • Press ⌃ Ctrl + E to toggle the active state of the box ragdoll.

      or

      Press G to open the parameters HUD. In the Ragdoll ▸ Animated tab, turn off Active.

  10. 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 ▸ Animated tab, increase the Bend Stiffness.

  11. Make the box slippery:

    • Select the box collision shape.

    • Press G to bring up the parameters HUD.

    • In the Ragdoll ▸ Constant tab, decrease the Friction.

    Electra on prop

Ragdoll on existing animation

In this example, a ragdoll simulation is added to the top character in the existing animation:

Starting animation

Create the ragdoll motion

  1. Set up the top character for the ragdoll simulation.

  2. 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
  3. To get a better view of the ragdoll, use the handle to move the ragdoll to the side of the original animation.

    Visualize ragdoll
  4. 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 ▸ Animated tab, turn on Match World Transforms. The selected collision shapes will follow the original skeleton joints.

    • Alt click Match World Transforms to sets keysframes 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 _matchworldtransforms.

    Partial ragdoll

    Tip

    If the collision shapes are jittering, it could be that they are colliding against each other. Try turning off (and keying) Active instead of turning on Match World Transforms.

    Collision shapes jittering
  5. Specify that the ragdoll simulation takes over at the end of the throw.

    • On the playbar timeline, go to the frame where you want the ragdoll simulation to take over.

    • Turn off Match World Transforms.

    • Alt click Match World Transforms to sets keysframes at the current frame for each of the selected collision shapes.

    Switch to full ragdoll at the end of the throw

Put the ragdoll simulation back onto the animation

To put the ragdoll motion back onto the top Electra:

  1. Select all the controls on the top Electra (select the top Electra from the selection sets HUD).

  2. Press ⌃ Ctrl + G to bring up the settings HUD. In the Ragdoll Settings ▸ Actions tab, the following baking options are available for writing out the ragdoll motion to the animation:

    Bake Keys

    Adds a keyframe at the current frame.

    Start Recording Poses

    Sets keyframes on the selected frames or over a frame range.

    After clicking Start Recording Poses:

    • If you select certain frames on the playbar timeline, keyframes will be added at those frames.

    • If you scrub the timeline, keyframes will be added to every frame in the frame range while scrubbing.

    • If you press the Play button on the playbar, keyframes will be added to every frame until you press the Stop button.

    Bake Keys to New Layer

    When turned on, adds the new keyframes for the ragdoll motion to a new animation layer that is set to be an override layer (the new layer overrides the base animation). This option is turned on by default.

  3. Go to the frame on the timeline to start putting the ragdoll motion back onto the animation.

  4. Click Start Recording Poses.

  5. Scrub the timeline to the end of the ragdoll motion.

  6. Click Stop Recording Poses. The ragdoll motion is added to a new animation layer as an override layer. We only started recording poses after the throw, so the original animation on the top Electra doesn’t show through the new layer:

    Ragdoll motion written out as animation layer
  7. To have the ragdoll motion apply to the animation only after the throw motion, set weights on the new layer.

    Final animation

The options for putting ragdoll motion back onto the original animation are:

1) Turn on Bake Keys to New Layer, and only record poses or bake keys within the frame range of the ragdoll motion. On the new animation layer that is created, set weights on the new layer. This is the same as the previous example.

2) Turn on Bake Keys to New Layer, and record poses or bake keys over the entire frame range of the animation and ragdoll motion. The entire frame range is written out to a new layer as an override layer.

3) Turn off Bake Keys to New Layer, and only record poses or bake keys within the frame range of the ragdoll motion. The ragdoll motion replaces the original animation within this frame range.

Ragdoll posing

In ragdoll pose mode, you can manipulate controls to pose the character while the ragdoll simulation runs in the background.

In this example, we start with the following scene:

Ragdoll pose starting scene
  1. In the ragdoll tool, press O to enter ragdoll pose mode.

  2. (Optional) To turn off the display of the ground plane:

    • Press ⌃ Ctrl + G to open the settings HUD.

    • In the Ragdoll Pose Settings ▸ Solver tab, turn off Ground Display.

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

  4. By default, all the collision shapes in ragdoll pose mode are inactive - they do not react to other objects. When a control is selected, its associated collision shape becomes active. In the below video, the hand control is selected, and so the hand collision shape becomes active (turns a lighter grey color). The hand shape reacts to the box while the fingers remain inactive and go through the box:

    Selected collision shape reacts to objects
  5. 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 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:

  1. Set the box to be active:

    • Select the box ragdoll shape.

    • Press ⌃ Ctrl + E.

  2. Select and move the hand control:

    Electra pushes the box
  3. Gravity can be applied to active objects in ragdoll pose mode:

    • Select the control for the box ragdoll shape.

    • Scroll down on the to apply gravity. Hold ⌃ Ctrl while scrolling to increase the gravity strength.

    Apply gravity to box ragdoll shape
  4. Exit ragdoll pose mode by pressing O. Any controls and collision shapes that have moved in ragdoll pose mode have keyframes written out to their corresponding controls. (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
  5. To update the ragdoll to match the character pose:

    1. Press ⌃ Ctrl + G to bring up the settings HUD.

    2. Select Ragdoll Settings ▸ Actions.

    3. Click Reload Target Animation.

    4. In the dialog that pops up, select the Electra and box ragdolls.

    5. Click Accept.

    Update ragdoll to match character pose
To...Do this

Start creating a ragdoll

Press H and follow the prompts.

Remove a ragdoll

  1. Press ⌃ Ctrl + H.

  2. In the dialog that pops up, select the ragdoll character you want to remove.

  3. (Optional) If you turn on Remove Ragdoll Configuration Files, the <ragdoll>_channelprims and <ragdoll>_motionclip files are removed from the scene’s ragdolldata directory. The motionclip file stores the animation of the character that goes into the ragdoll, and the channelprims file stores the ragdoll configurations as channel primitives. The data structure within the scene can be seen in the rig tree view when the APEX Scene Animate SOP is selected.

  4. Click Remove. This removes the ragdoll elements from the ragdoll rig graph in the scene, ragdoll.rig.

Display the ragdoll off to the side of the character

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. In the Ragdoll Settings ▸ Actions tab, turn on Show Visualiser Offset.

  3. Move the ragdoll handle.

Visualize the ragdoll with the character skin or collision shapes

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. In the Ragdoll Settings ▸ Actions tab, select from the Visualize drop-down menu.

Bring in props that can collide with the ragdoll

See working with props.

Toggle the active state of a collision shape

  1. Select the collision shape.

  2. Press ⌃ Ctrl + E.

This is the same as:

  • Press G to bring up the parameters HUD.

  • Select the Ragdoll ▸ Animated tab.

  • Turn on Active.

Set certain collision shapes to follow the original animation

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Select the Ragdoll ▸ Animated tab.

  4. Turn off Active. This setting is per collision shape.

Other objects can still collide against the collision shape.

Set certain joints to match the joint positions of the original skeleton

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Select the Ragdoll ▸ Animated tab.

  4. Turn on Active.

  5. Turn on Match World Transforms.

  6. Optionally adjust the Position Stiffness, Position Damping, Orientation Stiffness, and Orientation Damping values.

The selected joints will follow the original skeleton joints, while the rest of the character will be ragdoll.

Set a character to be a ragdoll at a particular frame

  1. Press G to bring up the parameters HUD.

  2. Select the Ragdoll ▸ Animated tab.

  3. Select any collision shape on the character.

  4. Turn on Character Active. This setting is per character.

    When turned on, the character becomes a ragdoll at the current frame. When turned off, the character is no longer a ragdoll at the current frame, but other objects can still collide against it.

    When the Character Active setting is updated, the globalactive channel appears in the channel list.

Set certain collision shapes to not collide with other shapes

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Select the Ragdoll ▸ Animated tab.

  4. Turn on Disable Collisions. This setting is per collision shape.

Add the ragdoll motion to a new animation layer

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. Select Ragdoll Settings ▸ Actions.

  3. Turn on Bake Keys to New Layer.

For more information, see put the ragdoll simulation back onto the animation.

Reload the animation in the scene

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. Select Ragdoll Settings ▸ Actions.

  3. Click Reload Target Animation.

  4. In the Reload Target Animation window that pops up, select the ragdoll.

  5. Click Accept.

Set keyframes on ragdoll parameters

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Select the Ragdoll ▸ Animated tab.

  4. Set and remove keyframes by clicking the parameter checkbox/textbox in the following ways:

    • Alt click to set a keyframe.

    • ⇧ Shift click to set keyframes on all the parameters.

    • ⌃ Ctrl + ⇧ Shift click to delete the keyframe.

Change the density, bounce, and friction of the collision shapes

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Select the Ragdoll ▸ Constant tab.

  4. Adjust the Density, Bound, and Friction parameters. These values are configured per collision shape.

Copy and paste collision shape parameter values

  1. Select the collision shape.

  2. Press G to bring up the parameters HUD.

  3. Click the button to copy the parameter values.

  4. Select another collision shape.

  5. Click the button to paste the values.

Reset the collision shape parameter values

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Click the button.

Pin unattached collision shapes to the skeleton

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. Select Ragdoll Settings ▸ Solver.

  3. Turn on Pin Root.

This is a global option that applies to all the characters. See pin root of unattached collision shapes for an example.

Show the collision shapes that intersect

  1. Select the collision shape(s).

  2. Press G to bring up the parameters HUD.

  3. Select the Ragdoll ▸ Debug tab.

  4. Turn on Show Shape Intersections.

Apply gravity to an active object in ragdoll pose mode

  1. Select the control for the object.

  2. Scroll down on the to apply gravity. Hold ⌃ Ctrl while scrolling to increase the gravity strength. Hold ⇧ Shift while scrolling to decrease the gravity strength.

Turn on or off the ground plane

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. Select Ragdoll Settings ▸ Solver.

  3. Turn on or off Ground Enable.

Show or hide the ground plane

  1. Press ⌃ Ctrl + G to bring up the settings HUD.

  2. Select Ragdoll Settings ▸ Solver.

  3. Turn on or off Ground Display.

Descriptions for the ragdoll parameters in the parameters HUD (G hotkey, Ragdoll tab) can be found in the Ragdoll Solver SOP node doc.

KineFX

Preparing character inputs

Rigging with rig components

Rigging with APEX graphs

Building graphs with APEX Script

Animating in the viewport

Technical Animation

Deformation

Animation Retargeting

Pre-H20

Panes

Appendix