Posing and animating using inverse kinematics
 
 
 

Next, you create IK handles that you’ll later use to pose the arms and legs. The next steps describe some initial setup you should perform before creating the IK handles.

To set up the character prior to creating IK handles

  1. Select the root of the hierarchy, back_root, and then select Skeleton > Set Preferred Angle.

    This sets the current joint angles throughout the skeleton as the preferred angles. This is a useful step after you complete a skeleton. Maya thereafter uses the current bend in the knees and elbows as the preferred initial rotation direction of these joints during inverse kinematics (IK) posing. This makes it easier to pose the character with motion that is natural for a human character.

  2. Select Jackie in the Outliner and, from the main menu, select Display > Hide > Hide Selection. (You must select Jackie from the Outliner because Jackie is a template object.) By hiding Jackie, you’ll lessen scene clutter as you pose the skeleton in the following steps.

To create, pose, and animate IK handles for the legs

  1. Select Skeleton > IK Handle Tool > .
  2. In the Tool Settings window, make sure Current Solver is set to ikRPsolver.

    This type of IK solver has characteristics that work well for this application.

  3. In the perspective view, click left_hip and left_ankle.

    This creates an IK handle that lets you control all joints from left_hip through left_ankle. The handle’s main manipulator is at the left_ankle.

    The IK handle is the selected object after you create it. If you unintentionally cancel the selection of the handle, you can select it again by clicking the left_ankle—the last joint you clicked after using the IK Handle Tool. Whenever you select a handle, make sure you do not select joints or other objects along with the handle. You can check the Outliner to confirm your selection.

  4. Go to the start of the playback range.
  5. With the IK handle selected, select Animate > Set Key to key the leg’s current position at the first frame.
  6. Go to frame 12.
  7. In the side view, use the Move tool to drag the IK handle up and to the left (see illustration), as if Jackie were stepping up a staircase. The foot and knee move while the hip stays in place.

  8. Set another key for the IK handle.
  9. Go to frame 24. Move the IK handle back to its prior position. Set another key.
  10. Play the animation to see the leg step up and down during the first 24 frames.

    This completes a simple animation of the leg using an IK handle to control its position.

To practice additional IK techniques

  1. Go to the start of the animation.
  2. In a perspective view, practice posing the leg in various directions by moving the IK handle.

    No matter how far you drag the handle manipulator, the joints of the leg will not stretch beyond the straight leg position. This is desirable; you do not want the size of a skeleton to change as you pose it. However, if you drag a leg joint, the bone hierarchically above that joint will lengthen. This is why it’s important to check that you haven’t selected a joint with the IK handle before you move the handle.

    As you drag the handle to some positions, you might notice the leg joints flip abruptly (see the next figure for an example position). It’s therefore hard to control the leg positioning in this region.

    The default IK handle (IK Rotate Plane handle) has manipulators you can use to avoid joint flipping. With the handle selected, select Modify > Transformation Tools > Show Manipulator Tool. Move the Pole Vector XYZ manipulator to a slightly different position (see the following figure).

    If this doesn’t solve the problem, rotate the Twist manipulator to rotate the leg. You can key the Pole Vector XYZ and Twist attributes to fixed values to avoid the flipping as the character moves.

    A more precise way to avoid joint flipping, which requires some initial setup, is to use a Pole Vector Constraint. For more information see Pole Vector constraints.

  3. Repeat the preceding steps for the right leg. (Create an IK handle for the right_hip to right_ankle, then practice posing and animating the handle.)
    NoteIf you want to move the entire skeleton, group the back_root and all IK handles under a single node, select the group node, and then use the Move tool. With this grouping, the motion of the entire skeleton won’t conflict with the keys you set for the handles.

To create, pose, and animate IK handles for the arms

  1. Select Skeleton > IK Handle Tool.
  2. Click left_shoulder, and then click left_wrist. This creates an IK handle for the left arm.
  3. Select Skeleton > IK Handle Tool.
  4. Click right_shoulder, then click right_wrist. This creates an IK handle for the right arm.
  5. Practice posing and animating the handles.