Inverse Kinematics in Maya

I. What are IK handles and solvers?
II. How to set up IK handles

1. Setting up a Single Chain Handle
2. Setting up a Rotate Plane Handle

3. Setting up a Spline Handle


I. What are IK handles and solvers?


Maya provides inverse kinematics tools called "IK handles". The effect of an IK handle on a joint chain is determined by the type of IK solver that you choose.

There are three types of IK handles with corresponding solvers: Single Chain (SC) Handle, Rotate Plane (RP) Handle, and Spline Handle.

SC/RP Handle for limbs
Spline Handle for tails, necks, spines, etc.

The difference between an Single Chain (SC) Handle and an IK Rotate Plane (RP) Handle is that:

 

Notes:


II. How to set up IK Handles

1. To set up a SC Handle:

  1. Go to Animation Menu Set (F2).
  2. Select Skeleton -> Joint Tool.
  3. Create three joints in the front view. Two bones are automatically created to connect three joints. Hit "Enter" to get out of Joint Tool.

Notes:

  1. Open IK Handle Tool's settings by selecting the small square box next to Skeleton -> IK Handle Tool. Select ikSCsolver as Current Solver.
  2. Select the root joint and then the third joint with the left mouse button (LMB). You should see the line connecting the root and third joint appear.
  3. Open Hypergraph. You should see a red dotted line connecting "joint1" (the root joint) and "effector1", and also ikHandle1.
  4. To pose, select "ikHandle1" and move it. DO NOT MOVE ANY JOINT in order to pose the chain.
  5. If you want to move the joint chain and its IK Handle together, you may group them together.
  6. Rename all the joints and ikHandle with descriptive names.





2. To set up a RP Handle:

  1. Select Skeleton -> Joint Tool.
  2. Create another set of three joints in the front view. (You should see "joint4", "joint5", and "joint6" appear in Hypergraph.) Two bones are automatically created to connect three joints. Hit "Enter" to get out of Joint Tool.
  3. Open IK Handle Tool's settings by selecting the small square box next to Skeleton -> IK Handle Tool. Select ikRPsolver as Current Solver.
  4. Select the root joint and then the third joint with LMB. You should see the line connecting the root and third joint appear.
  5. Open Hypergraph. You should see a red dotted line connecting "joint4" (the root joint) and "effector2", and also ikHandle2.
  6. To pose, select "ikHandle2" and move it. DO NOT MOVE ANY JOINT in order to pose the chain.
  7. To change the rotation of the middle joint, you can change the direction of Pole vector OR change Twist parameter value.
  8. To manipulate Pole vector interactively, select Show Manipulator Tool under Move Tool, move the line with one end attached to the root joint. (Three axes and a blue square box are attached to the other end.) The line represents Pole vector.
  9. To change Twist value interactively, select Show Manipulator Tool and drag along the blue circle around the third joint with the left mouse button down. (The blue circle turns yellow when it is selected.)
  10. If you want to move the joint chain and its IK Handle together, you may group them together.
  11. Rename all the joints and ikHandle with descriptive names.

Two vectors, Pole vector and Handle vector, define the plane in which the middle joints lie on. When either one of the vector loses its length or when the two vectors are parallel (e.g, when Pole vector crosses Handle vector), the plane cannot be defined. As the result, the joint chain may "flip" (i.e., bend to an opposite direction suddenly). When you joint chan flips, correct the problem by moving Pole vector away from Handle vector and by not letting Pole vector crosses Handle vector.

Pole vector and Twist are independent parameters that control the rotation(s) of the middle joint(s). If you animate both of them simultaneously and if the joint flipping problem (described above) happens, it will be hard to correct the problem. Use Pole Vector to set up desired joint rotations (i.e., the direction the chain bends) and use Twist for fine tuning or animating detailed motion (e.g. a knee shaking).


To make it easier to select the IK handle, you can move the selection handle of the IK handle as follows:

  1. Select the IK handle. Select Display -> Component Display -> Selection Handles.
  2. Press F8 to go into Component mode.
  3. With the left mouse bottom click the downward arrow sandwiched with = signs and select "All Components Off". Turn on the Handles selection mask (+).
  4. Click-drag a selection box around the IK's selection handle to select it.
  5. Move the handle so that it does not lie in the skeleton.
  6. Press F8 to go back to Object mode.

To make it possible to manipulate Pole Vector without Manipulator Tool:

  1. Create -> Locator. Move it near the middle joint.
  2. Select the locator and Modify -> Freeze Transformations.
  3. Select the locator and Shift-select the IK handle. Select Constrain -> Pole Vector.
  4. Rename the locator appropriately.

 

3. To set up a Spline Handle:

  1. Select Skeleton -> Joint Tool.
  2. Create a set of joints in "S" shape in the front view. Hit "Enter" to get out of Joint Tool.
  3. Select Skeleton -> IK Spline Handle Tool. Click on the first joint and the last joint. You should see the line connecting the first and last joint appear.
  4. Open Hypergraph. You should see a red dotted line connecting the root joint and the end effector, the IK handle, and "curve1".
  5. To pose, select "curve1" and select "Select by component type", and move the control vertices (CVs) of "curve1".


In order you to move the CVs without going into Component mode (i.e., staying in Object mode), you can do the following:

  1. Select the curve that is used for a Spline Handle.
  2. Select the box next to Deform -> Create Cluster. Select Relative as Mode.
  3. Select "Select by component type" or press F8 to go into Component mode.
  4. Select one CV of the curve. Select Deform -> Create Cluster. "C" should appear at the CV.
  5. Repeat 4 for each CV.
  6. Go back to Object mode by selecting "Select by object type" or pressing F8. Now you can select and move each CV without going to Component mode.

When Auto Create Curve option in the IK Spline Handle Tool's settings is on, a NURBS curve with four control vertices is automatically created for you. If you need to use a curve with more than four control vertices, turn off the option, create a curve using CV or EP Curve Tool, select the IK Spline Handle Tool, click on the first and last joints, and the curve that you created.