Houdini 22.0 Character KineFX

Animation workflow

Example networks of adding characters, props, characters, and animation to a scene.

On this page

In the animation workflow, you can add characters and animation to a scene, transfer animation to characters through motion retargeting, and play back scene animation. The animation scene, along with the characters and other scene elements, are organized in a character folder structure.

Basic animation scene setup

The basic workflow for adding a character to a scene and performing animation is shown below. In this example, we use the Electra Test Geometry SOP as our character (the APEX Example Scene recipe provides an example of this workflow):

Basic animation workflow
  1. On the Electra SOP, set Output to APEX Character. This outputs Electra as a character comprised of a set of character elements (skeleton, shape, rig). You can view the contents of this node in the rig tree view:

    • Select the Electra SOP.

    • Open the rig tree view - at the top of a pane, click the New Tab icon, and select New Pane Tab Type ▸ Animation ▸ Rig Tree.

    • From the Type drop-down menu, select Packed Folders. The character’s skeleton, shape, and rig are displayed in a character folder structure:

      /
      -- Base.rig
      -- Base.shp
      -- Base.skel
      ...
      

      There may be other elements present in Electra’s character folder structure depending on the configurations that were turned on in the Electra SOP (ragdoll, motion mixer, full body IK).

  2. The APEX Scene Add Character SOP adds the character elements to a character (.char) folder in the character folder structure. This character is then added to the animation scene.

    • Specify a name for the character in the Character Name parameter. If you rename the APEX Scene Add Character SOP, the Character Name will be updated automatically. In this example, we set Character Name to character.

    • Select the APEX Scene Add Character SOP. In the rig tree view, we now have:

      /
      -- character.char/
          -- Base.rig
          -- Base.shp
          -- Base.skel
          ...
      
  3. The animate state on the APEX Scene Animate SOP allows you to display, pose, and animate the characters in a scene. To enter the animate state, select the APEX Scene Animate SOP, turn on its display flag, and click Animate on the left toolbar.

  4. The animation in the scene can be played back on the APEX Scene Animate SOP even when you exit the animate state. This is because the Enable APEX Character Deformation option is turned on by default in the Display Options (press D over the viewport, Optimize tab). If Enable APEX Character Deformation is turned off, you can play back the animation by connecting to the second output of the APEX Scene Animate SOP or using an APEX Scene Invoke SOP:

    Play back animation
    • Turn on the display flag on the APEX Scene Invoke or Null SOP.

    • Press Play on the playbar to see the animation.

Add multiple characters to a scene

You can bring multiple characters into an animation scene using an APEX Scene Add Character SOP for each character:

Add multiple characters to a scene
  1. On each of the APEX Scene Add Character SOPs, specify a name for the character in the Character Name parameter.

  2. Select the second APEX Scene Add Character SOP. The following is displayed in the rig tree view:

    /
    -- character1.char/
        -- Base.rig
        -- Base.shp
        -- Base.skel
        ...
    -- character2.char/
        -- Base.rig
        -- Base.shp
        -- Base.skel
        ...
    

Add a prop to a scene

You can add a prop to an animation scene using an APEX Scene Add Prop SOP. The prop is added as a character in the character folder structure. The APEX Example Scene recipe provides an example of this workflow.

Add a prop to a scene
  1. On the APEX Scene Add Prop SOP, specify a name for the prop in the Prop Name parameter.

  2. Select the APEX Scene Add Prop SOP. In the rig tree view, a <prop_name>.char folder is added to the character folder structure:

    /
    -- character.char/
        -- Base.rig
        -- Base.shp
        -- Base.skel
        ...
    -- <prop_name>.char/
        -- Base.rig
        -- Base.shp
        -- Base.skel
        ...
    

Add a camera to a scene

You can add a camera to an animation scene using an APEX Scene Add Camera SOP. The camera is added as a character in the character folder structure. The APEX Example Scene recipe provides an example of this workflow.

Add a camera to a scene

Select the APEX Scene Add Camera SOP. In the rig tree view, a <camera_name>.char folder is added to the character folder structure:

/
-- character.char/
    -- Base.rig
    -- Base.shp
    -- Base.skel
    ...
-- <camera_name>.char/
    -- Base.rig
    -- Base.shp
    -- Base.skel
    ...

You can also add a camera from within the animate state:

  1. In the animate state, click the camera/light menu and select New Camera. This adds an APEX Scene Add Camera SOP upstream from the current APEX Scene Animate SOP.

    Note

    If the active animation layer is locked or cannot be edited, the camera controls are added to a new animation layer.

  2. To constrain the camera to a control, select the camera, hold ⇧ Shift, select the character control, and press H over the viewport. The control now drives the camera. See animate state constraints for more information.

  3. To look through the camera, click the camera/light menu, and select APEX: <camera>.

    Note

    If the constraint’s offset control is blocking the camera view, turn off display of the offset control in the selection sets by clicking beside All Constraints ▸ <camera> ▸ <driver_control> ▸ Offset .

