On this page |
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:
-
FK rig hierarchy based on Electra’s skeleton joint hierarchy
-
Bone deform
-
Add root and cog controls
-
Spine logic
-
IK logic
-
IK/FK blend
-
Reverse foot
-
Lookat
-
Configure the look of Electra’s controls
The following sections on this page provide step-by-step instructions for building up the final network shown below:
Setup ¶
-
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.
-
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:
-
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 toBase
, and Type toshp
). (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 toBase
, and Type toskel
). -
The third input is the guide skeleton - Electra’s base skeleton with the added tags. We name this guide skeleton
Guides.skel
(set Name toGuides
, and Type toskel
).
-
-
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:
-
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
-
-
The APEX Autorig Component SOP,
bonedeform
, is the bonedeform rig component, which adds bone deformation logic to the rig graph. On thebonedeform
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. -
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:
-
-
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.
-
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. -
The APEX Autorig Component SOP,
add_controls
, adds the root and cog controls to Electra. On theadd_controls
node, set the Component parameter to transformdriver. -
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.
-
-
Click beside setups to add another control.
-
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 thepelvis
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 thePelvis
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.
-
-
View the new controls in the animate state:
Spine ¶
We now add spine logic to the Electra rig using the spline rig component:
-
On the Attribute Adjust Array SOP, we add
Spine
tags on the spine joints. These tags are picked up by the spline rig component. -
The APEX Autorig Component SOP,
spine
, adds spline functionality to Electra. On thespine
node, set the Component parameter to spline. -
In the Driven tab, set driven to
%tag(Spine)
. -
Remove the entries in the segments, root, and tip parameters because we only have one spline segment.
-
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).
-
-
View the spine functionality in the animate state:
IK ¶
We now add IK functionality for the arms and legs using the multiik rig component:
-
On the Attribute Adjust Array SOP, we add tags for the arms and legs -
L_Arm
,R_Arm
,L_Leg
, andR_Leg
. These tags are picked up by the multiik rig component. -
The APEX Autorig Component SOP,
ik
, adds IK functionality to Electra. On theik
node, set the Component parameter to multiik. -
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. -
In the Parents tab, set tipparent to
Cog
. If povectorparent is empty, the pole vector is parented to the tip. -
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:
-
The APEX Autorig Component SOP,
ikfkblend
, adds IK/FK blend functionality to Electra. On theikfkblend
node, set the Component parameter to ikfkblend. -
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
. -
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:
-
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: -
On the APEX Autorig Component SOP,
reverse_foot
, set the Component parameter to reversefoot. -
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, whereik_tip
is a tag that was added by the multiik rig component upstream (in the Tags tab, tagtarget parameter).
-
-
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:
-
Add toe joints using a Rig Attribute VOP SOP. See adding extra joints for more information:
-
In the Rig Attribute VOP SOP, use Electra’s
ball_l
andball_r
joints as a reference for creating the toe joints: -
Set the positions of the toe joint by adjusting the Translate parameter on the Offset Transform VOPs.
-
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 totoe_r
: -
On the Attribute Adjust Array SOP, add tags for the toe joints -
Toe
,R_Foot
, andL_Foot
: -
On the
reverse_foot
APEX Autorig Component SOP, Driven tab, set toe to%tag(Toe)
. -
In the Settings tab, adjust the toeoffset and toecontroloffset as necessary.
Look at ¶
We now add lookat functionality using the lookat rig component:
-
On the Attribute Adjust Array SOP, add a tag for the head. This tag is picked up by the lookat rig component.
-
On the APEX Autorig Component SOP,
lookat
, set the Component parameter to lookat. -
In the Driven tab, set driven to
%tag(Head)
. This is the joint that is driven by the lookat control. -
Set the position of the target control - in the Settings tab, turn on worldspace, and set the targetpos.
-
Set the position of the up control - in the Settings tab, set the updir.
-
Set the names for the head, target, and up controls in the Driven tab. We set driver to
head_driver
, target tohead_target
, and up tohead_up
. -
Set the scale and color of the controls in the Shape tab:
-
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:
-
On the APEX Configure Controls SOP, add configurations for different groups of controls by clicking beside Control Configs.
-
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.
-
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:
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:
-
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: -
On the APEX Autorig Component SOP,
fk
, remove all the entries for tpromotegroup, rpromotegroup, and spromotegroup in the Controls tab. -
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 withfbik
drive the full-body IK behavior. -
View the full-body IK behavior in the animate state: