Introduction to Inverse Kinematics


Inverse Kinematics behavior is controlled by IK handles, which manipulate a user-selected part of a skeleton. You can create an IK handle on any part of a skeleton-on an arm, for example-and use the IK handle to affect only that part of the skeleton without disturbing the rest of the skeleton.

As of Version 7.5, there was no longer a separate IK drag operation for skeletons. Also, because you create the handle for only the part of the skeleton you want to move, there was no longer a need for "anchors".

To move an arm, for example, pick the handle and use the Move tool.

The Single-Chain Solver

With the single-chain solver, you can set up character motion very quickly, and adjust this motion in a highly visual way.

Unique / no Run IK

For more information on multi-chain solvers, see Using Multi-Chain IK Handles on page 254

With the multi-chain IK solver, skeletons have a non-unique behavior; that is, the motion of joints can change unpredictably, depending on whether you play back the animation, do a viewframe, move a constraint, or undo on a transformation. The solution to this problem is to do a separate, non-interactive operation to "bake" the skeleton motion using the Run IK tool. (To render a Multi-Chain Solution, you must use Run IK before writing out the SDL file.)

With the single-chain solver, the solution is unique, which means that the behavior of the skeleton is the same whether the animation is played forward or backward, whether a constraint/handle is moved away and back, and so on. Therefore, you can interactively move and play back your skeleton motion, and render, without needing to use Run IK.

Rest Pose

The rest pose is a reference position for the skeleton, generally a "neutral" pose for the chain. By setting a rest pose for a skeleton (in the menu, select Edit > Rest pose > Set rest pose), you can return to this pose at any time (by selecting Edit > Rest pose > Assume rest pose). There is no need to set a keyframe for this pose; the single-chain IK solver uses the rest pose as a seed position to solve for the skeleton position when a handle/constraint is moved or animated. The behavior of a skeleton chain, therefore, is highly dependent on the rest pose you choose for it.

Non-Overlapping Handles

With the single-chain solver, you can put only one handle on each part of a skeleton. For example, one handle for each arm (shoulder to wrist), one handle on each finger (first knuckle to fingertip), etc. This is very different than the multi-chain IK, in which handles can share joints, and generally overlap considerably.

IK Terminology

When you apply a single-chain handle to a skeleton chain, a number of new visual icons and terms come into play.

  • Root Joint - The topmost joint in a skeleton hierarchy controlled by a given handle (such as the shoulder joint for a handle controlling an arm).
  • End Effector - The bottom-most joint in the hierarchy controlled by the handle (for example, a wrist joint).
  • IK Handle - The object that controls the skeleton chain. In the modeling window, the handle consists of a Goal, a Limb Axis, a Plane indicator and a Pole. See the following diagram and descriptions.
>
Note: In the default Translation Only setting for the IK Handle, only the Goal and Limb Axis are visible.

This figure shows an IK chain with a single-chain IK handle.

  • Goal - The part of the handle that determines the position of the chain's end effector, represented by the diagonal Y icon.
  • Limb Axis - The imaginary line between the root joint and the end effector.
  • Plane Indicator - In the modeling window, this is the small pointer icon placed at the root joint. Together with the Limb Axis, this indicator shows the orientation of the plane which contains the skeleton chain.
Using the rotation of the IK handle, you can rotate this plane, together with the chain, around the Limb Axis. See the diagram above.
>
Note: The Plane Indicator is visible only with the Plane Rotation or Plane/Pole Rotation settings for the IK Handle.
  • Pole Axis - With the single-chain IK, there is a Pole Axis, which the chain depends on for its orientation. If you move the handle so that the Limb Axis crosses this Pole Axis, the chain will "flip" by 180 degrees. As a result, it is sometimes useful to adjust the Pole's orientation so the Limb Axis does not cross the Pole Axis for a given shot using the chain.
The Pole Axis is shown in the modeling window by a line segment with an "up" arrow at its tip, and a projection of this Pole Axis is shown as a dashed line segment drawn to the Plane Indicator's rotation disc.
>
Note: The Pole Axis is visible only with the advanced-level "Plane/Pole Rotation" setting for the IK Handle.

