Animating with Inverse Kinematics

 
 
 

Inverse kinematics (IK) is an animation method that's more straightforward than FK — you define the goal of the action by positioning the effector of a chain and Softimage calculates how to position the rest of the chain to reach that goal. For example, to bend a leg, you drag the leg's end effector and the rest of the chain follows.

Leg's effector is branch-selected and translated to move leg from standing position to raised. Softimage solves the joint rotations required to reach the goal.

You save a key for the translation of the effector at different times, and Softimage solves the joint rotations, from the root to the effector, based on the effector's position. You can then key the translation of an effector as you would any other object.

To blend IK with FK animation on the same chain, see Blending Between FK and IK Animation.

When to Use Inverse Kinematics

IK makes it simple and fast to move characters, but you often need to tweak the movements later to compensate for any unwanted movements. These problems occur because there is often more than one way for the chain to reach the goal set for it by the effector, or because the effector goes from position to position rather than allowing the bones to rotate in a natural arc as you get with FK. Luckily, there are many tools in Softimage to help you fix these problems, as described in this section.

You can use IK to do the following:

  • You can easily try out different movements. Dragging an effector to reach a goal is intuitive for certain types of movements. Consider how you reach for something: you think about moving your hand to grab the object, not moving your shoulder first and eventually your hand.

  • Quickly animate simple movements, including 2D chains that have a limited range of movement.

  • Set up poses for a chain by positioning the effector, then keying the bone rotations (FK).

Basic Concepts for Inverse Kinematics

There are a number of issues about the way a chain behaves when you invoke IK. Two fundamental concepts you should understand before you start working in IK are a chain's preferred angles and its resolution plane.

Preferred Angles

When you draw a chain, you usually draw it with a bend to be able to predict its behavior when using IK. This bend is called the chain's preferred angle. When you move the effector, Softimage tries to preserve the preferred angle as much as possible. For example, you can prevent a character's elbow from bending unnaturally because bones are prevented from rotating backward against their joints' preferred angles when using IK.

Chain drawn with slight bend to determine its direction of movement when using IK. This state shows the preferred rotation angle for each bone's joint.

As well, having a home state ensures a solution that you can reproduce: whenever the effector comes back to the same place, it always goes to the same chain state.

The preferred angles of a joint are local rotation angles. These angles influence the behavior of the entire chain, depending on the selected IK behavior. For more information on IK behavior, see Choosing How an IK Chain Reaches Its Goal.

  • When using 3D chains, the preferred X, Y, and Z angles of the joints are used, since 3D joints work like ball joints.

  • When using 2D chains, only the preferred Z angle of a joint is used. Each joint is constrained to remain on a single plane and can rotate only around its local Z axis when the effector is moved, except the first joint.

To change the preferred angle, see Changing the Joint's Preferred Angle.

The Chain's Resolution Plane

With 2D chains, the preferred axis of a chain (see Constraining the Preferred Axis of Rotation) is perpendicular to the plane in which Softimage tries to keep the chain when moving the effector in space. This plane is referred to as the general orientation or resolution plane of a chain because it is in the space of this plane that the IK system resolves the joints' rotations to get the effector where you want it.

