            |
This
tutorial outlines a technique which is quite handy
when setting up an arm. Very often
I see work where the movement/rotations are incorrect
at the wrist as people sometimes overlook how
things actually work below the
elbow. If you take a look at your own wrist and 'rotate'
your hand around, it may seem that you are looking
at a ball joint, but you
aren't. A wrist can only rotate around two axes,
which we will call Y & Z. When you rotate
your hand around the X axis line which goes from
the elbow to the wrist, you will see that this
rotation
is originating not at the wrist, but within the forearm.
There are two bones in the forearm, the Ulna and
the Radius, and it is the
movement of these bones which create the 'rotation'
for this third axis.
The issue of wrist/forearm rotation may not seem
important off the bat when setting up your skeleton,
but it is an issue when setting up deformations.
Joint driven deformations are based on clusters which are parented to the joints...
But a joint can not effect two different regions of a surface based on which
axis it is rotating on... Since when you rotate the wrist joint in Y & Z
the wrist geometry needs to deform, when we rotate in X, that same region would
also be affected... but we need the effect to originate within the forearm.
This needs to be accomplished by having an additional joint: the forearm joint.
So as previously stated, people often set up an arm with three joints: shoulder,
elbow and wrist. But what we want to do is use four joints: shoulder, elbow,
forearm and wrist. In figure 1, we see an arm created in such a way.

But, an important note
is that I grid snapped the elbow, forearm, wrist and middle finger
knuckle so that they are in a perfectly straight line. This way
you know that the axes are aligned properly. We can now rotate the
elbow so that the skeleton would better fit a model as in Figure
2.

The problem we now
face, however, is that the elbow has a Z-rotation value which is
non-zero. This is bad. Whenever creating a skeleton, each joint's
rotation values should be 0,0,0 in what we call the default pose,
or bind pose once skinning has begun. To force the elbow to zero
out it's rotation values, select the elbow joint and use the Modify/Freeze
Transforms tool. You will notice that the elbow now has rotation
values of 0,0,0, while it has remained in the correct, modified
orientation. A new problem will result from using the Freeze Transforms
tool, unfortunately. If you select the elbow and activate the rotate
tool, you will notice that its local rotation axis has been skewed
to align itself with it's parent's axis (figure 3).

This has also occured
for all of the child joints of the elbow as well (forearm, wrist,
etc). The solution to this is to select the elbow joint and type
the following in the command line: 'joint -e -zso -oj xyz -ch'.
This will align the local rotation axis of the elbow, and its children,
with their respective descending bones, getting us back to our original
local rotation axis orientations.
With the skeleton finished, we can begin setting up our kinematic controls.
You may be used to creating an IK handle from the shoulder to the wrist, but
this will not work in this type of set-up. The reason is, when you add an IK
handle and keyframe it, all joint rotations above the IK handle become uneditable.
Therefore, we can not rotate our forearm joint. The IK handle must therefore
be created from the shoulder to the forearm joint as in figure 4.

We are using an RP
IK handle, btw, so that we will have control over the IK handle's
orientation. With this complete, even if the IK handle is keyframed,
we can still manually keyframe the forearm joint's rotation in X,
and the wrist joint's rotations in Y and Z. We could consider ourselves
finished at this point, but there are a few steps remaining to clean
things up and make this arm more intuitive to animate. Animating
an IK handle at the forearm joint is strange, and having to select
the forearm and wrist joints independently is tedious.
The first step involves the IK handle. First make
sure that the IK handle is not keyframed and has not been
modified. In Maya, it is possible to offset
an IK handle from the position of its end effector. Figure 5 shows the Hypergraph
for our scene, where we can see the IK handle transform node existing independantly,
outside the skeleton hierarchy.

Furthermore, we can
see the 'End Effector' node for the IK handle sitting in the hierarchy
as a child of the elbow joint. If you select the end effector node
and invoke the Move tool, you will notice that this node's pivot
point rests at the forearm joint. Also notice that we can not move
it. But, if we hit the Insert key, we can move the pivot point of
the end effector. While moving the end effector's pivot point, notice
how the IK handle is moving with it (figure 6).

What we are going to
do is snap the end effector's pivot point to the wrist joint using
'point' snapping. (point snapping also functions as joint snapping).
What we have now done is modified how the IK handle behaves, while
we have not modified which joint rotations it controls. So that
if we now keyframe the IK handle, we are still free to manually
rotate the forearm joint. Pretty cool. Not done yet... again, make
sure the IK handle does not have any keyframes on it. If you select
the IK handle and look in the Channel Box, you will see that its
translate and rotate values are non-zero... this is simply the nature
of new IK handles, but we need to address this. Just as we want
our joint rotations to be 0,0,0 in their default pose, we want the
same of our IK handles rotations and translations. This makes life
much simpler when trying to return a character to its default pose.
To do this, we will select the IK handle and group it to itself.
We will then move the pivot point of this new transform node to
the wrist joint, and name the node 'Arm' (Figure 7).

Now we have a new,
clean, node whose values for translate and rotate are 0,0,0. But
beware... modifying the IK handle at this point will mess things
up. You must hide the IK handle, then display the Selection handle
for the new transform node using Display/Object Components/ Selection
Handles. So from now on, when you want to move the arm, you will
select this selection handle, instead of the IK handle itself. Also
notice that by using this technique, we can not only move the selection
handle, we can rotate it as well to modify the orientation of the
arm.
Now that we are finished with the IK, we can move on to how we should animate
the rotations of the wrist and forearm joints. Again, animating two joints
is more tedious than one... what would be nice would be if we could rotate
the wrist joint in XY and Z, but have it know that when it is rotated in X,
it will actually not rotate from the wrist, but from the forearm. To do this
we must create a Locator and call it 'wrist'. This locator will be set up to
control the rotations of both the wrist and forearm joints. The first step
is to joint snap the locator to the wrist joint as in figure 8.

Now we need to align
the locator's rotation axis with the wrist. To do this, parent the
locator to the wrist joint, then Freeze transform it. You will notice
that its local axis will automatically orient itself with the wrist
joint's as in figure 9.

But we do not want
to leave the locator parented to the wrist; since it is going to
be driving the rotations of the wrist and forearm, that would mean
we have a child's rotations controlling its parent and grandparent...
this can create funky behavior. So we will now select the Locator
and parent it to the forearm joint instead.
We are now ready to set up how the locator is controlling the wrist and forearm
joint rotations. Open the Connection Editor and load the Locator as the Output.
Now load the wrist joint as the Input. Open the 'rotate' folders in each column
and connect RotateY of the locator to RotateY of the wrist, and RotateZ of
the locator to Rotate Z of the wrist as in figure 10.

Now load the forearm
joint as the input and connect the Rotate X of the locator to the
Rotate X of the forearm joint. And there you go.
So while it took a while to tell you how to do
this, once you get used to it, it only takes a couple minutes
to set-up. We have a selection handle at the
wrist to modify our arm IK, and a Locator at the wrist to control the orientation
of the hand. The final step, to be nice and clean, is to 'lock' the scale
XYZ of the IK handle and set them to be non-keyable in the
Channel Control window.
Then for the Locator, lock its translate XYZ and scale XYZ, then set those
to be non-keyable... Then for the original IK handle, which should be hidden
at this point, lock its translate XYZ.... this way an animator can't break
it... it happens. |
            |