To change the camera parameters:

  1. Click the menu for the camera in the animate state.

  2. In the animate state parameters, Control tab, you can adjust the different camera parameters. See the Camera SOP for descriptions of the camera parameters.

To look through the camera outside the animate state:

  1. Pipe the APEX Scene Animate SOP into an APEX Scene Invoke SOP.

  2. On the APEX Scene Invoke SOP, set Output to Unpacked Geometry.

  3. In the viewport, click the camera/light menu and select <SOP_network>:<camera>.

Add animation to a character

You can add animation to a character in a scene using the following SOPs. Animation is added to the character folder structure under the /animation folder.

APEX Scene Add Animation SOP

Adds animation to an animation scene.

APEX Scene Copy Animation SOP

Copies animation from a character folder structure to an animation scene.

APEX Scene Import Animation SOP

Imports animation from multiple sources, including files, animation catalogs, and SOPs. You can also use this node to create empty animation clips and make a copy of a clip in the current scene.

APEX Scene Merge SOP

Merges animation and characters from SOPs or input geometry into an animation scene.

APEX Scene Animate SOP

Import animation by dragging and dropping from an animation catalog into the animate state. See import animation from within the animate state.

Import animation from an animation catalog

In this example, we import animation from an animation catalog (saved as a .bgeo file) into a scene:

Import animation
  1. On the Electra SOP, set Output to Character.

  2. On the APEX Scene Add Character SOP, we set Character Name to electra.

  3. On the APEX Scene Import Animation SOP:

    • Click beside Imports to add a multiparm entry.

    • Set Mode to Animation Catalog.

    • Click beside Files Pattern and select the animation catalog .bgeo file. This imports all the animation from the animation catalog.

    • Set the Active Clip parameter to the specific animation you want to see in the viewport.

    • In the rig tree view, the imported animation is located in the /animation directory of the character folder structure.

    To import a single animation from an animation catalog:

    • Enter the APEX Scene Import Animation viewer state - select the APEX Scene Import Animation SOP, turn on its display flag, and click on the left toolbar.

    • Drag and drop an animation from the animation catalog pane into the viewport. This automatically creates an entry for the animation in the Imports multiparm.

  4. Enter the animate state - select the APEX Scene Animate SOP, turn on its display flag, and click Animate on the left toolbar.

    Note

    If there are multiple animation clips in the /animation directory of the character folder structure, you can set the active clip in the scene using the drop-down menu on the top toolbar of the animation layers. You can access animation layers in the animation layers pane, the animate state HUD, and the APEX Scene Animate SOP’s parameter editor.

Import animation from within the animate state

You can import animation from an animation catalog using an APEX Scene Animate SOP:

  1. Enter the animate state - select the APEX Scene Animate SOP, turn on its display flag, and click Animate on the left toolbar.

  2. Select all the character’s controls.

  3. Drag and drop an animation from the animation catalog pane into the viewport.

  4. Choose from the following options:

    Insert to Current Layer

    Adds the animation to the current animation layer. If you import multiple animations, each animation will occupy a successive frame range so they don’t overlap.

    Add as New Override Layer

    Adds the animation to a new animation layer that is set as an override layer (overrides the layers below). If you import multiple animations, each animation will be added to its own override layer and will occupy adjacent frame ranges so they don’t overlap.

    Import as Animation Clips

    Creates a new animation clip in the /animation directory of the character folder structure. If you import multiple animations, a new clip will be created for each animation. You can set the active clip in the scene using the drop-down menu on the top toolbar of the animation layers.

  5. You can rename the animation in the scene using the Edit Animation window. Open the Edit Animation window by clicking the viewport and selecting Actions ▸ Edit Animation, or selecting Animation ▸ Edit Animation in the parameter editor. See the Edit Animation window for more information.

Retarget animation onto a character

In this example, we use the APEX Biped recipe and APEX Retarget to Rig recipe to build a rig for a character, retarget animation from an FBX file onto the character, and pipe the animation scene into an APEX Scene Animate SOP and the motion mixer for further animation and motion processing.

