Rigging Characters for Animation, Pt. 1, From New Riders | 8 | WebReference

Rigging Characters for Animation, Pt. 1, From New Riders | 8

'; figDoc.write(zhtm); figDoc.close(); } // modified 3.1.99 RWE v4.1 -->

Inside Maya: Rigging Characters for Animation. Pt. 1.

Creating Advanced Bipedal Character Controls

This section covers several more advanced approaches, some that lend themselves very nicely to the stretching characters into any pose needed by the animators. We know that our human character will need to stand on two feet, sit down and drive a car, get sprayed by a fire hydrant, get knocked down, and interact with several objects and props in his environment. The fact that the character might need to be animated with a touch of cartooned style, per his character design, is also a consideration for the design of the controls. A special type of rig involving a stretchy spline IK setup that reacts with the intuitive controls of an FK hierarchy will be used for the back (spine) of The Jerk. It will give him the ability to stretch his back evenly, similar to the real stretching ability of a spine. It will also allow normal, traditional FK-style rotations of the controls for certain poses that should not be controlled by an IK rotational element. The ability to stretch more than would be anatomically correct will exist, and it will be the animator's job to decide how much the back will stretch, bend, and so on.

The legs of the character will be rigged using IK because The Jerk will need to stick mostly to the ground for walking. The arms will also be rigged using IK, but a simple IK parenting technique will be used to allow for FK-style rotation of the shoulders, as well as IK-style translation placement for The Jerk's clavicle and hand. This will give the character animator full control to pose the characters. Both the arms and the legs of The Jerk will have automatic stretching built into their IK rigs as well. This adds another level of control for the animators, especially when sticking the feet or hands onto objects, because the legs and arms will actually stretch to any length to meet the placement of the hands or feet.

The Advanced Biped Spine

Let's start the first advanced character setup exercise with creating what I have coined "the Divine Spine." There has been much talk about spine controls over the years, and several techniques in Maya lend themselves to achieving promising results, but these techniques are missing key elements from other styles of rigging that many animators and riggers prefer. Thus arises the basic dilemma of character rigging: How do you really manipulate the transformation space to achieve the ultimate combination of motion capabilities, while still successfully maintaining straightforward ease of use and production-level stability?

This advanced spine setup solves many, if not all, of the problems that certain pre-existing techniques for spine setups contain. It also combines the best of both FK controls and IK controls, which enabling the animator to operate in both FK and IK seamlessly at the same time while animating the character. No uncomfortable or unintuitive switching on and off of weighted attributes is required. I designed the Divine Spine setup with these requirements:

  1. Be able to move the hips of the character without changing the location or moving the shoulders, and be able to move the shoulders without changing the position of the hips.

  2. Still be able to grab a control and rotate it in any direction. It should intuitively rotate the character's back hierarchically as if it were a simple FK joint hierarchy.

  3. Be able to grab the same character control and translate it, and intuitively translate the character's spine like a spline IK setup.

  4. Be able to compress and stretch uniformly between vertebrae when the controls are animated.

  5. Be controlled by a minimal number of control joints, yet still allow for a large number of actual spine joints.

  6. Be stable, predictable, and production-worthy. It should not use some forced mathematical function to compute secondary motion that will make the animator "fight" with the motion.

This spine setup is a versatile approach and can be used effectively to rig extremely realistic spine controls as well as cartooney ones.

Without further ado, let's begin.

Exercise 17.4 The Divine Spine Setup

  1. First, create your joint hierarchy and orient the joints. I usually use a total of 12 to 18 joints for the base hierarchy of the spinal column, but you can use more or less, depending on your character's requirements. For this setup to work properly, you must be sure of the following things:

    • Scale Compensate is turned on in the Joint tool options before you draw your joints.

    • All your joints have been properly oriented before proceeding, with the Scale option checked on in the Orient Joint options window before you perform the Orient Joint operation (see Figure 17.18).

    Figure 17.18
    Make sure Scale Compensate is turned on and that you properly orient all your joints before proceeding.

    Note - If you prefer to start with a precreated joint hierarchy, you can open the file Jerk_DivineSpine_Begin.mb on the CD that comes with this book.

  2. Create a spline IK handle from the first to the last joints in the hierarchy using the Skeleton IK Spline Handle Tool options. Make sure that Auto Simplify Curve is turned off in the spline IK options (see Figure 17.19).

  3. Select the spline IK curve that the IK Spline Handle Tool created for you automatically. Then create a curve info node by executing the following MEL command in the command line (by all probability, your curve might actually be named curve1):

  4. Select the Spline IK curve, open the Hypergraph, and select the menu item Graph, Input and Output Connections to view upstream in the Hypergraph.

    You should see a node attached to your curve called curveInfo. This node contains the length of your curve (see Figure 17.20).

    Figure 17.19
    Make sure that Auto Simplify Curve is turned off in the spline IK options.

    Figure 17.20
    The curveInfo node contains the length of your curve.

  5. From the Utilities tab of the createRenderNode window (accessible from the menu path Create, Create New Node in the Hypershade), create a multiplyDivide node.

  6. Double-click the multiplyDivide node to display the Attribute Editor and set Operation to Divide. Open the Hypergraph and display the input and output connections along with the spline IK's NURBS curve (see Figure 17.21).

    Figure 17.21
    Switching the multiplyDivide node's Operation attribute to Divide mode in the Attribute Editor.

    Note - If at any time you lose sight of your utility node (such as multiplyDivide) and you can't seem to find it for selection, you can usually find it in the Hypershade window's Utilities tab. If this fails (because the node isn't connected to the defaultRenderUtilityList), you can always select all the nodes of that type or with that name, and then find the one you want by using MEL and either node type or wildcard name using the select command.

    To select by node type, execute this MEL command:

    select Ðadd `ls Ðtype multiplyDivide`;

    To select by wildcard name, execute this MEL command:

    select Ðadd Ò*multiplyDivide*Ó;

    You can then click Graph, Input and Output Connections and see all the nodes you are looking for. This easy technique works for any node type or node name in your Maya scene, by the way.

Created: March 11, 2003
Revised: November 7, 2003

URL: http://webreference.com/3d/insidemaya/1