| home / 3D / insidemaya / 1 | [previous] [next] |
|
|
Control boxes are the visual handles that the character animator uses to animate the character. The control boxes are an extra layer of setup hooked up to your skeleton's joints, IK, and hierarchical controls to give the animator a simple and intuitive way to see and select all the controls for your character that are meant to be animated. All the translation and rotation of your character should happen on character control boxes, not on random locators or selection handles that are difficult to see or select.
Control boxes can be made of NURBS curves or of polygon objects that have been disconnected from a shader. NURBS curves are the most common choice because you can isolate them for selection while animating using the NURBS Curve option in the Object Mode Pick Mask menu. You can also quickly view them on or off with the Show NURBS Curve option of the Show menu of your current 3D view port window (or from the HotBox).
Open the file CharacterControlBox.mb on the accompanying CD to see exactly what a control box is. As you can see, it is just a NURBS curve that has been shaped so that it creates a cubelike box shape—hence the name control box (see Figure 17.15). Control boxes can, of course, be any shape and size (because they are just NURBS curves), and the CVs of the curve itself can always be hand-tweaked to produce the correct shape.
Figure 17.15
A control box.
You can hook up a control box to a rigged character in several ways. Basically, the main goal is to in some way connect the transformation controls of the control box into the transformation controls of the character rig. You can achieve this through expressions, complex node networks, or just simple constraints or parenting relationships.
The most common and straightforward methods for hooking up control boxes to your character are the following:
Transform (object) parenting—Simply parent your control as a child of your control box. This works easily and efficiently for things such as IK handles and constrained locators, as well as groups that are meant to control translation or rotation.
Shape parenting—You do this by parenting the NURBS curves' shape nodes (not the transform, but the shape, which you have to load into the Hypergraph and graph input and output connections to see and select). Making the NURBS curve shape a child of the actual transform that you are trying to hook up the control box for enables you to use the curve as a selection handle for the actual joint or hierarchical animation control.
You can do this by first point-snapping the NURBS curve to the joint that you want to hook it onto. Next, parent the NURBS curve transform to the joint and click Modify, Freeze Transformations on the NURBS curve. Select the NURBS curve shape. (Make sure the node says Shape at the end, in Hypergraph, Graph, Input and Output Connections. Also be sure you have the shape selected, not the transform.) Then Shift+select to add to the current selection the joint (or any other transform node) that you want to hook up the NURBS curve as a selection handle for. Then perform this MEL command:
parent Ðr Ðshape;
This parents the NURBS curve shape node under the transform for the joint. Now you should be able to select the curve in the view port window, but in actuality you are selecting the transform of the object that you just parented the NURBS curve shape onto.
Grouped control boxes with constraints—Create a group node that has the same orientation and translation space as the joint or node that you are hooking up the control box. Then make this node the parent of your control box. You then freeze transforms on the control box and point-constrain it to the joint that you are hooking up to. Orient-constrain the joint to the control box so that it controls the rotations.
You can create a group node that has the same orientation and translation space as the joint or node that you are hooking up the control box to in two different ways. First, you can create a null transform by selecting nothing and then hitting Ctrl+g. Next, you can give the null the same transform pivots as the joint or node you are trying to hook up to. You do that in two ways:
Point-, orient-, and scale-constrain the null transform node to the joint. Then immediately delete the constraint nodes to give the null transform node the same transform space as the joint.
Point-snap the null transform node directly on top of the joint. Then temporarily parent the null to the joint, freeze transforms on the null, and unparent it back into its original hierarchy to give the null transform node the same transform space as the joint.
Grouped control boxes with direct connections—Create a null group node, and point- and orient-constrain it to the parent node of the actual joint or transform that you are trying to hook the control box onto. Next, create a group node that has the same orientation and translation space as the joint or node that you are hooking the control box up to; make this node the parent of your control box. Parent your control box group node under the constrained null. Then freeze transforms on the control box and open the Connection Editor. Load the NURBS curve's rotates on the left side and the joint's rotates on the right, and directly connect them to one another so that the control box is driving the rotations of the joint. Even though they are directly connected, they will always move together properly because the parents are linked with constraints and the nodes are both in the same transform space.
Connecting your control boxes is really a crucial element of rigging your character because it is one of the last steps before your character is ready for animation testing. treat the process of hooking them up to your character accordingly. One thing to remember, though, is that it really doesn't matter how you get your control boxes hooked up to control your character, as long they work correctly and move the correct nodes around. Sometimes on simple characters you can get away with purely parenting techniques or direct connections alone (which is perfectly acceptable). Another good idea when it comes to hooking up your control boxes is to keep the translates and rotates of the control boxes transforms capable of going back to zero as the default attribute state. Therefore, if you need to move, scale, or position your control box, simply enter Component mode and shape it using the control vertices. This also usually means freezing the transforms before actually going through the process of connecting the box to control a joint or other transform node.
Also remember that control boxes are simply used to select animation controls for your character and to move the character around. The goal of these controls is that they be immediately accessible and selectable from any view. Sometimes it is difficult, but do whatever you can to make the controls easy to see and select from most angles. This includes making controls somewhat uneven in shape or asymmetrical, as well as color-coding so that if one is right on top of the other, it is still quite intuitive to differentiate between the two control boxes.
Here are a few easy ways to color-code your control boxes in Maya:
By clicking Display, Wireframe Color with the object selected, you can easily change the color of just about any object without modifying attributes that other parts of Maya directly use to change the color of the node as well (such as the Layer Editor).
Open the Attribute Editor of the node and expand the Object Display frame layout. Then expand the Display Overrides subsection of the Object Display layout. Next, turn on the check box that reads Enable Overrides. Now the lower section that reads Color becomes enabled, and you can drag the slider and choose any color that you want.
Simply make a layer and assign your objects to that layer. Then just change the layer color. This is the least preferred method because you really don't want to have to make a layer for every single object whose wireframe color you want to change.
Note - Changing the wireframe display color affects only the OpenGL display of the node, not any look or color attributes of the shader or the software-rendered elements. However, it affects the "hardware"-rendered wireframe color.
Figures 17.16 and 17.17 show the control boxes for The Jerk and Spot models, respectively.
Figure 17.16
The control boxes for The Jerk.Figure 17.17
The control boxes for Spot.
| home / 3D / insidemaya / 1 | [previous] [next] |
Created: March 27, 2003
Revised: November 7, 2003
URL: http://webreference.com/3d/insidemaya/1