Tải bản đầy đủ (.pdf) (151 trang)

kelly l murdock 3ds Max 2009 Bible phần 8 potx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (10.51 MB, 151 trang )

Reversing, inserting, and scaling time
The Reverse Time button flips the keys within the selected time block.
The Insert Time button lets you insert a section of time anywhere within the current track. To insert time,
click and drag to specify the amount of time to insert; all keys beyond the current insertion point slide to
accommodate the inserted time.
The Scale Time button scales the selected time block. This feature causes all keys to be pushed closer
together or farther apart. The scaling takes place around the current frame.
Setting ranges
The Position Ranges button on the Ranges toolbar enables you to move ranges without moving keys. In this
mode, you can move and scale a range bar independently of its keys, ignoring any keys that are out of
range. For example, this button, when enabled, lets you remove the first several frames of an animation
without moving the keys. The Recouple Ranges button can be used to line up the keys with the range again.
The left end of the range aligns with the first key, and the right end aligns with the last key.
Editing Curves
When an object is moving through the scene, estimating the exact point where its position changes direc-
tion can sometimes be difficult. Function curves provide this information by presenting a controller’s value
as a function of time. The slope of the function curve shows the value’s rate of change. Steep curves show
quick movements. Shallow lines are slow-moving values. Each key is a vertex in the curve. Function curves
are visible only in the Curve Editor and the Track Bar layout.
Function curves mode lets you edit and work with these curves for complete control over the animation
parameters. Figure 34.9 shows the Position curves for a sphere that moves about the scene.
FIGURE 34.9
Function curves display keys as square markers along the curve.
846
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 846
Inserting new keys and moving keys
Function curves with only two keys have slow in and out tangents, making the animation start slow, speed
up, and then slow down. You can add more curvature to the line with the addition of another key. To add
another key, click the Add Keys button, and then click the curve where you want to place the key.


Keep the total number of keys to a minimum. More keys make editing more difficult.
If the curve contains multiple curves, such as a curve for the Position or RGB color values, then a point is
added to each curve. The Move Keys button enables you to move individual keys by dragging them. It also
includes flyouts for constraining the key movement to a horizontal or vertical direction.
Click the Scale Keys button to move the selected keys toward or away from the current time. The keys
move only horizontally. Click the Scale Values button to move the selected keys toward or away from the
zero value. The keys move only vertically.
Tutorial: Animating a monorail
As an example of working with function curves, you’ll animate a monorail that moves around its track,
changing speeds, and stopping for passengers.
To animate the monorail using function curves, follow these steps:
1. Open the Monorail.max file from the Chap 34 directory on the DVD.
This file contains a simple monorail setup made from primitives.
2. Click the Play button, and watch the train move around the track.
As a default, the Path Constraint’s Percent track has a Linear controller that causes the train to
move at a constant speed. To refine the animation, you need to change it.
3. Open the Track View–Curve Editor, and locate the train group’s Percent track. (You can find this
track under the Objects ➪ Train ➪ Transform ➪ Path Constraint ➪ Percent menu command.) Click
the Assign Controller button or right click and select Assign Controller from the pop-up menu to
open the Assign Float Controller dialog box. Select the Bézier Float controller, and click OK.
If the Objects track isn’t visible, open the Filter Tracks dialog box and make sure the Objects
option is enabled.
4. Click the Play button. The train starts slowly (represented by the flattish part of the curve), accel-
erates (the steeper part of the curve), and slows down again (another flattish part).
When “reading” function curves, remember that a steep curve produces fast animation, a shal-
low curve produces slow animation, a horizontal curve produces no movement or value
change, and a straight curve produces a constant animation.
5. You need the train to stop for passengers at the station, so click the Add Keys button (or right-
click and choose Add Keys) and add a key somewhere around frame 115 when the train is near
the dock.

