Houdini 22.0 Character KineFX

Working with time

Set global time values as inputs to a character’s rig graph.

On this page

When an APEX scene is invoked (using an APEX Scene Animate SOP or APEX Scene Invoke SOP), it automatically sets various global time values as inputs to the character’s rig graph. The available time parameters are:

Frame value controls the position of a box

In this example, we build a graph that uses the current frame to control the position of a box:

Control the position of a box using the current frame
  1. In the network editor, put down an APEX Graph SOP. Select the APEX Graph SOP and go to the APEX network view.

  2. In the APEX network view, create an input frame parameter on the graph - click the graph input node (parms) and select Globals ▸ Frame. This is the same as putting down a Frame node. When the graph is executed, the FRAME port is set to the current frame ($FF). (Note that if you click a port, it brings up a different menu.)

    Add a frame parameter to the graph
  3. If you change a graph’s input value from its default, it will appear in the geometry spreadsheet:

    • Select the graph input node, open the node parameter window (press P over the APEX network view), and change the value of FRAME.

    • In the geometry spreadsheet, click Detail on the top toolbar. The graph’s input parameters are stored in the parms detail attribute on the graph.

  4. Build the rest of the graph to take the frame input and set it as the translate component of the box. The geo::Transform node changes the position of the box (see graphs for viewport animation for another example):

    Graph to move a box using the frame input
  5. Execute the graph using an APEX Invoke Graph SOP:

    Execute the graph
  6. We want to fetch the box geometry on the graph’s output node, so on the APEX Invoke Graph SOP:

    • Turn on Bind Output Geometry and set its value to output:geo (<name_of_output_node>:<geometry_on_output_node>).

    • Turn on the display flag on the APEX Invoke Graph SOP to see the box in the viewport.

  7. As you adjust the value of FRAME on the graph input node, the box moves in the viewport.

    Frame value affects the position of the box

Set time parameters using an APEX Invoke Graph SOP

If the graph has an input port with a time parameter, the APEX Invoke Graph SOP can be used to set the value of that parameter. For example, if a graph input node has a FRAME port, you can use the APEX Invoke Graph SOP to change the frame value:

  1. Use the network from the previous example.

  2. On the APEX Invoke Graph SOP, turn on Time Bindings.

  3. In the Time Bindings section, the Frame parameter is set to the current frame $FF, so if you scrub the timeline, the x-position of the box changes.

Note

The time parameters in the Time Bindings section only take effect if there is a corresponding port on the graph input node. For example, if the graph has an input port named FRAME, the value from the Frame parameter sets the value of the FRAME port.

Create a custom parameter name

Each time parameter has a default name. For example, the default parameter name for frame is FRAME. This is the name of the port on the graph input node when you put down a Frame node or click the graph input node and select Globals ▸ Frame. You can change this default name by renaming the port on the graph input node, then adding the following detail property to the graph:

"<time_parameter>_input" : "<custom_name>"

In this example, we change the name of the frame parameter from FRAME to my_current_frame:

Network to add a graph property
  1. Use the same graph as the previous example. In the APEX network view, rename the FRAME port on the graph input node by ⌃ Ctrl + clicking the FRAME port and setting the name to my_current_frame.

  2. The graph property frame_input sets the input port that stores the current frame. We use an Attribute Adjust Dictionary SOP to add the following property to the graph:

    "frame_input" : "my_current_frame"

    On the Attribute Adjust Dictionary SOP:

    • Set Attribute Name to properties and Attribute Class to Detail.

    • In the Number of Entries multiparm entry, set Key to frame_input, Type to String, and Value to my_current_frame.

  3. On the APEX Invoke Graph SOP, turn on Time Bindings. If the Frame parameter is turned on, the current frame is picked up from the port specified by the frame_input property (my_current_frame).

  4. Fetch the output box geometry - on the APEX Invoke Graph SOP:

    • Turn on Bind Output Geometry and set its value to output:geo.

    • Turn on the display flag on the APEX Invoke Graph SOP to see the box in the viewport.

    • As you scrub the timeline, the x-position of the box changes.

Time properties

You can use the following graph properties to set a custom name for the time parameters on the graph input node. See the graph metadata page for descriptions of these properties:

Time Parameter

Graph Property

Default Name

Current frames per second

fps_input

FPS

Current frame

frame_input

FRAME

Global start frame

framestart_input

FRAMESTART

Global end frame

frameend_input

FRAMEEND

Current time

time_input

TIME

Current time step

timestep_input

TIMESTEP

How-to

To...Do this

Create time parameters on the graph

In the APEX network view, click a graph input node and select one of the time parameters from Globals.

or

Put down one of the following time parameter nodes:

  • Fps for the current frames per second.

  • Frame for the current frame.

  • FrameStart for the global start frame.

  • FrameEnd for the global end frame.

  • Time for the current time.

  • TimeStep for the current time step.

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