Using Single-Chain IK Handles

Objects > Add IK handle

For more information about this tool, see Objects > Add IK handle on page 284.

This is a continuous-action tool in which you add IK handles one at a time to a skeleton. To add single-chain handles, select Single-chain in the option box for this tool. Then, select the root joint, and finally the end effector joint. The tool is still active after this operation, so you can continue to select other parts of the skeleton to put other IK handles on.

>
Note: This tool lets you select the root and end-effector joints by drawing a pick-box around them (click the mouse down and drag a box around the desired joint).

Information Window (Single-chain IK handles)

To access the Information window, use Windows > Information Window.

When an IK handle is picked, the information about that handle is shown in the IK Handle section of the Information window.

Name

The name of the IK handle. You can edit this field.

Bounding Box

Turns off the display of the IK handle's bounding box.

Invisible

Turns off the display of the IK handle.

Layer

The layer of the IK handle. You can edit this field.

Translate

The handle's translation coordinates. These are the only editable coordinates at this time because under Control type, TRANSLATION ONLY is chosen. The rotation and scale are not used to control the handle's behavior.

Rotate Pivot

The handle's rotation pivot coordinates.

Local Axes

The handle's local axes coordinates.

Scale Pivot

The handle's scaling pivot coordinates.

Bounding Box Min/Max

The limits placed on the handles's bounding box, which is made up of the Limb axis and Plane indicator.

Handle Type

The type of the IK handle: single, multi, or spline.

On/Off

Click these buttons to turn the IK handle on or off. When the handle is turned off, it is still visible but has no effect on the IK chain. To hide it completely, click Invisible at the top of the IK handle section.

root

The top-most joint in the skeleton hierarchy affected by the IK handle.

end-effector

The bottom-most joint in the skeleton hierarchy affected by the IK handle.

Control type

A single-chain IK handle has three levels of control accessed from the Control type pop-up menu.
    • TRANSLATION ONLY - this is the default control setting, suitable for most basic IK use. TRANSLATION ONLY means that you can only move or animate the IK handle's translation channels.
    • PLANE ROTATION - this setting gives you more in-depth control of the IK handle. It lets you rotate the skeleton plane, the plane in which the joints contained in the IK handle lie (if all the joints of the IK handle do not lie in one plane, a "best" fit plane is chosen). When you choose this option, you can rotate the IK handle using the value in the Plane rotate box, letting you re-orient the plane indicator, and subsequently the skeleton plane, to create more complex motion in the chain.

You can also control the rotation of the plane axis by picking the IK handle and using the left mouse button with the Rotate tool (Xform > Rotate).

A new set of options appear when you pick the PLANE/ POLE ROTATION control type.

    • PLANE/POLE ROTATION - this setting provides advanced, specialized control of the IK handle. In some cases, the combination of translation and plane rotation might cause the IK solution to flip uncontrollably. Set the two Pole rotate box values to alter the plane of the skeleton, while keeping the pole in the same orientation relative to the skeleton plane.

Use the middle and right mouse buttons to rotate the IK solution's Pole Axis and its projection.

The Pole order field is used to determine which two degrees of freedom are to be used to rotate the Pole Axis. In the earlier example illustrating plane rotation, the skeleton was drawn in the XY plane. Thus the Pole Axis is automatically positioned along the Z-axis (that is, perpendicular to the skeleton plane) when the IK handle is created, and the pole order is ZXY. This means that the Pole Axis is created parallel to the IK handle's Z-axis (and thus given the blue Z-axis color), and its orientation is adjusted by applying a local X rotation, then a Y rotation, to the Pole Axis.

Orientation

The IK handle solution orients itself to a coordinate system in order to work. The coordinate system matches either the joint (LOCAL) or scene (WORLD) orientation.

When to Use the Plane Rotation Setting

