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.
- Single Chain (SC) Handle and Rotate Plane (RP) Handle can be
used to animate the motion of an articulated figure's limbs, and
similar objects.
- Spline Handle can be used to animate the motion
of curvy or twisty shapes, such as tails, necks, spines, tentacles,
bull-whips, and snakes.
|
|
|
|
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:
- SC
Handle's end effector tries to reach the position and
orientation of its IK handle.
- RP
Handle's end effector only tries to reach the position of its
IK handle.
Notes:
- When you are using SC Handle, to control the orientation of the
middle joints, you rotate the IK handle.
- When you are using RP Handle, two vectors, Pole vector
and Handle vector, define the plane in which the middle
joints lie on.
.
- When you are using RP
Handle, to control the orientation of the middle joints, you
rotate the pole vector.
- Spline Handle takes a NURBS curve and rotates
the IK chain to follow the shape of the curve. The control vertices (CVs) of
the curve, rather than the end effector of the handle, are
animated.
II. How to set up IK Handles
1. To set up a SC Handle:
- Go to Animation Menu Set
(F2).
- Select Skeleton -> Joint
Tool.
- 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:
- If you select the root joint and
move it using Move Tool, the other two joints lower in the hierarchy follow.
If you select the middle joint and move it, the last joint moves with it.
Select a joint and hit "Insert", then you can move the joint alone without
moving the joint(s) lower in the hierarchy until you hit "insert" again.
- You can move along the hierarch
using arrow keys
- Open IK Handle Tool's
settings by selecting the small square box next to Skeleton -> IK Handle
Tool. Select ikSCsolver as Current Solver.
- 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.
- Open Hypergraph. You should see
a red dotted line connecting "joint1" (the root joint) and "effector1", and
also ikHandle1.
- To pose, select "ikHandle1" and
move it. DO NOT MOVE ANY JOINT in order to pose the chain.
- If you want to move the joint
chain and its IK Handle together, you may group them together.
- Rename all the joints and
ikHandle with descriptive names.
2. To set up a RP Handle:
- Select Skeleton -> Joint
Tool.
- 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.
- Open IK Handle Tool's settings
by selecting the small square box next to Skeleton -> IK Handle Tool.
Select ikRPsolver as Current Solver.
- Select the root joint and
then the third joint with LMB. You should see the line connecting the
root and third joint appear.
- Open Hypergraph. You should see
a red dotted line connecting "joint4" (the root joint) and "effector2", and
also ikHandle2.
- To pose, select "ikHandle2" and
move it. DO NOT MOVE ANY JOINT in order to pose the chain.
- To change the rotation of the
middle joint, you can change the direction of Pole vector OR
change Twist parameter value.
- 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.
- 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.)
- If you want to move the joint
chain and its IK Handle together, you may group them together.
- 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:
- Select the IK handle. Select
Display -> Component Display -> Selection Handles.
- Press F8 to go into Component
mode.
- With the left mouse bottom click
the downward arrow sandwiched with = signs and select "All
Components Off".
Turn on the Handles selection mask (+).
- Click-drag a selection box around
the IK's selection
handle
to select
it.
- Move the handle so that it does
not lie in the skeleton.
- Press F8 to go back to Object
mode.
To make it possible to manipulate
Pole Vector without Manipulator Tool:
- Create -> Locator. Move it
near the middle joint.
- Select the locator and Modify
-> Freeze Transformations.
- Select the locator and
Shift-select the IK handle. Select Constrain -> Pole Vector.
- Rename the locator
appropriately.
3. To set up a Spline Handle:
- Select Skeleton -> Joint
Tool.
- Create a set of joints in "S"
shape in the front view. Hit "Enter" to get out of Joint Tool.
- 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.
- Open Hypergraph. You should see
a red dotted line connecting the root joint and the end effector, the IK
handle, and "curve1".
- 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:
- Select the curve that is used
for a Spline Handle.
- Select the box next to Deform -> Create
Cluster. Select Relative as Mode.
- Select "Select by component
type" or press F8 to go into Component mode.
- Select one CV of the curve.
Select Deform -> Create Cluster. "C" should appear at the CV.
- Repeat 4 for each CV.
- 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.