About IK Handles and Solvers


Inverse kinematics makes animation easier in many situations. For example, to put a foot in a certain position using forward kinematics, you need to rotate the hip, knee, and ankle. However, by using an IK handle on the ankle, you can move the ankle into position, and the hip and knee rotate accordingly (Figure 10.26).

Figure 10.26. On the left, an IK handle moves the foot. On the right, both the hip and ankle are rotated to move the foot.


You can also use an IK handle to make a foot or hand stick in one spot. When your character is walking and you want one foot to remain planted on the ground, IK handles make it much easier to keep that foot in place (because multiple rotations in the joints connected to the IK handle help to keep it that way) (Figure 10.27). Once it's keyframed, the foot does its best to stay where it is even though the joints in the IK chain are rotating. The same goes for arms and hands. If your character is climbing a ladder or leaning against a wall, an IK handle will help keep it in place.

Figure 10.27. The top of the leg is moving, but the ankle stays put because it has an IK handle, which is keyframed. Note that this foot also has an IK handle going from the ankle to the ball and from the ball to the toe. These IK handles keep the rest of the foot in place.


To add an IK handle:

1.

Create a leg out of five joints (Figure 10.28).

Figure 10.28. This is a typical leg skeleton. Sometimes a heel joint is added, but it's used as a placeholder; the ankle and toe joints bend, but the heel joint is just used as a rotation pivot.


2.

Choose Skeleton > IK Handle Tool.

3.

Click the hip joint.

4.

Click the ankle joint.

An IK handle is created.

5.

Move the IK handle around (Figure 10.29).

Figure 10.29. The IK handle is moved around, allowing for easy placement of the foot.


6.

Select Twist in the Channel Box.

7.

With the middle mouse button, drag from left to right in the Perspective view.

The leg rotates around the IK chain (Figure 10.30).

Figure 10.30. The leg is rotated via the Twist attribute.


The Twist attribute only works on a Rotate Plane (RP) type of IK handle. By default, a Rotate Plane solver is created when you make an IK handle. If you move the IK handle too high, however, the leg flips around, and the knee points in the opposite direction (Figure 10.31). You can solve this problem by adjusting the Pole Vector attributes, which are in the Channel Box for the IK handle.

Figure 10.31. When a leg is lifted too high, it can flip over if you're using an RP IK handle.


Another alternative is to create a Single Chain solver. Although it doesn't permit the Twist attribute like the Rotate Plane solver does, the Single Chain solver doesn't have the same flipping problem that Rotate Plane has. When using a Single Chain solver, you can rotate the limb by rotating the IK handle. However, the Rotate Plane solver is considered more predictable because it's not affected by the rotation of the IK handle.

To create a Single Chain IK handle:

1.

Create a leg out of five joints (Figure 10.32).

Figure 10.32. This is the basic skeleton for a leg.


2.

From the Skeleton menu, select the box next to IK Handle Tool.

This opens the Tool Settings dialog box.

3.

Select ikSCsolver from the Current Solver pop-up menu (Figure 10.33).

Figure 10.33. In the Tool Settings dialog box, choose ikSCsolver. This type of IK handle doesn't cause the flipping problem that an RP handle can cause.


4.

Click the hip joint.

5.

Click the ankle joint.

An IK handle is created with a Single Chain solver.

6.

Rotate the IK handle.

The limb rotates.

Tips

  • You can also change the type of solver after you've created the IK handle: Select the IK handle, and open the Attribute Editor. Click IK Solver Attributes, and then choose the solver type from the IK Solver pop-up menu (Figure 10.34).

    Figure 10.34. In the Attribute Editor for the IK handle, you can change the type of solver after it's created.

  • IK handles can also flip when a character turns 180 or 360 degrees. To avoid this problem, you can constrain the orientation of the Pole Vector of an IK handle to the joint above it. Constraints are covered later in this chapter.





Maya 7 for Windows and Macintosh(c) Visual Quickstart Guide
Maya 7 for Windows & Macintosh
ISBN: 0321348990
EAN: 2147483647
Year: 2006
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net