Houdini 20.5 Character KineFX

Rigging a character using rig components

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.

On this page, we use pre-built rig components to build a rig for the Electra test geometry. The following pieces of rig logic are added to construct the final rig:

The following sections on this page provide step-by-step instructions for building up the final network shown below:

Setup

  1. On the Electra SOP, set the Output parameter to Skin Surface. This outputs Electra’s shape as its 1st output, and Electra’s skeleton as its 2nd output.

  2. The Attribute Adjust Array SOP is used to add tags to Electra’s base skeleton, creating a guide skeleton that is used downstream by various rig components. On the Attribute Adjust Array SOP, set Attribute Class to Point, and Array Type to String.

    As we build up Electra’s rig, we add tags along the way. The subsequent sections on this page describe when each of the tags are added to the guide skeleton. The image below shows the full set of tags on Electra once we have finished building the rig:

  3. The Pack Folder SOP adds the following character elements to a packed folder structure:

    • The first input to the Pack Folder SOP is the rest skin used for deformation. We name this geometry Base.shp (set Name to Base, and Type to shp). (The Name and Type parameters are listed in the order of the Pack Folder SOP inputs.)

    • The second input is Electra’s skeleton. We name this skeleton Base.skel (set Name to Base, and Type to skel).

    • The third input is the guide skeleton - Electra’s base skeleton with the added tags. We name this guide skeleton Guides.skel (set Name to Guides, and Type to skel).

  4. Select the Pack Folder SOP and view the packed folder hierarchy in the rig tree view. In the rig tree view, set Type to Packed Folders:

    /
    -- Base.shp
    -- Base.skel
    -- Guides.skel
    

FK and bone deform

We now create an FK rig for Electra, and add bone deform logic to view the FK functionality on the character:

  1. The APEX Autorig Component SOP, fk, is the fktransform rig component, which creates a rig graph by translating Electra’s skeleton into a rig hierarchy; it takes each of the skeleton joints and creates a TransformObject node in the rig graph. You can see the TransformObject nodes in the APEX network view.

    • On the fk node, set the Component parameter to fktransform.

    • By default, the rig created by the fktransform component is named Base.rig (specified in the Rig section, Name parameter).

    • In the Source tab, the skeleton parameter specifies the skeleton to use to create the rig hierarchy. It is set to Guides.skel by default, which matches the name of our guide skeleton in the packed folder structure.

    • The fktransform component adds the rig graph to the packed folder structure. Select the fk node and view the packed folder hierarchy in the rig tree view:

      /
      -- Base.rig
      -- Base.shp
      -- Base.skel
      -- Guides.skel
      
  2. The APEX Autorig Component SOP, bonedeform, is the bonedeform rig component, which adds bone deformation logic to the rig graph. On the bonedeform node, set the Component parameter to bonedeform. The default values in the restgeo, restskeleton, and outputgeo parameters match the names of the character elements in the packed folder structure.

  3. Perform FK posing on Electra in the animate state:

    • Select the bonedeform node and turn on its display flag.

    • Click Animate on the left toolbar or press Enter in the viewport:

      Electra with FK behavior
  4. To build the rest of the rig, we don’t need all the joints available as FK controls, so in the fk node, Controls tab, remove all the entries in the tpromotegroup, rpromotegroup, and spromotegroup parameters.

Add root and cog controls