Recipes for retargeting animation onto a character
  1. Type “APEX Biped” in the network editor’s tab menu and put down the APEX Biped recipe.

  2. Connect an Electra test geometry to the shape and rest skeleton inputs of the recipe.

  3. Select the APEX AutoRig Builder SOP, turn on its display flag, and click Animate on the left toolbar.

  4. In the Apply Template window that pops up, select a rig template and mapping to use for the character rig. In our example, we set Template to Mocap Biped, and Mapping to sidefx. Click Apply Template.

  5. Exit the Autorig Builder viewer state by clicking on the left toolbar.

  6. The configure_character subnet sets mirroring and motion mixer configurations for the character, and adds the character to an animation scene. The APEX Scene Add Character SOP in the subnet sets the character name to biped.

  7. Put down the APEX Retarget to Rig recipe and connect the two recipes - connect the ANIMATE node to the APEX_SCENE node.

  8. On the APEX Unpack Character SOP, set Character Name to biped.

  9. The APEX Retarget to Rig recipe has the following test animation in the FBX Animation Import SOP:

    Imported animation
  10. To see the animation that has been transferred to Electra’s controls, select the APEX Animation from Skeleton SOP, turn on its display flag, and play the animation.

    Animation retargeted onto Electra
  11. Connect the APEX Animation from Skeleton SOP to an APEX Scene Animate SOP or Motion Mixer SOP to continue editing the animation on the character.

    The name of the retargeted animation clip is set in the APEX Animation from Skeleton SOP’s Clip Name parameter. On the Motion Mixer SOP, the retargeted animation appears in the Catalog tab of the parameter editor.

Retarget animation onto an FBX character

The APEX FBX Biped recipe imports an FBX character and retargets animation onto the character. The setup is almost identical to the above example that uses the APEX Biped recipe:

  1. Type “APEX FBX Biped” in the network editor’s tab menu and put down the APEX FBX Biped recipe.

  2. On the IMPORT_CHARACTER subnet, set FBX File to the FBX file of the character you want to import, and specify a Character Name.

  3. Select the APEX AutoRig Builder SOP, turn on its display flag, and click Animate on the left toolbar.

  4. In the Apply Template window that pops up, select a rig template and mapping to use for the character rig, for example, setting Template to Mocap Biped, and Mapping to sidefx. Click Apply Template.

  5. Exit the Autorig Builder viewer state by clicking on the left toolbar.

  6. Put down the APEX Retarget to Rig recipe and connect the two recipes - connect the ANIMATE node to the APEX_SCENE node.

  7. On the APEX Unpack Character SOP, set the Character Name to match the Character Name in the IMPORT_CHARACTER subnet.

  8. On the FBX Animation Import SOP, set FBX File to the animation you want to retarget onto the character.

  9. On the Biped Retarget SOP, enter the viewer state and make any necessary adjustments to the source and target skeleton poses.

  10. Select the APEX Animation from Skeleton SOP, turn on its display flag, and play the animation.

  11. Connect the APEX Animation from Skeleton SOP to an APEX Scene Animate SOP or Motion Mixer SOP to continue editing the animation on the character.

Recipes

The following recipes provide example workflow setups. To put down the recipe, type the recipe name in the TAB menu of the network view, select the recipe, and press Enter in the network view.

APEX AutoRig Fuse Graph

Merges manual graph changes into an APEX rig using the the fuse graph workflow.

APEX Biped

Rigs a biped character given a geometry shape with joint capture weights and a rest skeleton.

APEX Configure Ragdoll

Sets up a character for use in the animate state’s ragdoll tool.

APEX Example Scene

Adds a character, camera, and props to an animation scene.

APEX FBX Biped

Imports and rigs a biped character given an FBX file with a captured shape and rest skeleton.

APEX FBX Character Import

Imports a character FBX with a shape and rest skeleton and bundles it into an APEX character. Downstream, you can create a custom rig for this character using any of the APEX rigging tools.

APEX Retarget to Rig

Transfers animation from a source mocap to a target APEX rig. It combines the biped retargeting workflow with the APEX Animation from Skeleton SOP. See the example above.

APEX SetDrivenKey

Adds an APEX Rig Pose SOP to generate rig-specific animations that can be controlled with the companion set driven keys rig component. This allows you to drive animation with dedicated driver controls. For a step-by-step walkthrough, see working with set driven keys.

Render a character

In this example, we bring Electra into Solaris (LOPs):

  1. We have the following SOP network:

    SOP network
  2. On the Electra SOP, set Output to APEX Scene.

  3. On the APEX Scene Invoke SOP, set Output to Unpacked Geometry so the materials are exported.

  4. The Output SOP ensures that changing the display flag doesn’t affect what is exported.

  5. Switch to the stage to import Electra into Solaris:

    • At the top of the network editor, click obj, which brings you to the object level.

    • Click obj again and select stage.

    We have the following LOP network:

    LOP network
  6. On the Scene Import LOP, set Objects to the object-level node that contains the SOP network. Alternatively, you could set Objects to *, which also imports any object-level cameras and lights you have.

    Note

    Turn on the display flag for the object-level node that contains the SOP network, otherwise the character won’t display in the viewport when importing into Solaris.

