Rigging Characters for Animation, Pt. 1, From New Riders | 2
'; figDoc.write(zhtm); figDoc.close(); } // modified 3.1.99 RWE v4.1 -->
Inside Maya: Rigging Characters for Animation. Pt. 1.
6. Before beginning, hide the lowRes control hierarchy temporarily so that it doesn't confuse things in the 3D view. Do this by selecting the root of the lowRes hierarchy and hitting Ctrl+h.
7. Start by creating a single locator, and name it poleVector1. Next, activate the Move tool, and with the middle mouse button on your mouse, and the v key on your keyboard depressed, drag your mouse to snap the locator directly on top of the root joint of the high-res hierarchies. When the locator is directly on top of the root joint, translate it along the Z-axis direction that moves it backward so that it is directly behind the character's back. Be sure that it is moving only on a single axis and that you are moving it behind the character.
8. Next, hit Ctrl+d to duplicate the locator and snap this new duplicated locator to the next joint, which should also have an IK handle right on top of it. Perform the exact same step, moving the locator backward about the same distance on the same axis as the first locator that you just moved behind the character. Repeat this step for each joint in the hierarchy except for the very last one.
9. When you are finished duplicating, snapping, and moving all the locators behind the character, check that you have the correct number of locators. You should have a single locator for each rpIk handle, and each locator should be located directly behind each one of the character's spine joints, with a single IK handle for each joint except the root. Your locators should be situated something like the ones shown in Figure 17.33.
10. Next, unhide the low-res control joints by setting the root node's visibility attribute to on. Parent each one of the poleVector# locators to the nearest low-res control joint (see Figure 17.34).
11. Now pole vectorÂconstrain each rpIk handle so that it is constrained to all of the locators. Do this by first selecting all the locators that you have situated and parented behind your character's back; then add to the last selection the rpik handle and perform the command Constrain, Pole Vector.
This creates a single weighted pole vector constraint with weight attributes for each locator, which constrains the IK handle onto all the locators situated behind your character.
12. Perform Step 31 for each IK handle on your character's back: Select all the locators and then select a single IK handle, and perform Constrain, Pole Vector. When you are finished, you should have each one of your IK handles pole vectorÂconstrained to all of the locators behind your character, as in Figure 17.35.
Now it's time to manually change each of the pole vector constraint weights to weight them with a nice fall-off toward the corresponding low-res joints that the locators are parented onto.
13. To do this, select each IK handle and click the pole vector constraint in the Channel box to modify the pole vector constraint weight attributes (or, just select the pole vector constraint that is a child of your IK handle).
Now look at the weight values that show up in the Channel box. Each weight represents how much the current IK handle's twisting is controlled by each locator that it is constrained to (the locators are children of the low-res back).
14. Set each weight value to a number that will distribute the rotation of the pole vector to be controlled evenly by two to four of the locators.
Rotating a low-res joint causes the pole vector constraint locator that is a child to orbit around the pivot of the low-res joint you are rotating. This, in turn, causes any of the IK handles that are constrained to the locator to twist or rotate along the IK handle's rotate plane. The idea is to determine which low-res joint's rotations you want to have affect the twisting of the high-res joints.
Determining which joints should receive weighting is quite simple: If the joint is at the top of the hierarchy, weight it toward the locators that are children of the top low-res joint. The best part about all this is that the poleVector constraint has weights, so it can have weights that are falling off from one locator to the next, across multiple joints. If one of your rpIk handles is in between the top low-res joint and one of the middle low-res joints, give it weights that are averaged between locators that are children of these two hierarchies. For example, if you are distributing the weights across four locators, choose weights that are falling off from low values to higher values, such as .1, .35, .75, and 1; the rest of the weights should be set to 0. The only rule for which constraint weights you should give higher weights to is this: Set the weights of the pole vector constraints so that when you twist the low-res hierarchy, the high-res joints rotate with an appealing and desirable fall-off between them.
Figure 17.36 shows what your pole vector constraints should look like when you are finished changing their weights.
15. Next, group all of your IK handles and curves together. Then group both of your high-res IK hierarchies under the same group and name it spineRigIkNodes. Keep your low-res hierarchy outside of this spineRigIkNodes group because this group will never be moved or translated. The lowRes hierarchy will be the joints that are hooked up to control boxes and that are used to animate the character.
16. Point-constrain the root of the lowRes hierarchy to the root of the character, and group and constrain the rest of the lowRes hierarchy to control boxes so that it is kept free from the translations of the root.
This keeps the hips free from moving with the shoulders, and vice versa. An additional parent of both hierarchies should eventually also be used when the rest of the character controls are built, to move both the root and the upper spine together.
You can find a completed file, titled Jerk_DivineSpine_Finished.mb, on the accompanying CD for this chapter.
Created: March 11, 2003
Revised: November 7, 2003