To get an idea of a resolution plane, extend your arm in front of you and do a biceps curl: as your arm bends, it forms an angle at the elbow. That bend occurs in the plane perpendicular to your body. When you do the biceps curl, that plane (your arm's resolution plane) remains static unless you change it by rotating your shoulder joint.

A

The resolution plane of this skeleton's leg is illustrated here by a gray triangle, connecting the root, the effector, and the knee joint.

B

The resolution plane is defined by the first joint's XY plane, and any joint rotations stay aligned with this plane.

C

When the first joint is rotated, the resolution plane rotates accordingly, and all joint rotations remain on the resolution plane.

The resolution plane of a 2D chain is the plane in which the entire chain lies. This plane corresponds to the local XY plane of the first joint (and all subsequent joints) of a 2D chain.

The general orientation of a 3D chain is also influenced by its preferred rotation axis. However, the joints of a 3D chain do not necessarily lie on the same plane, as do the joints of a 2D chain.

NoteYou can rotate a joint in a 2D chain outside of its resolution plane using FK. However, if you invoke IK the chain will snap back to the resolution plane.

Animating the Effector

The basic way of animating IK is to set keys for the translation of the chain's effector. Translations on effectors of chains created in Softimage are local to the effector's parent (by default, the chain root).

In other words, you can drag the entire hierarchy without the effector wanting to "stick" to the scene's global coordinates. With the default Softimage setup, you don't need to constrain a null to the effector and then animate the null. Of course, you can remove the effector from the hierarchy or parent it to the last bone.

By not having the effector tied to the last bone, you are free to create local animation on the effector that can be translated with its parent. However, many animators prefer to constrain effectors and bones to a separate hierarchy of control objects (control rigs) so that they never animate the skeleton itself directly (see Character Rigging).

If the effector is the child of an object outside of its own chain (that is, you have parented it to a different object), it will behave as if it is still in the chain until you animate its translation. At that point, the effector is locked in the local space of its parent and you won't be able to control it by manipulating its parent. The parent acts as an "anchor" for any animation on the effector, but it can't create IK behavior (that is, it can't solve the chain).

The only way to invoke IK is by directly manipulating or keying the effector, or by using the Force IK option (see Forcing the Effector's Position).

For more information on how the effector works with IK, see Choosing How an IK Chain Reaches Its Goal.

Animating the Effector's Translation

Animating the translation of the effectors is the most basic way of animating chains with IK. You don't usually animate the effector directly; instead, you animate the rig control object that is constrained to the effector.

For more information on animating transformations in general, see Animating Transformations [Animation].

To animate the effector's translation

  1. Select the chain's effector or the rig control object that is constrained to the effector.

  2. Click the Translate (t) button on the Transform panel or press V.

  3. Move the effector so that the chain is in the position you want.

  4. Key the translation values by clicking the keyframe icon, or pressing K, or by choosing Animation Set Key from the Animation panel.

  5. To animate your chain, move the timeline pointer and invoke IK by moving the effector to another position and setting another key.

    Here, the chain is animated by keying the effector's translation at frames 1 and 10. The joint angles at each inbetween frame are solved.

    Note
    • By default, when you create a chain in Softimage, the effector is a child of the chain root, and you animate the effector in local space. However, if you drew the chain using the Create Skeleton SI|3D Drawing command, you must animate the effector's position in global space.
    • To do this, you must deactivate the effector's Local Transform options for inheriting its Position and Orientation from its parent (see Animating Transformations in Hierarchies [Animation]).

Animating on a Path

You can also translate chains by constraining them to a path or a trajectory:

  1. Create a curve for a path and select the chain's effector to be constrained to the path.

  2. Choose Create Path Set Path in the Animate toolbar and follow the steps as described in Setting Objects on Paths [Animation].

When the sequence is played back, the effector translates along the path just like any other object. However, since the effector is part of a chain, the principles of IK are applied to the rest of the chain.

On the left, the curve is the path.

On the right, the effector is animated along the path.

Controlling an IK Chain's Orientation

Although the orientation of the chain's plane is set up when you draw a chain, there are a number of ways in which you can change it to solve certain problems. For example, you can change a chain's preferred axis from the default Z or use special constraints to manipulate your chain to prevent flipping.

For instance, you may draw a two-joint arm chain vertically for a character's arms to swing naturally when it walks.

  • If this character raises its arm to point at the sky, the chain will remain oriented in a vertical plane.

  • If, however, you want the arm to rotate to another plane, as if the elbow were to rotate up to achieve a more horizontal orientation, then you need to use a special constraint to control the joints' orientation.

You can control the orientation of a chain to help you avoid problems with the chain flipping. Chain flipping occurs when the effector of a 2D or 3D IK chain gets close to the chain root. When this happens, the general orientation of the chain changes very quickly as the effector crosses the preferred axis.

There are three things you can do to help with this problem:

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License