Visibility Controllers


With all these icons lying around, your Maya scene can become messy and difficult to navigate. The final tool we will use in this chapter is a visibility control, which lets us show or hide the various icons. For the animator, it's an easy way to identify what icons are needed and hide the ones not being used.

Before we implement the visibility control, we first need to take a broad look at our scene. Load the Kila_XtrasRig.mb file you have been working on so far, and open up the Outliner. As you can see in Figure 12.73, left, we have lots of new objects that are forming the rig. Let's compile them all into a nice neat group.

Figure 12.73. Tidy up the Kila and Grae scenes' contents before you proceed.


Select everything except the main LOD group (KilaLOD), the main scene cameras, and the RootControl group. We omit this last element because it contains the main skeleton. For now, all we want are parts of the rig. So group everything you have selected into a new group, Kila_Controls (Figure 12.73, middle). Also, rename the RootControl group so that you have a better idea of what it is; call it Kila_Skeleton.

The scene is now much tidier, as seen in Figure 12.73, right. Anyone else coming in to use it will have a good idea of what's where.

Do the same tidying up in Grae_Xtras.mb.

Now let's implement our visibility controller.

1.

Import the file Icon_Visibility.mb and rename the VisibilityControl icon to KilaVisibility. We do this because it will help us to differentiate her visibility controls if we were to import other characters into the scene.

2.

Move the new icon up above Kila's head (see Figure 12.74). Freeze the transforms.

Figure 12.74. Position the visibility icon above Kila's head.


3.

So that the icon stays with the actual rig as it moves, point-constrain it to the root joint. Select the root joint and then, holding Shift, add the visibility icon to the selection. Go to Constrain > Point, making sure Maintain Offset is enabled.

Now that the icon is in place and fixed to the rig, we can start to add attributes to it that will control the other icons' visibility. Think carefully about what you want to be able to control. In this case, let's add the ability to turn all the icons on and off; we can add that control to the actual geometry, too.

4.

Add two Boolean attributes to the KilaVisibility icon, called AllIcons and AllGeom. We can also add the ability to simply view the icons in certain regions. Add another three Boolean attributes called LeftIcons, MiddleIcons, and RightIcons.

Think of other visibility controls you'd like to have: Maybe you would like to control each icon separately? Feel free to add more if you want. Otherwise, let's go ahead and connect up the ones we've added so far.

1.

Open the Connection Editor (Window > General Editors > Connection Editor).

2.

Select the KilaVisibility icon, and click the Reload Left button to load the icon into the Outputs list. In the Inputs list, load the Kila_Controls group.

3.

As shown in Figure 12.75a, connect the AllIcons attribute to the Visibility attribute.

Figure 12.75a. Connecting the new Visibility attributes


4.

All the icons now disappear. This happens because the Boolean attributes you've created are set to Off by default. Go through each one now and set these to On.

5.

Load the KilaLOD group into the Inputs list, and connect the AllGeom attribute to the Visibility attribute (Figure 12.75b).

Figure 12.75b. Connecting the new Visibility attributes


6.

For the next attribute, LeftIcons, we will need to control the visibility of a number of objects at once. Select all the left-side objects (L_ConShoulder, L_Arm_IK, L_ConHand, LeftHand, LeftFoot, and L_KneePos), and click Reload Right in the Connection Editor.

7.

As shown in Figure 12.75c, select LeftIcons; then work your way down the Inputs list, selecting all the Visibility attributes.

Figure 12.75c. Connecting the new Visibility attributes


8.

For the MiddleIcons attribute, load Root_Control, HeadRotation, EyeControl, BreastControls, and HairSwing into the Inputs list. Then connect MiddleIcons to all their visibility icons (Figure 12.75d).

Figure 12.75d. Connecting the new Visibility attributes


9.

Select R_ConShoulder, R_Arm_IK, R_ConHand, RightHand, RightFoot, and R_KneePos, and click Reload Right.

10.

Connect the RightIcons attribute to all the Visibility attributes on the right (Figure 12.75e).

Figure 12.75e. Connecting the new Visibility attributes


Save the scene as Kila_VizRig.mbwe now have complete control over how the icons are viewed. This should make the animation process much easier.

Follow this same procedure to apply visibility controls to Grae.



    Game Character Development with Maya
    Game Character Development with Maya
    ISBN: 073571438X
    EAN: 2147483647
    Year: 2004
    Pages: 169
    Authors: Antony Ward

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net