3ds Max 2012 Bible - Kelly L. Murdock [388]
After you've made a connection in the Parameter Wiring dialog box, the track name for the controlling object turns green, and the track name of the object being controlled turns red. If you make a bidirectional connection, then both tracks turn green.
Manipulator helpers
To create general-use controls that can be wired to control various properties, Max includes three manipulator helpers. These helpers are Cone Angle, Plane Angle, and Slider. They are available as a subcategory under the Helpers category of the Create panel or in the Create⇒Helpers⇒Manipulators menu.
For the Cone Angle helper, you can set the Angle, Distance, and Aspect settings. The default cone is a circle, but you can make it a square. The Plane Angle helper includes settings for Angle, Distance, and Size.
You can name the Slider helper. This name appears in the viewports above the slider object. You can also set a default value along with maximum and minimum values. To position the object, you can set the X Position, Y Position, and Width settings. You can also set a snap value for the slider.
Once created, you can use these manipulator helpers when the Select and Manipulate button on the main toolbar is enabled (this button must be disabled before the manipulator helpers can be created). The advantage of these helpers is in wiring parameters to be controlled using the helpers.
Tutorial: Controlling a crocodile's bite
One way to use manipulator helpers and wired parameters is to control within limits certain parameters that can be animated. This gives your animation team controls they can use to quickly build animation sequences. In this example, you use a slider to control a crocodile's jaw movement.
To create a slider to control a crocodile's bite, follow these steps:
1. Open the Biting crocodile.max file from the Chap 36 directory on the CD.
This file includes a crocodile model created by Viewpoint Datalabs. For this model, the head, eyes, and upper teeth have been joined into a single object, and the pivot point for this object has been moved to where the jaw hinges.
2. Select Create⇒Helpers⇒Manipulators⇒Slider, and click in the Perspective view above the crocodile. Name the slider Croc Bite, and set the Maximum value to 60.
3. With the Slider selected, choose Animation⇒Wire Parameter⇒Wire Parameter (or press the Ctrl+5) to access the pop-up menu. Choose Object (Slider)⇒value option, drag the dotted line to the crocodile's head object, and click. Choose Transform⇒Rotation⇒Y Rotation.
The Parameter Wiring dialog box appears.
4. In the Parameter Wiring dialog box, click the direction arrow that points from the Slider to the head so that the slider is set to control the head. Then click the Connect button and drag the Slider.
Note
Before you can drag the slider, you need to enable the Select and Manipulate button in the main toolbar. •
The crocodile's jaw spins around erratically. This happens because the rotation values are in radians and you need them in degrees.
5. In the expression text area under the head object, enter the expression degToRad(value) and click the Update button. Then drag the Slider again.
Now the values are in degrees, and the range is correct, but the croc's upper jaw rotates unrealistically through the bottom jaw. This can be fixed by multiplying by a negative 1.
6. In the expression text area under the head object, update the expression to be -1*degToRad(value) and click the Update button.
7. Click the Select and Manipulate button on the main toolbar, and drag the slider to the right.
The crocodile's mouth opens.
Figure 36.10 shows the crocodile biting using the slider control.
FIGURE 36.10
A slider control is wired to open the crocodile's mouth.
Collecting Parameters
To help in organizing the various parameters that you use to animate a scene, you can use the Parameter Collector to gather all custom and animated parameters used in the scene.