Exercise 17.9 Rigging an Advanced Additive Hand and Fingers
Before you start this exercise, take a moment to examine the hierarchy
of the hands for this setup, as in the file Jerk_HandJoints.mb in this
chapter's folder on the CD. Note that at each knuckle there is an additional
joint that is directly on top of the child knuckle joint. This technique
allows for two things. It zeroes out the transforms of the children knuckles
(which will be directly animated), and it also allows for layered animation
on the parent knuckles if this becomes necessary for later shot requirements.
Also note that the knuckles have control boxes around them. The technique
of using control boxes for the animators to set keys on is a great idea
when setting up a character. Control boxes can be added to a character
in many ways; this is covered later in this chapter. For now, you should
know that these control boxes are actually NURBS curves shape nodes that
were made children of the joint's transform by selecting the curve shape
and then the joint, and using the –shape flag with the parent MEL command.
(See the section in this chapter, " Hooking Up Control Boxes to Your Character
Rig," for more information.)
For the hand setup, you want it to be super-easy for an animator to use,
as well as have all the extra controls needed for the animator to hit
any hand pose necessary. You will set up a hand control that will allow
the animator to rotate the fingers individually or together, add a full-finger
curl, and add individual controls for each knuckle. You will use added
attributes that are connected to plusMinusAverage nodes, which add together
the attributes that control the rotations of the knuckles.
-
Start by opening the completed previous exercise, which is found
in the file Jerk_ArmSetup_Finished.mb (or, you can start from your
own completed file). With the arm setup file open, import the file
Jerk_HandJoints.mb that is on the CD for this chapter.
-
Select each parent joint node that makes up the fingers and thumb
hierarchies. They are the thumb_1, index_DoubleKnuckle, middle_DoubleKnuckle,
ring_DoubleKnuckle, and pinkyFinger_1 nodes. Parent them directly
to the wristJoint node, and delete the empty handGroup group node
that is left.
-
Now select each knuckle control box from the 3D view port, and go
to Modify, Add Attribute. Add the following float data type attributes
(just leave the min, max, and default options blank):
fingerFullCurl
fingerMidBend
fingerTipBend
Figure 17.59 shows the result.
You will use the double-jointed knuckle, along with the addition
operation of the plusMinusAverage nodes, to allow the fingerCurl attribute
to make the whole finger bend each joint. This also will cause the
finger to flex closed, while still providing individual control over
each joint in each finger so that the animator can pose the hand very
explicitly. For each of the four fingers, you will create two plusMinusAverage
nodes and then connect the same attributes on each finger. The following
steps go through one finger; you should repeat the steps for the rest
of the fingers in the exact same fashion (except for the thumb, which
is slightly different and is covered separately).
 Figure 17.59
Knuckle control boxes.
-
Create two plusMinusAverage nodes by opening the Hypershade window
and going to Create, General Utilities, Plus Minus Average.
-
Select the two new plusMinusAverage nodes that you just created,
as well as the pinkyFinger_Knuckle node. Open the Hypergraph window
and select Graph, Input and Output Connections.
-
Use the Hypergraph and Connection Editor to connect the fingerFullCurl
attribute of the pinkyFinger_Knuckle node into the input1D[0] attributes
of both plusMinusAverage nodes. Also connect the fingerFullCurl attribute
to the pinky_DoubleKnuckle rotateX attribute.
-
Next, connect the fingerMidBend attribute of the pinkyFinger_Knuckle
node to the input1D[1] attribute of one of the plusMinusAverage nodes.
Now connect the output1D of this node into the rotateX attribute of
the pinkyFinger_2 joint.
Tip - Sometimes array attributes can be tricky to connect
to because the Connection Editor doesn't always show you the next
available element. To connect an output attribute to the input1D[1]
attribute, try selecting and loading both nodes into the Inputs
and Outputs view of the Hypergraph. Next, right-click and hold down
the mouse on the very rightmost side of the output node. A pop-up
menu should appear that displays at the very top Connect Output
Of and that gives you a list of attributes. Continuing to hold down
the mouse button, highlight the appropriate attribute from the list
and then let go of the mouse button. The mouse turns into an active
dragging line with a little square icon at the end.
Now right-click on top of the node that contains the input array
attribute, and hold down the mouse button. You should see a menu
labeled Connect Input Of. While still holding down the right mouse
button on top of your input node, select the appropriate input array
attribute. That's it—you just made a connection. This technique
takes a little practice, but it is really fast once you get the
hang of it. And it takes less effort because you don't need to load
the Connection Editor just to connect a few attributes.
-
Connect the fingerTipBend attribute of the pinkyFinger_Knuckle node
to the input1D[1] attribute of the other plusMinusAverage node. Now
connect the output1D of this node into the rotateX attribute of the
pinkyFinger_3 joint.
Figure 17.60 is an example of what the node network looks like for
the finger.
 Figure 17.60
This is what the node network looks like for the finger.
Perform steps 2 through 8 for each of the other four fingers.
-
For the thumb, create three plusMinusAverage nodes. Select them along
with the thumb_Knuckle joint, and load them in the Input Output Connections
view of the Hypergraph.
-
Connect (using the Hypergraph and the Connection Editor) the thumb_Knuckle
rotateY and rotateZ attributes directly to control the thumb_1 rotateY
and rotateZ attributes.
-
Connect the fingerFullCurl attribute of the thumb_Knuckle to the
input1D[0] attribute of one of the unused plusMinusAverage nodes.
Then connect the fingerMidBend attribute to the input1D[1] attribute
of the same plusMinusAverage node. Now connect the output1D of this
plusMinusAverage into thumb_DoubleKnuckle rotateX.
-
Connect the fingerFullCurl attribute of the thumb_Knuckle to the
input1D[0] attribute of one of the other unused plusMinusAverage nodes.
Then connect the thumb_Knuckle rotateX attribute to the input1D[1]
attribute of the same plusMinusAverage node; connect its output1D
into the rotateX of the thumb_1 node.
-
Connect the fingerFullCurl attribute of the thumb_Knuckle to the
input1D[0] attribute of the last unused plusMinusAverage node. Then
connect the fingerTipBend attribute to the input1D[1] attribute of
the same plusMinusAverage node. Now connect the output1D of this plusMinusAverage
into the thumb_2 rotateX attribute. Your result should look like Figure
17.61.
 Figure 17.61
Utility nodes set up for the hand.
This completes the hand setup. For a finished example file of this rig,
open the scene file Jerk_HandSetup_Finished.mb, which is included in this
chapter's folder of the CD.
|