How-to

To...Do this

Save a scene to a file

  1. Connect a node that contains the scene (APEX Scene Add Character SOP, APEX Scene Add Animation SOP, APEX Scene Animate SOP) to a ROP Geometry Output SOP.

  2. On the ROP Geometry Output SOP, Output File parameter, specify the name of the file to save the scene to.

  3. Click Save to Disk.

Use a scene file

  1. Put a File SOP in the network editor.

  2. On the File SOP, specify the scene file in Geometry File.

  3. Select the File SOP and click Animate on the left toolbar to enter the animate state. An APEX Scene Animate SOP will be automatically placed after the File SOP.

KineFX

Overview

Preparing character elements

Rigging with APEX graphs

  • APEX graph basics

    Introduction to the APEX graph evaluation framework.

  • APEX graph debugger

    Inspect the values of an APEX graph’s ports within the APEX network view.

  • APEX Script basics for graph building

    An overview of APEX Script, a code interface for building APEX graphs.

  • Graphs for numerical operations

    Example graphs of numerical operations like adding two values, fetching multiple results, and retrieving information from geometry.

  • Graphs for viewport animation

    Example graphs of animate state functionality like creating controls and constraints, and defining joint hierarchies.

  • Graphs for deforming geometry

    Example of a SOP network and APEX graph for deforming a 3-joint tube geometry.

  • Graph metadata

    Information added to graph nodes and ports.

  • APEX path pattern

    A set of rules that allow you to filter and select elements within graphs, skeletons, geometry, and the character folder structure.

  • APEX graph nodes

    APEX nodes provide operations for building up the functionality of APEX graphs, which are used in KineFX to create character rigs and perform other geometry manipulation.

  • APEX updates for H22

    New and updated APEX graph nodes for Houdini 22.

Building rig graphs with APEX Script

Rigging with rig components

Animating in the viewport

  • Animation workflow

    Example networks of adding characters, props, characters, and animation to a scene.

  • Animating in LOPs

    Rig and animate characters and props in the context of a USD stage.

  • Working in the animate state

    Select and manipulate controls, define transform limits for controls, and add skin controls to a character.

  • Animate state menus and HUDs

    Menus, HUDs, toolbars, and options in the animate state.

  • Animate state hotkeys

    Hotkeys available in the animate state.

  • Posing

    Pose characters in the animation scene by using locators, copying and pasting controls, and mirroring poses.

  • Motion paths

    Visualize the motion of controls as curves in 3D space.

  • Constraints

    Create relationships between controls in the animate state.

  • Dynamic motion

    Add physically-accurate projectile motion to your animation in the animate state.

  • Ragdoll

    Add a ragdoll simulation to your animation in the animate state.

  • Full body IK

    Apply full body inverse kinematics to pose the character using high-level targets rather than manipulating individual joints.

  • Secondary motion

    Add physically-accurate effects like lag/overshoot, jiggle, and spring to your animation in the animate state.

  • Control selection sets

    A tree view of controls, selections, and selection sets for the animate state. Allows management of control selection and visibility.

  • Motion mixer

    Combine and edit the animation clips of multiple characters in a timeline-based view.

  • Character picker

    Create a 2D layout with simple buttons for selecting character controls in an animation scene.

  • Animation catalog

    Save, manage, and apply animations and single-frame poses to an animation scene.

  • Animation layers

    Create multiple layers of animation without affecting the original animation.

  • Animation toolbar

    A customizable toolbar consisting of simple slider tools that quickly apply modifications to animation controls and curves.

  • Animation bookmarks

    Frame markers that help organize and identify the different parts of your animation.

Customizing the animate state

SOP-based animation

  • Physics-based motion

    Add physically-accurate motion to your animation using the Projectile Motion and Pendulum Motion SOPs.

  • Ragdoll simulations

    Add a ragdoll simulation to your animation using the Ragdoll Solver SOP.

Deformation

  • Blend shapes

    Create blend shapes using blend shape SOP nodes.

Animation retargeting

Pre-H20

Panes

  • Motion mixer

    A timeline-based view of the animation clips and motion effects of multiple characters.

  • Character picker

    Create a 2D layout with simple buttons to select character controls in an animation scene.

  • Rig tree view

    A hierarchical view of character components, including packed character folders, KineFX rigs, and Object node rigs.

  • Animation editor

    View and edit animated parameters and their transitions between keyframes.

  • Geometry spreadsheet

    Displays details about the geometry selected in the network editor.

Appendix