6. Select the newly created key, and choose the Move Keys Horizontal button from the Move Keys
flyout. Hold down the Shift key, and drag right to copy the key to frame 135.
The curve is flat, so the train stops at the station.
TIP
TIP
NOTE
NOTE
TIP
TIP
847
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:26 PM Page 847
7. To adjust the actual position where the train stops, choose the Move Keys Vertical button from the
Move Keys flyout, select both keys, and move them up or down until the train’s position at the
station is correct.
Because the default in and out tangent types cause the curve to flatten out at the keys, the train
slows as it reaches the station and then starts out slow and picks up speed as it leaves the station.
Anyone who has ever ridden on a train knows that stopping and starting are not always smooth
operations. Next, you add a few more keys to make the train shudder to a stop and lurch as it
starts out again.
8. Click the Add Keys button (or right-click and choose Add Keys), and add keys somewhere
around frames 105, 109, 113, 142, and 150. Use Zoom Region to zoom in on the keys where the
train pulls into the station to stop.
9. Change the Move Keys Vertical button back to Move Keys by selecting it from the flyout, and
move the keys slightly up or down to send the train backward and forward along the path.
10. As you can see, a little movement goes a long way, so the keys need only to be offset a very small
amount. Use the Zoom Values button from the Zoom flyout and the Pan button to help in making
the small changes to the animation. Figure 34.10 shows the zoomed in view of this section of the
curve.

FIGURE 34.10
Using Zoom Values to see the stopping position keys
11. Repeat for the keys where the train leaves the station.
The train also needs to slow down to look at one of the famous buildings in “Primitive Town,” the
Tubular “building” on the far side of the track.
12. Add a couple more keys somewhere around frames 18 and 50. Lower the second of the new keys
until the curve is shallower but not horizontal. Again, adjust the train’s position on the track
(Percent along the path) by raising or lowering the two new keys.
13. Adjust the Out tangent handle of the very first key and the In tangent handle of the very last key
to produce a smooth looping animation.
Figure 34.11 shows the final curve after you’ve completed the editing, and Figure 34.12 shows the mono-
rail along its path.
848
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 848
FIGURE 34.11
The finished Percent curve for the train’s position along the path
FIGURE 34.12
The monorail and “Primitive Town”
849
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:26 PM Page 849
Drawing curves
If you know what the curve you want is supposed to look like, you can actually draw it in the Key pane
with the Draw Curves button enabled. This mode adds a key for every change in the curve. You may want
to use the Reduce Keys optimization after drawing a curve.
If you make a mistake, you can just draw over the top of the existing curve to make corrections.
Figure 34.13 shows a curve that was created with the Draw Curves feature.

FIGURE 34.13
Drawing curves results in numerous keys.
Reducing keys
The Reduce Keys button enables you to optimize the number of keys used in an animation. Certain IK
(inverse kinematics) methods and the Dynamics utility calculate keys for every frame in the scene, which
can increase your file size greatly. By optimizing with the Reduce Keys button, you can reduce the file size
and complexity of your animations.
Clicking the Reduce Keys button opens the Reduce Keys dialog box. The threshold value determines how
close to the actual position the solution must be to eliminate the key. Figure 34.14 shows the same curve
created with the Draw Curves feature after it has been optimized with a Threshold value of 0.5 using the
Reduce Keys button.
Working with tangents
Function curves for the Bézier controller have tangents associated with every key. To view and edit these
tangents, click the Show All Tangents button. These tangents are lines that extend from the key point with a
handle on each end. By moving these handles, you can alter the curvature of the curve around the key.
TIP
TIP
850
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 850
You can select the type of tangent from the Key Tangents toolbar. These can be different for the In and Out
portion of the curve. You can also select them using the Key dialog box. The default tangent type for all new
keys is set using the button to the left of the Key Filters button at the bottom of the Max interface. Using
this button, you can quickly select from any of the available tangent types.
FIGURE 34.14
The Reduce Keys button optimizes the curve by reducing keys.
You open the Key dialog box, shown in Figure 34.15, by selecting a key and clicking the Properties button
or by right-clicking the key. It lets you specify two different types of tangent points: Continuous and
Discontinuous. Continuous tangents are points with two handles on the same line. The curvature for contin-

