Houdini 22.0 Character KineFX

Graphs for deforming geometry

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

On this page

This page gives an example of a SOP network and graph rig logic for deforming a 3-joint tube geometry.

SOP network

The SOP network below takes us from character elements to the animation environment:

Bone deform network
  1. The character elements are prepared by creating the skeleton, tube geometry, and capture weights on the geometry.

  2. The rig logic lives in the APEX Graph SOP.

  3. The Pack Folder SOP assembles the character elements into a character, and the APEX Scene Add Character SOP adds the character to an animation scene. See assembling animation data for more information.

  4. The animation scene is input into the APEX Scene Animate SOP, where Houdini’s animation environment lives.

Rig logic

The graph below displays the rig logic in the APEX Graph SOP for deforming a 3-joint tube geometry:

Bone deform rig logic

FK hierarchy

The three TransformObject (green) nodes establish a 3-joint FK hierarchy, with joint_0 as the parent of joint_1, which is the parent of joint_2. The world transforms of the joint_0, joint_1, and joint_2 TransformObject nodes are piped into the skel::SetPointTransforms node, which updates the joints on the skeleton. The output of skel::SetPointTransforms is the animated skeleton, which goes into the sop::bonedeform node.

skel::SetPointTransforms

skel::SetPointTransforms is a skeleton deformer. It takes in transforms and applies them to skeleton joints. It is a special node in that the subports names of the transforms variadic input is important because they map to the joint names on the input skeleton (geo input). For example, changes to the transforms going into the joint_0 subport will update joint_0 on the skeleton.

Important

For this reason, you need to update the subport names on skel::SetPointTransforms to match the joint names on the skeleton (rename subports by clicking the subport name).

Relationship between the skeleton joint name and skel::SetPointTransforms subport name

Note

The names of the TransformObject nodes do not need to match the skeleton joint names unless you want to update the rest positions of the rig hierarchy from a skeleton using the Update Rest Transforms From Skeleton button on the APEX Graph SOP (see the how-to for information on how to do this).

In our example, the joint names on the skeleton were renamed from the default point_0, point_1, and point_2 to joint_0, joint_1, and joint_2. To rename the joints in the Skeleton SOP:

  1. Select the Skeleton SOP and enter its viewer state (press Enter over the viewport).

  2. On the viewer state toolbar, set the Mode to Modify (or press F over the viewport).

  3. Click each point on the skeleton and rename the joint in the Name field on the viewer state toolbar.

Value node

The rest skeleton is used as a reference for performing geometry deformation. The difference between the transforms of the rest and animated skeleton are calculated, and this difference is used to detemine how the geometry is deformed. skel::SetPointTransforms performs an in-place change of the geometry that is piped in, so we need to use a Value<Geometry> node to make a copy of the rest skeleton before it is piped into skel::SetPointTransforms. If this copy is not created, skel::SetPointTransforms will update the rest skeleton; the rest and animated skeletons will be the same, and no difference transforms will be applied to the geometry deformation.

Bone deformation

The first three inputs of the sop::bonedeform graph node correspond to the three inputs of the Bone Deform SOP.

View geometry deformation

View the geometry deformation in the animate state:

  1. Select the APEX Scene Animate SOP in the network editor and turn on its display flag.

  2. Click Animate on the left toolbar.

Note

If the geometry in the animate state looks mangled, it could be that the rest transforms in the rig graph are not set properly. To set the rest transforms based on the skeleton:

  1. Make sure the names of the TransformObject nodes match the names of the skeleton joints.

  2. Select the APEX Graph SOP in the network editor.

  3. Click Update Rest Transforms From Skeleton in the parameter editor.

  4. When the dialog comes up, select the Skeleton SOP in the network editor, which automatically selects the Skeleton node in the dialog.

  5. Click Accept.

  6. Select the APEX Scene Animate SOP and click Reset All.

  7. Enter the animate state.

How-to

To...Do this

Create a rig hierarchy that corresponds to a skeleton

Use the Import KineFX Skeleton button on the APEX Graph SOP.

Update the rest positions of the rig hierarchy from a skeleton

  1. On the APEX Graph SOP, under the Rigging Scripts section of the parameters, click Update Rest Transforms From Skeleton.

    Note

    For this script to run properly, the TransformObject node names must match the skeleton joint names.

  2. When the dialog comes up, select the Skeleton SOP in your network and click Accept. The restlocal parameters on the TransformObject nodes will be updated (select the TransformObject node and press P to bring up the node parameter window to see the updated values).

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