Working with Keys


It isn't just a coincidence that the largest button in the entire Max interface has a key on it. Creating and working with keys is how animations are accomplished. Keys define a particular state of an object at a particular time. Animations are created as the object moves or changes between two different key states. Complex animations can be generated with only a handful of keys.

You can create keys in numerous ways, but the easiest is with the Key Controls found on the lower interface bar. These controls are located to the left of the Time Controls. Table 29.2 displays and explains all these controls. Closely related to the Key Controls is the Track Bar, which is located under the Time Slider.

Table 29.2: Key Controls
Open table as spreadsheet

Toolbar Button

Name

Description

image from book

Set Key (K)

Creates animation keys in Set Key mode.

image from book

Toggle Auto Key Mode (N)

Sets keys automatically for the selected object when enabled.

image from book

Toggle Set Key Mode (')

Sets keys as specified by the key filters for the selected object when enabled.

image from book

Selection Set drop-down list

Specifies a selection set to use for the given keys.

image from book

Default In/Out Tangents for New Keys

Assigns the default tangents that are used on all new keys.

image from book

Open Filters Dialog box

Contains pop-up options for the filtering keys.

Max includes two animation modes: Auto Key (N) and Set Key ('). You can select either of these modes by clicking the respective buttons at the bottom of the interface. When active, the button turns bright red, and the border around the active viewport also turns red to remind you that you are in animate mode. Red also appears around a spinner for any animated parameters.

Auto Key mode

With the Auto Key button enabled, every transformation or parameter change creates a key that defines where and how an object should look at that specific frame.

To create a key, drag the Time Slider to a frame where you want to create a key and then move the selected object or change the parameter, and a key is automatically created. When the first key is created, Max automatically goes back and creates a key for frame 0 that holds the object's original position or parameter. Upon setting the key, Max then interpolates all the positions and changes between the keys. The keys are displayed in the Track Bar.

Each frame can hold several different keys, but only one for each type of transform and each parameter. For example, if you move, rotate, scale, and change the Radius parameter for a sphere object with the Auto Key mode enabled, then separate keys are created for position, rotation, scaling, and a parameter change.

Set Key mode

The Set Key button (') offers more control over key creation and sets keys only when you click the Set Key button (K). It also creates keys only for the key types enabled in the Key Filters dialog box. You can open the Key Filters dialog box, shown in Figure 29.2, by clicking the Key Filters button. Available key types include All, Position, Rotation, Scale, IK Parameters, Object Parameters, Custom Attributes, Modifiers, Materials, and Other (which allows keys to be set for manipulator values).

image from book
Figure 29.2: Use the Set Key Filters dialog box to specify the types of keys to create.

Tutorial: Rotating a windmill's blades

The best way to learn is to practice, and there's no better time to practice than now. For this quick example, you animate a set of blades on a windmill.

To animate a set of windmill blades rotating, follow these steps:

  1. Open the image from book Rotating windmill blades.max file from the Chap 29 directory on the DVD.

    This file includes a windmill model created by Viewpoint Datalabs.

  2. Click the Auto Key button (or press the N key) at the bottom of the Max window, and drag the Time Slider to frame 50.

  3. Select the "prop" object at the top of the windmill in the Front viewport. The blades are attached to the center prop and rotate about its Pivot Point. Then click the Select and Rotate button on the main toolbar (or press E key), and rotate the "prop" object about its Y-axis.

  4. Click the Auto Key button (or press the N key) again to disable animation mode. Select the key in the Track Bar located at frame 1, hold down the Shift key, and drag the key to frame 100 (or press the End key).

    This step copies the key from frame 1 to frame 100. Doing so ensures a smooth looping animation (even though it spins the prop forward and then backward; I guess it must be a strange wind that's blowing).

  5. Click the Play Animation button in the Time Controls to see the animation.

Figure 29.3 shows frame 50 of this simple animation.

image from book
Figure 29.3: Frame 50 of this simple windmill animation

Creating keys with the Time Slider

Another way to create keys is to select the object to be animated and right-click the Time Slider button. This opens the Create Key dialog box, shown in Figure 29.4, where you can set Position, Rotation, and Scale keys for the currently selected object. You can use this method only to create transform keys.

image from book
Figure 29.4: The Create Key dialog box enables you to create a Position, Rotation, or Scale key quickly.

If a key already exists, you can clone it by dragging the selected key with the Shift key held down. Dragging the Track Bar with the Ctrl and Alt keys held down changes the active time segment.

Copying parameter animation keys

If a parameter is changed while the Auto Key mode is enabled, then keys are set for that parameter. You can tell when a parameter has a key set because the arrows to the right of its spinner are outlined in red when the Time Slider is on the frame where the key is set. If you change the parameter value when the spinner is highlighted red, then the key value is changed (and the Auto Key mode doesn't need to be enabled).

If you highlight and right-click the parameter value, a pop-up menu of options appears. Using this pop-up menu, you can Cut, Copy, Paste, and Delete the parameter value. You can also select Copy Animation, which copies all the keys associated with this parameter and lets you paste them to another parameter.

Pasting the animation keys can be done as a Copy, an Instance, or a Wire. A Copy is independent; an Instance ties the animation keys to the original copy so that they both are changed when either changes; and a Wire lets one parameter control some other parameter.

Caution 

To copy a parameter value, be sure to select and right-click the value. If you right-click the parameter's spinner, the value is set to 0.

The right-click pop-up menu also includes commands to let you Edit a wired parameter, show the parameter in the Track View, or show the parameter in the Parameter Wire dialog box.

CROSS-REF 

Parameter wiring and the Parameter Wire dialog box are discussed in more detail in Chapter 31, "Using Animation Modifiers and Wiring Parameters."

Deleting all object animation keys

Individual keys can be selected and deleted using the Track Bar or the right-click pop-up menu, but if an object has many keys, this can be time consuming. To delete all animation keys for the selected object quickly, choose the Animation image from book Delete Selected Animation menu command.




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

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