If the IK chain never needs to change orientation from its rest position, the default Translation Only setting will be all you need to animate the skeleton. For example, if the legs of a simple biped character in a walk cycle are oriented in a constant direction (that is, the knees always point forward), the IK handles for the legs will only need translation.

However, if that same biped character needs to have a "bow-legged" or "knock-kneed" appearance, or if the character is dancing the Charleston, you will want to rotate the skeleton plane of both legs to achieve this effect. In this case, choose the Plane Rotation setting for those handles in the Information Window, and adjust the Plane Rotate fields accordingly.

Using the Plane/Pole Rotation Setting

You will need to adjust the rotation of the Pole Axis, through the "Plane/Pole Rotation" setting, only if the skeleton chain is to be animated through an extremely wide range of motion in the scene. Specifically, if the limb axis of the chain comes near the Pole Axis, an undesirable "flipping" of the chain may occur; generally, you will want to move/animate the Pole Axis so that the handle's limb axis does not come too close to it during a given scene.

When you create a single-chain IK handle on a chain, a Pole Axis is automatically created and placed perpendicular to the skeleton plane in its rest position. As long as the chain is not contorted very far from this position, and the limb axis of the chain doesn't approach the Pole Axis, this default position of the Pole Axis is suitable for animating the skeleton. Otherwise, adjusting or animating the Pole Axis may be necessary to avoid flipping behavior in the chain.

Complex Single-Chain Example

the following example of two torsos, and how different types of arm movements are achieved through the use of POLE/PLANE ROTATION.

In this example, the two torsos are identical and both have IK handles on the left arms. The default value for Plane rotate is 90 degrees. The default value for Pole rotate Y and Z is zero degrees. The left torso requires a beer-chugging motion, while the right torso will perform a jumping-jack kind of motion.

1
For the beer-chugger, no pole rotation is required, so Pole rotate Y and Pole rotate Z are zero. Plane rotate is kept at 90 degrees.
2
For the jumping-jack torso, change the Plane rotate to zero, the Pole rotate Y to -90 and the Pole rotate Z to zero.
3
With the IK handles picked, use Xform > Move to drag the arms up to simulate a beer-chugging motion.

4
Open the Information window.

5
Continue to move the arms up and try to create the jumping-jack motion for the right torso. At some point, you'll see the left arm "flip" a little, when the arm's limb axis crosses over the Pole axis. The right arm doesn't flip because the Pole Axis points forward, and therefore the arm's limb axis never approaches it.

Using Multi-Chain IK Handles

The multi-chain solver is backward-compatible with the inverse kinematics provided in Version 7.0. Version 7.0 files with skeleton animation have the equivalent multi-chain IK handles added to them when read into Version 9.

Although the single-chain IK solver is suitable for most inverse kinematics needs, you can also use multi-chain IK handles to manipulate skeletons.

For example, if you need a tail that wags back and forth and bends in opposite directions on each side of the swing, you need a multi-chain solver. With the multi-chain solver, skeletons have a non-unique behavior and you need to bake the skeleton motion using the Run IK tool. For more information on how it differs from single-chain solver, see The Single-Chain Solver on page 244.

In some cases, the multi-chain solver can be used to create specialized animations on your skeleton which the single-chain solver may not be able to achieve. For example, if you need a tail that wags back and forth and bends in opposite directions on each side of the swing, you need multi-chain IK handles.

When a multi-chain IK handle is picked, the IK Handle info section in the Information Window has three items not seen with single-chain IK handles:

For information about the other controls, see Information Window (Single- chain IK handles) on page 248

Weight

A numerical value that determines the influence of this handle relative to other handles in the skeleton chain.

Position

When checked on, the handle is used to determine the position of the end-effector of the skeleton.

Orientation

When checked on, the handle is used to determine the orientation of the end-effector's parent joint.

Position Versus Orientation IK Handles

When an IK handle is specified with Position on, moving the IK handle in turn moves the skeleton's end effector, as with single-chain IK behavior.

When an IK handle has been specified with Orientation on, rotating the handle affects the rotation of the parent joint of the end effector. As a result, the bone that points to the end effector has the orientation of the IK handle.