uous tangents is always smooth. Discontinuous tangents have any angle between the two handle lines. These
tangents form a sharp point.
Holding down the Shift key while dragging a handle lets you drag the handle independently of
the other handle.
FIGURE 34.15
The Key dialog box lets you change the key’s Time, Value, or In and Out tangent curves.
The Lock Tangents button lets you change the handles of several keys at the same time. If this button is dis-
abled, adjusting a tangent handle affects only the key of that handle.
TIP
TIP
851
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:26 PM Page 851
Tutorial: Animating a flowing river
The default auto-tangent types create a function curve that has ease-in and ease-out built into the curve.
This causes the animation to start slowly, speed up, and then slow to a stop. While this may be a good start-
ing point for many animations, it won’t work for those that should have a constant speed. This example
shows how to create a river with a material animated to a constant speed.
To create a flowing river, follow these steps:
1. Open the River.max file from the Chap 34 directory on the DVD.
This file contains a river surface made from a loft. The V Offset for the River Water material’s dif-
fuse channel has been animated to simulate flowing water (yes, this river has a checkered past . . .).
2. Click the Play button.
The river flow starts out slow, speeds up, and then slows to a stop.
The river flows using a checker texture map. Make sure to select a viewport with textures
enabled to see the flowing effect.
3. Open the Track View–Curve Editor, and locate and select the V Offset track for the river’s mate-
rial. (You can find this track under the Objects ➪ Checkered River ➪ River Water ➪ Maps ➪
Diffuse Color: Map #2 (Checker) ➪ Coordinates ➪ V Offset menu command.)

4. You have two easy options for creating an animation with a constant speed. The first changes the
entire controller type; the second changes the individual key’s tangent types.
Option 1: Right-click over the V Offset track and choose Assign Controller or choose Assign from
Controller on the menu bar to open the Assign Float Controller dialog box. Select Linear Float,
and click OK.
or
Option 2: Select both keys by clicking one key, holding down the Ctrl button, and clicking the
other, or by dragging an outline around both keys. Click the Set Tangents to Linear button.
Whichever method you use, the line between the two keys is now straight.
5. Click the Play button.
The river now flows at a constant speed.
6. To increase the speed of the flow, select Move Keys Vertical from the Move Keys button flyout,
and select and move the end key higher in the graph.
The river flows faster.
Figure 34.16 shows the river as it flows along.
Applying out-of-range, ease, and multiplier curves
Out-of-range curves define what the curve should do when it is beyond the range of specified keys. For
example, you could tell the curve to loop or repeat its previous range of keys. To apply these curves, select a
track and click the Parameter Curve Out-of-Range Types button on the Curves toolbar (or select the Out-of-
Range menu command from the Controller menu). This opens a dialog box, shown in Figure 34.17, where
you can select from the available curve types.
NOTE
NOTE
852
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 852
You can also apply an out-of-range curve to a select range of frames using the Create Out-of-
Range Keys utility. This utility is available via the Track View Utilities button.
FIGURE 34.16

The Checkered River flows evenly.
By clicking the buttons below the types, you can specify a curve for the beginning and end. This Out-of-
Range dialog box includes six options:

Constant: Holds the value constant for all out-of-range frames

Cycle: Repeats the track values as soon as the range ends

Loop: Repeats the range values, like the Cycle option, except that the beginning and end points
are interpolated to provide a smooth transition

Ping Pong: Repeats the range values in reverse order after the range end is reached

Linear: Projects the range values in a linear manner when out of range

Relative Repeat: Repeats the range values offset by the distance between the start and end values
You can apply ease curves (choose Curves ➪ Apply Ease Curve, or press Ctrl+E) to smooth the timing of a
function curve. You can apply multiplier curves (Curves ➪ Apply Multiplier Curve, Ctrl+M) to alter the
scaling of a function curve. You can use ease and multiplier curves to automatically smooth or scale an ani-
mation’s motion. Each of these buttons adds a new track and function curve to the selected controller track.
NOTE
NOTE
853
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:26 PM Page 853
Ease and Multiplier curves add another layer of control on top of the existing animation and allow you to
edit the existing animation curves without changing the original animation keys. For example, if you have a
standard walk cycle, you can use an ease curve to add a limp to the walk cycle or you can reuse the walk
cycle for a taller character by adding a multiplier curve.

FIGURE 34.17
The Param Curve Out-of-Range Types dialog box lets you select the type of out-of-range curve to use.
Not all controllers can have an ease or multiplier curve applied.
You can delete these tracks and curves using the Delete Ease/Multiplier Curve button. You can also enable
or disable these curves with the Enable Ease/Multiplier Curve Toggle button.
After you apply an ease or multiplier curve, you can assign the type of curve to use with the Ease Curve
Out-of-Range Types button. This button opens the Ease Curve Out-of-Range Types dialog box, which
includes the same curve types as the Out-of-Range curves, except for the addition of an Identity curve type.
In the Ease Curve Out-of-Range Types dialog box is an Identity option that isn’t present in the
Parameter Curve Out-of-Range Types dialog box. The Identity option begins or ends the curve
with a linear slope that produces a gradual, constant rate increase.
When editing ranges, you can make the range of a selected track smaller than the range of the whole anima-
tion. These tracks then go out of range at some point during the animation. The Ease/Multiplier Curve Out-
of-Range Types buttons are used to tell the track how to handle its out-of-range time.
Tutorial: Animating a wind-up teapot
As an example of working with multiplier curves, you’ll create a wind-up teapot that vibrates its way across
a surface.
To animate the vibrations in the Track View, follow these steps:
1. Open the Wind-up teapot.max file from the Chap 34 directory on the DVD.
This file contains a teapot with legs.
2. Click the Play button.
NOTE
NOTE
NOTE
NOTE
854
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 854
The teapot’s key winds up to about frame 40 and then runs down again as the teapot moves

around a bit. To add the random movement and rotation to make the vibrations, you use Noise
controllers and Multiplier curves to limit the noise.
3. Open the Track View–Curve Editor, and navigate down to the Wind-up Key’s X Rotation track,
located at Objects, Teapot Group, Key, Rotation: Euler XYZ, X Rotation. Take a moment to
observe the shape of the curve, shown in Figure 34.18.
The key is “wound up” in short spurts and then runs down, slowing until it stops. The vibration,
then, should start midway and then taper off as the key runs down.
FIGURE 34.18
The rotation of the Wind-up Key object
4. Click the teapot in the viewport to have the curves for its transforms selected and centered in the
Track View.
When adding the Noise controller, you should assign a List controller first to retain the ability to
transform the object independently of the Noise.
Assigning controllers through the Animation menu automatically creates a List controller first.
5. Select the teapot’s Position track, and click the C key to access the Assign Controller dialog box.
Choose Position List. Under the Position track are now the X, Y, and Z Position tracks and an
Available track. Select the Available track, access the Assign Controller dialog box again, and
choose Noise Position. The default controller should remain the Position XYZ controller, so close
the List Controller dialog box. Click Play.
Remember that the C keyboard shortcut works only if the Keyboard Shortcut Override Toggle
button on the main toolbar is enabled.
The teapot vibrates the entire animation. You add a multiplier curve to correct the situation.
NOTE
NOTE
NOTE
NOTE
855
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:26 PM Page 855

6. Select the Noise Position track, and choose Curves ➪ Apply-Multiplier Curve. Select the
Multiplier curve track. Assign the first key a value of 0. Change its Out tangent to Stepped so it
holds its value until the next key. Click the Add Keys button, and add a key at frame 50 with a
value of 1. Move the last key to frame 120, and set a value of 0. The Multiplier curve should now
look like the curve in Figure 34.19. Select the Noise Position track.
The noise curve now conforms to the multiplier track.
FIGURE 34.19
The Multiplier curve keeps the Noise track in check.
7. With the Noise Position track still selected, right-click and choose Properties. In the Noise
Position dialog box, set the X and Y Strength to 30, set the Z strength to 20, and check the >0
check box to keep the teapot from going through the floor. Close the dialog box, and click Play.
The animation is much better. Next, you add some noise to the Rotation track.
8. Select the Rotation track, right-click, and choose Assign controller or click the C key to bring up
the Assign Controller dialog box. Select Rotation List, and click OK. Select the Available track,
access the Assign Controller dialog box again, and choose Noise Rotation.
Click Play. Again, the noise is out of control.
9. This time, select the Noise Strength track and add a multiplier curve.
You already have a perfectly good multiplier curve, so you can instance it into the new track.
10. Select the position multiplier track, right-click, and choose Copy. Now select the rotation Noise
Strength multiplier track, right-click, and choose Paste. Choose Instance, and close the dialog box.
11. Click the Play button, and watch the Teapot wind up and then vibrate itself along until it winds down.
Figure 34.20 shows the teapot as it dances about, compliments of a controlled noise controller.
856
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 856
FIGURE 34.20
The wind-up teapot moves about the scene.
Filtering Tracks and Creating Track Sets
With all the information included in the Track View, finding the exact tracks you need can be difficult. The

Filters button on the Keys toolbar (or on the Controllers toolbar) can help. Clicking this button opens the
Filters dialog box, shown in Figure 34.21.
Right-clicking the Filters button reveals a quick list of filter items.
Using the Filters dialog box
Using this dialog box, you can limit the number of tracks that are displayed in the Track View. The Show
section contains many display options. The Hide by Controller Type pane lists all the available controllers.
Any controller types selected from this list do not show up in the Track View. You can also elect to not dis-
play objects by making selections from the check boxes in the Hide By Category section.
TIP
TIP
857
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:26 PM Page 857
FIGURE 34.21
The Filters dialog box lets you focus on the specific tracks.
The Show Only group includes options for displaying only the Animated Tracks, Selected Objects, Selected
Tracks, Visible Objects, Keyable Tracks, Active Layer, or any combination of these. For example, if you
wanted to see the animation track for a selected object, select the Animated Tracks option and click OK;
then open the Filters dialog box again, choose Selected Objects, and click OK.
You can also specify whether the function curve display includes the Position, Rotation, and Scale compo-
nents for each axis or the RGB color components.
Creating a Track Set
A selection of tracks can be saved into a track set by clicking the Edit Track Set button located at the bottom
of the Track View interface. This button opens the Track Sets Editor, shown in Figure 34.22. Clicking the
Create a New Track Set button in the Track Sets Editor creates a new track set containing all the currently
selected tracks and lists it in the editor window. Selected tracks can be added, removed, and selected using
the other editor buttons.
After a track set is created, its tracks can be instantly selected by choosing the track set’s name from the
drop-down list located next to the Edit Track Set button at the bottom of the Track View window.

858
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:26 PM Page 858
FIGURE 34.22
The Track Sets Editor dialog box lets you name track selections for easy recall.
Working with Controllers
Controllers offer an alternative to positioning keys manually. Each controller can automatically control a
key’s position or a parameter’s value. The Controller toolbar includes several buttons for working with con-
trollers. The Copy Controller and Paste Controller buttons let you move existing controllers between differ-
ent tracks, and the Assign Controller button lets you add a new controller to a track.
Chapter 21, “Animating with Constraints and Controllers,” covers all the various controllers
used to automate animated sequences.
Although the buttons are labeled Copy Controller and Paste Controller, they can be used to copy different
tracks. Tracks can be copied and pasted only if they are of the same type. You can copy only one track at a
time, but that single controller can be pasted to multiple tracks. A pasted track can be a copy or an instance,
and you have the option to replace all instances. For example, if you have several objects that move
together, using the Replace All Instances option when modifying the track for one object modifies the tracks
for all objects that share the same motion.
All instanced copies of a track change when any instance of that track is modified. To break the linking
between instances, you can use the Make Controller Unique button.
Clicking the Assign Controller button opens the Assign Controller dialog box, where you can select the con-
troller to apply. If the controller types are similar, the keys are maintained, but a completely different con-
troller replaces any existing keys in the track.
CROSS-REF
CROSS-REF
Select the current track or
track set in the Track View
Create a
new track set

Highlight tracks selected
in the Track View
Delete track
sets or tracks
Add the Track View selection
to the current track set
Remove the Track View selection
from the current track set
859
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:27 PM Page 859
Using visibility tracks
When an object track is selected, you can add a visibility track using the Add Visibility Track button or the
Object Properties dialog box. This track enables you to make the object visible or invisible. The selected
track is automatically assigned the Bézier controller, but you can change it to an On/Off controller if you
want that type of control. You can use function curves mode to edit the visibility track.
Adding Note Tracks
You can add note tracks to any track and use them to attach information about the track. The Add Note
Track button is used to add a note track, which is marked with a yellow triangle and cannot be animated.
After you’ve added a note track in the Controller pane, use the Add Keys button to position a note key in
the Key pane by clicking in the note track. This adds a small note icon. Right-clicking the note icon opens
the Notes dialog box, where you can enter the notes, as shown in Figure 34.23. Each note track can include
several note keys.
The Notes dialog box includes arrow controls that you can use to move between the various notes. The field
to the right of the arrows displays the current note key number. The Time value displays the frame where a
selected note is located, and the Lock Key option locks the note to the frame so it can’t be moved or scaled.
You can use the Tracks ➪ Note Track ➪ Remove menu command to delete a selected note track.
FIGURE 34.23
The Notes dialog box lets you enter notes and position them next to keys.

Tutorial: Animating a hazard light
As an example of working with the Track View, you’ll animate a flashing hazard light in this tutorial.
To animate a flashing hazard light using function curves, follow these steps:
1. Open the Hazard.max file from the Chap 34 directory on the DVD.
This file contains a hazard barrier with a light.
2. Select Omni01, open the Track View–Curve Editor, and locate the omni light’s Multiplier track.
(You can find this track under the Objects ➪ Omni01 ➪ Object(Omni Light) ➪ Multiplier menu
command.) Click the Add Keys button (or press the A key), and create a key on the dotted line
(its current multiplier value) at frame 0 and at frame 15. Set the end key to a value of 1.2.
3. Select the first key and set its position to 0 by moving the key down or by typing 0 in the value
display field. Click the Zoom Value Extends button to better see the shape of the curve. Click the
Play button.
860
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:27 PM Page 860
The light comes on slowly. It should be either on or off, so you need to change the tangent types
to Stepped.
4. Select both keys, and click the Set Tangents to Stepped button. Click the Play button.
The light turns on at frame 15.
5. Select the first key, and choose the Move Keys Horizontal button from the Move Keys flyout. Hold
down the Shift key and drag right to copy the key at frame 30.
The light now turns off at frame 30. You can continue to make the rest of the keys in that fashion,
but using the Parameter Out of Range feature to complete the animation is easier.
6. With the Multiplier curve selected, click the Parameter Curves Out-of-Range Types button or
Choose Out-of-Range Types from the Controller menu item. The Out-of-Range Types dialog box
appears. Choose Cycle, and click OK.
Figure 34.24 shows the Stepped tangents.
FIGURE 34.24
The curve with Stepped in and out tangents and a Cycle Parameter Out-of-Range type

7. Click Play.
The light flashes off and on. The animation would be more convincing if the light lens object
appeared to turn off and on as well. Next, you animate the self-illumination of the lens material.
8. With the omni light’s multiplier track still selected, right-click over the track in the controller
pane and choose Copy. Locate and select the Light Lens material’s Self-Illumination track. (You
can find this track under the Scene Materials ➪ Lens (Standard) ➪ Shader Basic Parameters ➪
Self-Illumination menu command.) Right-click, choose Paste, and paste as Copy.
9. Because the Self-Illumination should top out at 100 percent, not 120 percent, select the second
key and change its value to 100. Click the Play button.
The Omni light and lens flash off and on together.
Figure 34.25 shows the hazard light as it repeatedly blinks on and off.
861
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:27 PM Page 861
FIGURE 34.25
The hazard light flashing on
Tutorial: Animating a checkers move
As an example of working with function curves, you’ll animate a checkers move in this tutorial. It is often
easiest to block in the animation using key-framing and then to refine the animation in the Track View.
To animate a white checker making its moves, follow these steps:
1. Open the Checkers.max file from the Chap 34 directory on the DVD.
This file contains a simple checkerboard with one white piece and three red pieces.
The white checker is on the wrong colored square to start, so first you move it into place and then
to each successive position.
2. Turn on Auto Key. Move the time slider to frame 25, and move the white checker to the square
with the “1” text object (visible in the Top viewport). Move the time slider to 50, and move the
white piece to the “2” position. At frame 75, move it to the “3” position, and at 100, move it to
the “4” position. Turn off Auto Key.
3. Right-click over the white piece, and choose Curve Editor to open the Track View–Curve Editor.

The white piece’s X, Y, and Z Position tracks should be highlighted, and you should be able to see
the function curves in the graph editor. If not, find them by choosing Objects ➪ White Piece ➪
Transform ➪ Position ➪ X, Y and Z Position.
862
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:27 PM Page 862
Keeping in mind that RGB (red, green, blue) = XYZ, you can see the white checker’s movement
across the board. From 0 to 25, it moves only in the X direction. From 25 to 100, it moves diago-
nally across the board as indicated by the slope of both the X and Y curves. Note that when the
object goes back the other way in the X direction at frame 75, the curve goes in the opposite
direction, as shown in Figure 34.26.
FIGURE 34.26
The blocked-in animation curves for the white piece
4. Click the Play button.
The white piece slides sloppily around the board. Next, you create keys to make it hop over the
red pieces.
5. Click the Add Keys button, or select Add Keys from the right-click menu. Click to add keys on
the Z-position track between the second, third, fourth, and fifth keys.
6. Select Move Keys Vertical from the Move Keys flyout, and select the three new keys. Move them
up about 50 units, as shown in Figure 34.27.
FIGURE 34.27
The new keys are moved up.
The white piece hops over the red pieces, but the motion is not correct. The In and Out tangents
should be fast so the piece does not spend much time on the board.
863
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:27 PM Page 863
7. With the new keys still selected, hold the Shift key down, and move the handles on the keys to

make them discontinuous tangent types, as shown in Figure 34.28.
FIGURE 34.28
The In and Out tangents corrected for the new keys
The hopping looks better, but the sliding motion would look better with a slight pause before
hopping over the first red piece.
8. Select Move Keys Horizontal from the Move Keys flyout, and choose the second X-position track
key. Hold down the Shift key, and move the key a few frames to the left to make a copy of the
original key. Click the play button.
The red pieces should disappear as the white piece hops over them.
9. Scroll down the Controller pane on the left, and select the three red pieces. Under Tracks on the
menu bar, choose Visibility ➪ Add.
A visibility track has been added to each of the red pieces, directly below the root name.
With visibility, a value of 0 is invisible, and a value of 1 is visible. You could change the tangent
types to Stepped to turn the red pieces invisible from one frame to the next, but changing the
entire track to an On/Off controller helps to visualize what is happening.
10. Select the visibility track for Red Piece 01. Right-click, and choose Assign Controller. Choose
On/Off.
Nothing seems to have happened. The Off/On controller is best used in Dope Sheet mode.
11. Choose Dope Sheet from the Modes menu. The On/Off controller track is represented with a blue
bar. Blue indicates “on” or visible. Click the Add Keys button, and click to add a key at frame 50.
The blue bar stops at the key at frame 50. Click Play.
The first red piece disappears at frame 50. You can copy and paste tracks to save yourself a bit of
work.
12. Select Red Piece 01’s visibility track in the Controller pane. Right-click, and choose Copy. Select
the visibility tracks for Red Piece 02 and Red Piece 03 (hold down the Ctrl key to add to the
selection). Right-click, and choose Paste.
Paste as a Copy because the other pieces should disappear at different times.
13. Move Red Piece 02’s key to 75 and Red Piece 03’s key to 100. Click Play.
Things are looking pretty good, but the animation would look better if the whole thing were
faster.

864
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:27 PM Page 864
14. Click the Edit Ranges button and the Modify Subtree button. A World track bar appears at the top
of the Key Pane. Click and drag the rightmost end of the range bar to frame 75 to scale all the
tracks at one time. Click Play.
The animation is quite respectable as the white piece slides into the correct square and then hops
over and captures the three red pieces.
Figure 34.29 shows the checkerboard.
FIGURE 34.29
The checker pieces on the checkerboard
Synchronizing to a Sound Track
One of the default tracks for any scene is the sound track. Included in the Sound hierarchy is the
metronome track. You can also set up a sound file using the Sound Options dialog box, shown in Figure
34.30. You can open this dialog box by right-clicking the Metronome track and selecting Properties from
the pop-up menu.
You can make the sound track appear as a waveform curve under the Track Bar. This helps as you try to
synchronize the sound to the movements in the viewports. To see this sound track, right-click the Track Bar
and choose Configure ➪ Show Sound Track from the pop-up menu.
865
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:27 PM Page 865
FIGURE 34.30
The Sound Options dialog box lets you select a sound to play during the animation.
Using the Sound Options dialog box
You can use the Audio section of the Sound Options dialog box to load a sound or remove an existing
sound. The Active option causes the sound file to play when the animation is played. The Choose Sound
button can load AVI, WAV, and FLC file types. The dialog box also includes buttons to Remove Sound and

Reload Sound.
You can also set up a regular metronome beat with two tones. For a metronome, you can specify the beats
per minute and the beats per measure. The first option sets how often the beats occur, and the second
option determines how often a different tone is played. This dialog box also contains an Active option for
turning the metronome on and off.
Tutorial: Adding sound to an animation
As an example of adding sound to an animation, you’ll work with a hyper pogo stick and synchronize its
animation to a sound clip.
To synchronize an animation to a sound clip, follow these steps:
1. Open the Hyper pogo stick with sound.max file from the Chap 34 directory on the DVD.
2. In the Track View–Dope Sheet window, right-click one of the sound tracks and select Properties
from the pop-up menu to open the Sound Options dialog box. In this dialog box, click the
Choose Sound button. Then locate the boing.wav file from the Chap 34 directory on the DVD,
and click OK. Make sure the Active option is selected.
The sound file appears as a waveform in the Track View, as shown in Figure 34.31.
The Open Sound dialog box includes a play button that lets you play the sound before loading it.
Although it can’t be edited in Max, the sound file can be shifted left or right to change its starting point.
3. Click the Move Keys button (or press the M key), and move the pogo stick position keys to line
up with the waveforms in the sound track.
4. Click the Play Animation button, and the sound file plays with the animation.
Figure 34.32 shows the sound track under the Track Bar for this example.
NOTE
NOTE
866
Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:27 PM Page 866
FIGURE 34.31
Sounds loaded into the sound track appear as waveforms.
FIGURE 34.32

To help synchronize sound, the audio track can be made visible under the Track Bar.
867
Working with Function Curves in the Track View
34
45_381304-ch34.qxp 7/7/08 2:27 PM Page 867
Summary
Using the Track View, you have access to all the keys, parameters, and objects in a scene in one convenient loca-
tion. Different features are available in the different layouts. In this chapter, you accomplished the following:

Learned the Track View interface elements

Learned about the different Track View layouts, including the Curve Editor, Dope Sheet, and
Track Bar

Discovered how to work with keys, times, and ranges

Controlled and adjusted function curves

Selected specific tracks using the Filter dialog box

Assigned controllers

Explored the different out-of-range types

Added notes to a track

Synchronized animation to a sound track
The next chapter shows how the Motion Mixer can be used to create new animation sequences by combin-
ing existing animations.
868

Advanced Animation Techniques
Part VIII
45_381304-ch34.qxp 7/7/08 2:27 PM Page 868
J
ust as layers can be used to organize a scene by placing unique objects on
different layers, you also can separate the various animation motions into dif-
ferent layers. This gives you great control over how motions are organized.
The animation layers feature isn’t new to Max, but it was previously available
only for biped animations. All animation sequences can now take advantage of
layers.
If you’ve worked to animate a biped or some other Max object and are pleased
with the result, you can save the animation clip and reuse it. Several animation
clips can be mixed together to create an entirely new animation sequence.
The Motion Mixer lets you add several different animations to the interface, com-
prising both biped and non-biped objects. The animations then can be blended
and transitioned between the loaded animation clips. You also can modify clips
as needed.
Now that you’ve learned how to animate characters using a variety of techniques
from Biped’s Footstep and Freeform modes to custom bone systems with IK solu-
tions, it’s time for you to explore Max’s set of features that enable you to reuse
animation clips between characters. This technique is called Retargeting, and it
involves scaling the animation keys so that a single character animation can be
reused on other characters that are different in size and width.
Using the Animation Layers Toolbar
Behind the scenes, animation layers add several new controller tracks to objects
that are visible in the Motion panel and in the Track View interface, but the front
end is accessible through a simple toolbar. The Animation Layers toolbar, shown
in Figure 35.1, is similar in many ways to the Layers toolbar.
869
IN THIS CHAPTER

Using the Animation Layers
toolbar
Setting layer weights
Collapsing layers
Saving animation files for reuse
Loading XML animation files
Mapping objects between the
loaded animation and the
current scene
Adjusting the scale of an object
using retargeting
Learning the Motion Mixer
interface
Editing animation clips and
creating transitions
Using Animation Layers
and the Motion Mixer
46_381304-ch35.qxp 7/7/08 2:30 PM Page 869
The Layers toolbar is covered in Chapter 6, “Selecting Objects, Setting Object Properties, and
Using Layers and the Scene Explorer.”
FIGURE 35.1
The Animation Layers toolbar includes icons for defining and merging layers.
You can open the Animation Layers toolbar by right-clicking the main toolbar away from the buttons and
selecting Animation Layers from the pop-up menu. Each of the toolbar buttons is labeled and explained in
Table 35.1.
TABLE 35.1
Animation Layers Toolbar Controls
Toolbar Button Name Description
Enable Animation Layers Turns the animation layers system on
Select Active Layer Objects Selects the objects in the viewport

that are on the active animation layer
Layer Selection drop-down list Presents a selection list of all the
available animation layers
Animation Layer Weight Displays the weight value for the
current animation layer
Animation Layer Properties Opens the Animation Layer Properties
dialog box
Add Animation Layer Adds another animation layer
Delete Animation Layer Deletes the current animation layer
Copy Animation Layer Copies the current animation layer
Paste Active Animation Layer Pastes the keys from the current
animation layer to the selected object
Paste New Layer Pastes the copied animation layer keys
to a new layer
Collapse Animation Layer Combines and deletes the current
animation layer with the layer above it
Disable Animation Layer Turns the current animation layer off
CROSS-REF
CROSS-REF
870
Advanced Animation Techniques
Part VIII
46_381304-ch35.qxp 7/7/08 2:30 PM Page 870

×