We now add root and cog controls to the Electra rig using the transformdriver rig component. The root control sits at the skeleton’s root joint, and the cog control sits at the skeleton’s pelvis joint. The cog control is used later as the parent of the spine joint chain.

  1. On the Attribute Adjust Array SOP, add a tag for the pelvis (see setup for the placement of the tag). The pelvis tag is picked up by the transformdriver rig component. See preparing skeletons for more information on creating tags.

  2. The APEX Autorig Component SOP, add_controls, adds the root and cog controls to Electra. On the add_controls node, set the Component parameter to transformdriver.

  3. Set the following for the root control:

    • In the Driven tab, set driventransforms to root. This is the joint that is driven by the new control.

    • In the Control tab, set driver to the name of the new root control. In our example, we set driver to Main.

    • Set driverguide to root. This places the new control at the root joint.

    • Change the control shape in the Shape tab.

  4. Click beside setups to add another control.

  5. Set the following for the cog control:

    • In the Settings tab, turn on use_t and use_r.

    • In the Driven tab, set driventransforms to pelvis because we want the cog control to drive the pelvis joint. The driventransforms parameter also accepts APEX path patterns, so you can specify groups of joints with the %tag() syntax, for example, %tag(Pelvis).

      Note

      Tags are case-sensitive. In the Electra rig, the pelvis TransformObject node is all lower case. When adding tags, we had capitalized the Pelvis tag.

    • In the Control tab, we set driver to Cog.

    • We want the cog control to be placed at the pelvis joint, so set driverguide to pelvis or %tag(Pelvis).

    • Set the parent of the cog control to be the main control, so set driverparent to Main.

    • Turn on makecontrol, promotet, and promoter.

    • Change the control shape in the Shape tab.

  6. View the new controls in the animate state:

    Electra with root and cog controls

Spine

We now add spine logic to the Electra rig using the spline rig component:

  1. On the Attribute Adjust Array SOP, we add Spine tags on the spine joints. These tags are picked up by the spline rig component.

  2. The APEX Autorig Component SOP, spine, adds spline functionality to Electra. On the spine node, set the Component parameter to spline.

  3. In the Driven tab, set driven to %tag(Spine).

  4. Remove the entries in the segments, root, and tip parameters because we only have one spline segment.

  5. Set the parents of the spine controls in the Parents tab:

    • Set rootparent and tipparent to the Cog control we previous added.

    • Set cvparent to root_ctrl, which is the default name of the root of the spine chain (set in the Driver tab, rootname parameter).

  6. View the spine functionality in the animate state:

IK

We now add IK functionality for the arms and legs using the multiik rig component:

  1. On the Attribute Adjust Array SOP, we add tags for the arms and legs - L_Arm, R_Arm, L_Leg, and R_Leg. These tags are picked up by the multiik rig component.

  2. The APEX Autorig Component SOP, ik, adds IK functionality to Electra. On the ik node, set the Component parameter to multiik.

  3. In the Driven tab, set segments to the tags we want to add IK to. In our example, we set segments to *Arm *Leg.

    Note

    The segments parameter does not take APEX path patterns, for example, the %tag() function. Instead, specify the tag names directly in this field.

  4. In the Parents tab, set tipparent to Cog. If povectorparent is empty, the pole vector is parented to the tip.

  5. View the IK behavior in the animate state:

IK/FK blend

We now add functionality to blend between IK and FK for the arms and legs using the ikfkblend rig component:

  1. The APEX Autorig Component SOP, ikfkblend, adds IK/FK blend functionality to Electra. On the ikfkblend node, set the Component parameter to ikfkblend.

  2. In the Driven tab, set segments to the tags we want to add IK/FK blending to. In our example, we set segments to *Arm *Leg.

  3. View the IK/FK blend behavior in the animate state:

    Note

    If Use Click and Drag in the handle parameters is turned off, you need to select the abstract control first, then drag to see the effect of the IK/FK blend. If Use Click and Drag is turned on, you can click and drag the abstract control in one step.

Reverse foot

We now add reverse foot functionality using the reversefoot rig component:

  1. On the Attribute Adjust Array SOP, we add tags for the foot (L_Foot, R_Foot), ball joints (Ball), and ankle joints (Ankle). These tags are picked up by the reversefoot rig component:

  2. On the APEX Autorig Component SOP, reverse_foot, set the Component parameter to reversefoot.

  3. In the Driven tab:

    • Set segments to *Foot.

    • By default, ankle is set to %tag(Ankle), and ball is set to %tag(Ball). These match the tag names we added to our skeleton.

    • The ikdriven parameter is set to %tag(ik_tip) by default, where ik_tip is a tag that was added by the multiik rig component upstream (in the Tags tab, tagtarget parameter).

  4. View the reverse foot behavior in the animate state:

