3ds Max 2012 Bible - Kelly L. Murdock [387]
Note
If you use a parameter such as Radius as part of an Expression, then the parameter is unavailable in the Modify panel if you try to change it by hand. •
Figure 36.8 shows the balloon as it is being inflated.
FIGURE 36.8
A balloon being inflated using an Expression controller to control the Push modifier
Animating materials with the Expression controller
You can locate the material's parameter in the Track View and assign the Expression controller to it to control material parameters. Some of these parameters are scalar values, but any material parameter set with a color swatch has a Point3 return type.
When using material parameters and color values, be sure not to combine them in expressions with vector values.
Wiring Parameters
When parameters are wired together, the value of one parameter controls the value of the parameter to which it is wired. This is a powerful animation technique that lets a change in one part of the scene control another aspect of the scene. Another way to use wired parameters is to create custom animation controls such as a slider that dims a light source that animators can use as needed.
Using the Parameter Wiring dialog box
You can access the Parameter Wiring dialog box in several places. The Animation⇒Wire Parameters⇒Wire Parameters (Ctrl+5) menu makes a pop-up menu of parameters appear. Selecting a parameter from the menu changes the cursor to a dotted line (like the one used when linking objects). Click the object that you want to wire to, and another pop-up menu lets you choose the parameter to wire to. The Parameter Wiring dialog box appears with the parameter for each object selected from a hierarchy tree.
You can also wire parameters by right-clicking the quadmenu and selecting Wire Parameters. The Wire Parameters option is disabled if multiple objects are selected.
The Parameter Wiring dialog box (Alt+5), shown in Figure 36.9, displays two tree lists containing all the available parameters. This tree list looks very similar to the Track View and lets you connect parameters in either direction or to each other. If you used the Wire Parameters feature to open the Parameter Wiring dialog box, then the parameter for each object is already selected and highlighted in yellow.
FIGURE 36.9
The Parameter Wiring dialog box can work with expressions.
The three arrow buttons between the two tree lists let you specify the connection direction. These buttons connect the parameter in one pane to the selected parameter in the opposite pane. The direction determines whether the parameter in the left pane controls the parameter in the right pane, or vice versa. You can also select the top bidirectional button to make the parameters mutually affect each other. Below each tree list is a text area where you can enter an expression. An expression is a mathematical statement that follows a specific syntax for defining how one parameter controls the other. These expressions can be any valid expression that is accepted in the Animation Controller dialog box or in MAXScript.
Cross-Reference
You can learn more about creating and using expressions in Chapter 22, “Animating with Constraints and Simple Controllers.” •
After an expression is entered, click the Connect button to complete the wiring. Based on the connection direction, the Master radio button indicates which object controls the other. You can also use this dialog box to disconnect existing wired parameters. You can use the icon buttons at the top of the dialog box, shown in Table 36.1, to Show All Tracks, to find the next wired parameter, and to refresh the tree view.
After the wiring is completed, the Parameter Wiring dialog box remains open. You can try out the wiring by moving the master object. If the results aren't what you wanted, you can edit the expression and click the Update button (the Connect button changes to an Update button).
Note
When you select objects to be wired, the order in which