See the diagrams in the margin for an illustration of Position on versus Orientation on.

If both Position and Orientation are specified for a multi-chain IK handle, their behaviors are combined. The end effector moves with the IK handle, and the bone pointing to the end-effector is rotated to match the handle's orientation.

Overlapping Handles

With the multi-chain IK solver, you can overlap IK handles. For example, on an arm, you can place an IK handle from the shoulder to the wrist, and a second handle from the shoulder to the elbow.

By default, overlapping IK handles will have equal influence on the IK chain.

In the following example, if the shoulder-elbow handle is pulled downward at the same time the shoulder-wrist handle is pulled upward, the arm assumes a position that tries to meet both handles equally:

If you prefer one handle's influence to be greater than the other's, you can adjust the handle's weight in the Information window. In this example, if you want the shoulder-elbow IK handle to have only a small influence, you would set the IK handle weight to a small value (for example, 0.1). As a result, the arm skeleton tends to favor the shoulder-wrist handle, as shown below:

Run IK and the Multi-Chain Solver

When you use the multi-chain solver, you need to perform an extra operation to `bake' the IK handle behavior onto the rotations of the skeleton joints (use Animation > RunIK). The effect of this operation is to create keyframe animation directly on the skeleton joints so that the scene can be rendered, or the skeleton's animation can be further refined by editing the keyframes on the joints.

RunIK is optional with single-chain skeletons, but is required when using multi-chain IK handles.

The Spline-Handle Solver

You can use the spline handle to control a piece of skeleton chain. Using the spline handle, the skeleton chain matches a target spline curve. The spline handle makes tail, neck, or snake animation easier. There are four primary purposes of the spline solver:

  • You can match the skeleton chain to the curve. Whenever you change the curve, the skeleton chain will follow the change and continue to match the curve. This allows you to animate the curve or animate the handle and correspondingly animate the skeleton chain.
  • You can position the skeleton chain along the curve.
  • You can roll the skeleton chain.
  • You can twist the skeleton chain.

Baking Animation and Using Motion Blur Compensation

You can have all the constraints deleted after you've baked your animation by selecting the Delete Constraints option on the Bake options window.

There are times when you will want to generate animation curves in place of constraint or expression animation. The Bake plugin provides the equivalent of Run IK for these cases. Bake creates animation curves for them with keyframes at regularly specified intervals that can be seen and edited by hand.

The compensation only applies to animations translated from single-chain or spline IK handles.

If you are going to render an animation with Motion Blur (see Render > Globals for details), you may want to use Motion Blur compensation. The renderer evaluates the animation at a motion blur sample point, interpolating between these values.

Constraint animation is limited to a -180/+180 degree range. If the constraint jumps from -180 to +180, the object doesn't actually move. But, the motion blur sampling reads a value between those degree ranges, and the object appears to flip, even though it shouldn't. With the Motion Blur compensation, extra keyframes are created at the motion blur sample times wherever a flipping problem is detected.

Spline IK Overview

A spline handle is defined on a skeleton chain by a root joint, an end joint, and a target spline curve.

Like single-chain IK handles, spline handles are constraints affecting skeletons. They do not overlap.

When a curve is transformed or animated, the skeleton chain tries to match it. You can also transform or animate the root handle's position or rotation to change the chain's position, rolling it along the curve. Rotating the master handle twists each joint on the chain. If you point-constrain the root joint to an object, the start position of the chain is constrained.

Master and Root Handles

There are two kinds of spline handles.

  • A master handle, like a single-chain IK handle, sits at the end of the chain and defines the chain from the root joint to the end joint. It controls the twist angle of the chain.
  • A root handles controls the positions of the skeleton chain on the spline curve and the rolling angle of the chain. It is a one-joint handle which sits on the root joint defined by the master handle. A root handle controls only the root joint: its position on the spline curve and its rotation along its lower bone. However, the root joint effects the entire chain.

If a master spline handle controls a skeleton chain without a root handle (the root handle may not be created or may have been deleted), the root joint remains fixed, and only the reachable part of the chain follows the spline curve. A tail is a good example; it stays attached to a body, while its end is free to be dragged along a curve. A root handle cannot exist without a master handle.

Note that:

  • You can create several adjacent master handles which share one target spline curve. See the following illustration for an example.

  • There is only one root handle per spline curve, and there can be several master handles. The positions of the master handles are controlled by the root handle. Adjacent master handles can use different target curves.
  • When you delete a master spline handle, you also delete the root handle if it exists. But when you delete a root handle, its master handles are not deleted.

Parameters and Arc Lengths

Spline handles can define positions on a curve either by parameters or by arc-lengths. Both types of measurements use relative percentage values.

The following figure shows points on a spline curve defined by parameters and by arc-lengths. Notice that each point in this figure is represented by four values: an absolute parameter value, a relative percentage parameter value, an absolute arc-length value and a relative percentage arc-length value.

For each spline handle, we can only use relative parameter values and relative arc-length values to define the points or positions.

Rolling the chain

To roll the chain means to rotate the root joint using a lower bone as the rotation axis. Since all lower joints inherit their rotations from upper joints, the rotation on the root joint makes the whole chain roll.

Twisting the chain

To twist the chain means to rotate each joint (except the end) on the chain using each joint's lower bone as the rotation axis. If the master handle has its Twist Root attribute set ON, the twist starts from the root joint; otherwise it starts from the second joint.

See Twist Type in the Information Window section for more information.

There are four different twist-types that you can use to control the spline handle:

Getting Information on Spline Handles

For information on the Information window, see Basic Tools in Alias.

When an IK handle is picked, you can see information about that handle by selecting Windows > Information Window.

Root Handle Information

For information on the other controls, see Information Window (Single-chain IK handles) on page 248.

For root handles, the following additional controls appear in the IK handle section of the Information window:

Target curve

The spline handle's target curve.

Position Type

Spline handles can define positions on a curve either by parameters or by arc-lengths.

Position

You can interactively change the position by holding down the Alt key holding down the left mouse button, and scrolling in the Position field. You can also type values in the Position field.

Roll

You can interactively change the roll degree by holding down the Alt key holding down the left mouse button, and scrolling in the Roll deg field. You can also type a number in the Roll deg field.

Anti Flip

When a spline chain moves along a spiral curve path, it may experience undesirable 180 degree flips or changes of axis. To control this behavior, choose Anti Flip > CURVE_NORMAL or Anti Flip > WORLD_UP. It is set as NONE by default.
If Anti_Flip is set to CURVE_NORMAL or WORLD_UP, you need to set the UP Axis and Front Axis. The two axes must be set to different rotations.
Anti_Flip constrains the root joint's orientation. The defined Front Axis follows the curve's tangent. The Up Axis is perpendicular to the Front Axis.
    • CURVE_NORMAL- the Up Axis follows the curve's normal.
    • WORLD_UP- the Up Axis tries to follow the world's up axis.
Depending on the orientation of the curve path, you may need to try out an anti-flip setup.

Master Handle Information

For information on the other controls, see Information Window (Single-chain IK handles) on page 248.

For a master handle, you can change the twist type and the twist angle from the Information window.

Target curve

The spline handle's target curve.

Twist Type

The master spline-handle solution has four types of control which you can specify from this pop-up menu:

    • Ease-in/out - the joints in the middle twist more than the joints at the two ends.
    • Slow-in/fast-out - the joints near the root twist more than the joints near the end.
    • Fast-in/slow-out - the joints near the root twist less than the joints near the end.
    • Linear - the joints twist equally at each joint.

Twist Root

Set ON to let the twist start from the root joint. Otherwise, the twist starts from the second joint.

Twist

You can set the Twist degree by typing the degree number in this field. You can interactively change the degree value by scrolling using both the Alt key and the left mouse button.




Copyright © 1998, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. Please send questions or comments regarding the documentation to:
[email protected]