Adding toe joints

Electra’s skeleton does not have toe joints, but the reversefoot component automatically creates a toe for its own purposes, so you don’t need to specify anything in the Driven tab, toe parameter. If you want to add your own toe joints:

  1. Add toe joints using a Rig Attribute VOP SOP. See adding extra joints for more information:

  2. In the Rig Attribute VOP SOP, use Electra’s ball_l and ball_r joints as a reference for creating the toe joints:

    Add toe joints in the Rig Attribute VOP SOP
  3. Set the positions of the toe joint by adjusting the Translate parameter on the Offset Transform VOPs.

  4. On the Add Joint VOP for the left toe, set Name to toe_l. Similarly, set the Name parameter for the right Add Joint VOP to toe_r:

    Added toe joints
  5. On the Attribute Adjust Array SOP, add tags for the toe joints - Toe, R_Foot, and L_Foot:

  6. On the reverse_foot APEX Autorig Component SOP, Driven tab, set toe to %tag(Toe).

  7. In the Settings tab, adjust the toeoffset and toecontroloffset as necessary.

Look at

We now add lookat functionality using the lookat rig component:

  1. On the Attribute Adjust Array SOP, add a tag for the head. This tag is picked up by the lookat rig component.

  2. On the APEX Autorig Component SOP, lookat, set the Component parameter to lookat.

  3. In the Driven tab, set driven to %tag(Head). This is the joint that is driven by the lookat control.

  4. Set the position of the target control - in the Settings tab, turn on worldspace, and set the targetpos.

  5. Set the position of the up control - in the Settings tab, set the updir.

  6. Set the names for the head, target, and up controls in the Driven tab. We set driver to head_driver, target to head_target, and up to head_up.

  7. Set the scale and color of the controls in the Shape tab:

  8. View the look at behavior in the animate state:

Configure controls

Use the APEX Configure Controls SOP to configure the shapes and colors of the controls:

  1. On the APEX Configure Controls SOP, add configurations for different groups of controls by clicking beside Control Configs.

  2. Specify the controls to configure - in the Control Group parameter, choose from the drop-down list or use the APEX path pattern syntax to specify groups of TransformObject nodes.

  3. For each group of controls in the Control Configs multiparm, turn on the Use Shape Override, Use Shapeoffset, and Use Color parameters, and specify the desired control shape, size, and color.

    After configuring the controls, we are finished building the rig for Electra:

    Before (left) and after (right) configuring controls

Add Electra to an animation scene

Add Electra to an animation scene using the APEX Scene Add Character SOP and APEX Scene Animate SOP. See animation workflow for more information.

Full-body IK

In this example, we add full-body IK to Electra using the fbik rig component:

  1. On the Attribute Adjust Array SOP, add the tag, fbik, to joints like the feet, pelvis, wrists, and neck. This tag is picked up by the fbik rig component:

  2. On the APEX Autorig Component SOP, fk, remove all the entries for tpromotegroup, rpromotegroup, and spromotegroup in the Controls tab.

  3. On the APEX Autorig Component SOP, fbik, set the Component parameter to fbik. By default, the drivers parameter in the Drivers tab is set to %tag(fbik), so the joints tagged with fbik drive the full-body IK behavior.

  4. View the full-body IK behavior in the animate state:

KineFX

Overview

Preparing character elements

Rigging with APEX graphs

Building rig graphs with APEX Script

Rigging with rig components

Animating in the viewport

SOP-based animation

Deformation

Animation retargeting

Pre-H20

Panes

Appendix