Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
3ds Max 6 Bible (2004).pdf
Скачиваний:
55
Добавлен:
17.08.2013
Размер:
50.02 Mб
Скачать

818 Part VII Animation

This expression says that if the Normalized Time is less than two-thirds of the time, then set the green value to its maximum; if it isn’t, then set its value to 0.

The third Point3 value is for blue. Blue doesn’t appear at all in green, yellow, or red, so its value is set to 0 for the entire animation.

The completed expression for the entire animation (which you entered in Step 4 of the tutorial) looks like this:

[if (NT >= .33, 255, 0), if (NT < .66, 255, 0), 0]

Summary

This chapter covered the basics of using the Expression controller. Using mathematical formulas to control the animation of an object’s transformation and parameters offers lots of power. You can also use the values of one object to control another object.

In this chapter, you

Practiced building expressions in the Expression dialog box

Learned about expressions and what they can do

Reviewed the available operators, variables, and functions

Tried out examples of controlling object transformations and parameters

In the next chapter, you learn to use the Track View to display and manage all the details of the current scene.

 

 

 

Working with the Track View

As you move objects around in a viewport, you’ll often find yourself eyeballing the precise location of an object in the scene. If

you’ve ever found yourself wishing that you could precisely see all the values behind the scene, then you need to find the Track View. The Track View can be viewed using three different layouts: Curve Editor, Dope Sheet, and Track Bar. Each of these interfaces offers a unique view into the details of the scene.

These Track View layouts can display all the details of the current scene, including all the parameters and keys. This view lets you manage and control all these parameters and keys without having to look in several different places.

The Track View also includes additional features that enable you to edit key ranges, add and synchronize sound to your scene, and work with animation controllers using function curves.

Learning the Track View Interface

Although the Track View can be viewed using different layouts, the basic interface elements are the same. They all have menus, toolbars, a Controller pane, a Key pane, and a Time Ruler. Figure 33-1 shows these interface elements. You can hide any of these interface elements using the Show UI Elements option in the pop-up menu that appears when you right-click the title bar.

The Track View layouts

The Track View includes three different layouts: a Curve Editor, a Dope Sheet, and the Track Bar. The Curve Editor layout displays all parameter and motion changes as graphs that change over time. You manipulate these curves just like normal splines. You can use the Dope Sheet layout to coordinate key ranges between the different parameter tracks. And the Track Bar layout offers a way to quickly view the Track View within the viewports.

33C H A P T E R

In This Chapter

Learning the Track View interface

Understanding the Track View Curve Editor and Dope Sheet layouts

Working with keys and time ranges

Adjusting function curves

Filtering tracks

Assigning controllers

Optimizing animation keys

Using out-of-range types

Adding notes to a track

Synching animation to a sound track

820 Part VII Animation

Controller pane

Key pane

Time ruler

Figure 33-1: The Track View interface offers a complete hierarchical look at your scene.

You can open the Curve Editor and Dope Sheet layouts using the Graph Editors menu command. You can open the Curve Editor window by choosing Graph Editors Track View–Curve Editor or by clicking the Curve Editor button on the main toolbar. You open the Dope Sheet interface in a similar manner by choosing Graph Editors Track View–Dope Sheet.

Cross-

You also use the Graph Editors menu to access the Schematic View interface. For more on

Reference

the Schematic View interface, see Chapter 9, “Working with the Schematic View.”

 

After the Track View opens, you can give it a unique name using the field found on the Name: Track View toolbar. If the Name toolbar isn’t visible, right-click the title bar and select Show Toolbars Name: Track View from the pop-up menu. These named views are then listed in the Graph Editors Saved Track Views menu. Any saved Track Views that are named are saved along with the scene file.

To open the Track Bar layout in the viewports, expand the Track Bar using the Open Mini Curve Editor button at the left end of the Track Bar. Close the Track Bar layout by clicking the Close button on the toolbar. Figure 33-2 shows this Track View.

After you open a Track View, you can switch between the Curve Editor and the Dope Sheet using the Modes menu or by right-clicking the menu bar or toolbar (away from the buttons) and selecting a new layout from the Load Layout menu. You can also save customized layouts using the Save Layout or Save Layout As menu commands.

Chapter 33 Working with the Track View 821

Figure 33-2: The Track Bar offers quick access to the Track View.

Track View menus and toolbars

In many cases, the menus and the toolbars provide access to the same functionality. One difference is the Modes menu, which lets you switch the current interface between the Curve Editor and the Dope Sheet layouts. The Curve Editor menus include Modes, Settings, Display, Controller, Tracks, Keys, Curves, and Utilities. The Dope Sheet menu loses the Display and Curves menus and adds a Time menu. The Track Bar menus are the same as the Curve Editor menu, except for the Modes menu.

The Track View consists of several toolbars. You can open these toolbars by right-clicking the toolbar (away from the buttons) and selecting the Show Toolbars submenu. The available toolbars depend on the layout, but they can include Name, Navigation, Key Stats, Key Tangents, Controllers, Track Selection, Keys, Time, Ranges, Display, Extras, Curves, and Tools. All these toolbars can be docked, floated, and hidden. You can also add and delete new toolbars using the right-click pop-up menu.

Cross-

You can learn more about docking and floating toolbars in Chapter 1, “Finding Your Way —

Reference

Exploring the Max Interface.”

 

822 Part VII Animation

For the Track View–Curve Editor layout, four toolbars appear by default at the top of the interface. These toolbars includes the Keys, Curves, Key Tangents, and Name toolbars. For the Track View–Dope Sheet, the default toolbars at the top of the interface include the Keys: Dope Sheet, Time, Display, and Name toolbars.

Note Depending on the size of the Track View window, you may need to drag the toolbar to the left to see the buttons at the right end of the toolbar.

Keys toolbar

The Keys toolbar is one of the default toolbars for the Curve Editor and for the Dope Sheet. The toolbar is slightly different in each layout. Table 33-1 describes these buttons.

Table 33-1: Keys Toolbar Buttons

Toolbar Button

Name

Description

 

 

 

 

Filters

Opens the Filter dialog box, where you can specify which

 

 

tracks will appear

 

Move Keys, Move

Enables you to move the selected keys or limit their

 

Keys Horizontal,

movement to horizontal or vertical

 

Move Keys Vertical

 

 

Slide Keys

Enables you to slide the selected keys

 

Scale Keys

Enables you to scale the selected keys

 

Scale Values

Scales the selected keys’ values vertically; Curve Editor

 

 

layout only

 

Add Keys

Enables you to add new keys to a track

 

Draw Curves

Create a function curve by dragging the mouse; Curve

 

 

Editor layout only

 

Reduce Keys

Optimizes the current time selection by eliminating

 

 

unnecessary keys Curve Editor layout only

 

Edit Keys

Enables edit keys mode; Dope Sheet layout only

 

Edit Ranges

Enables edit ranges mode; Dope Sheet layout only

 

 

 

Curves toolbar

The Curves toolbar is another of the default toolbars for the Curve Editor. This toolbar shares some buttons with the Display toolbar, which is a default toolbar in the Dope Sheet layout. Table 33-2 describes these buttons.

Chapter 33 Working with the Track View 823

Table 33-2: Curves and Display Toolbar Buttons

Toolbar Button

Name

Description

 

 

 

 

Lock Selection

Prevents any changes to the current selection

 

Snap Frames

Causes moved tracks to snap to the nearest frame

 

Parameter Curve

Opens the Parameter Curve Out-of-Range Types dialog

 

Out-of-Range Types

box, where you can make tracks loop and cycle; Curve

 

 

Editor layout only

 

Show Keyable Icons

Displays a key icon next to all tracks that can be animated

 

Show All Tangents

Displays the Bézier curve handles for all keys; Curve Editor

 

 

layout only

 

Show Tangents

Displays the Bézier curve handles for the selected keys;

 

 

Curve Editor layout only

 

Lock Tangents

Prevents the curve handles from moving; Curve Editor

 

 

layout only

 

Modify Subtree

Causes changes to a parent to affect its children; Dope

 

 

Sheet layout only

 

Modify Child Keys

Causes changes to child keys when parent keys are

 

 

changed; Dope Sheet layout only

 

 

 

Key Tangents toolbar

The Key Tangents toolbar is another of the default toolbars for the Curve Editor. It is used to set the In and Out curve types. This toolbar is also available in the Dope Sheet layout. Table 33-3 describes these buttons.

Table 33-3: Key Tangents Toolbar Buttons

Toolbar Button

Name

Description

Set Tangents to Slow, Set In Tangents to Slow, Set Out Tangents to Slow

Set Tangents to Auto, Set In Tangents to Auto, Set Out Tangents to Auto

Set Tangents to Custom, Set In Tangents to Custom, Set Out Tangents to Custom

Set Tangents to Fast, Set In Tangents to Fast, Set Out Tangents to Fast

Sets curve to approach and leave the key in a descending manner

Sets curve to approach and leave the key in an automatic manner

Sets curve to approach and leave the key in a custom manner defined by the handle positions

Sets curve to approach and leave the key in an ascending manner

Continued

824 Part VII Animation

Table 33-3 (continued)

Toolbar Button

Name

Description

Set Tangents to Step, Set In Tangents to Step, Set Out Tangents to Step

Set Tangents to Linear, Set In Tangents to Linear, Set Out Tangents to Linear

Set Tangents to Smooth, Set In Tangents to Smooth, Set Out Tangents to Smooth

Sets curve to approach and leave the key in a stepping manner

Sets curve to approach and leave the key in a linear manner

Sets curve to approach and leave the key in a smooth manner

Time toolbar

The Time toolbar is one of the default toolbars for the Dope Sheet. It is used to work with time ranges. Table 33-4 describes these buttons.

Table 33-4: Time Toolbar Buttons

Toolbar Button

Name

Description

 

 

 

 

Select Time

Enables you to select a block of time by clicking and dragging

 

Delete Time

Deletes the selected block of time

 

Reverse Time

Reverses the order of the selected time block

 

Scale Time

Scales the current time block

 

Insert Time

Inserts an additional amount of time

 

Cut Time

Deletes the selected block of time and places it on the clipboard

 

 

for pasting

 

Copy Time

Makes a copy of the selected block of time on the clipboard for

 

 

pasting

 

Paste Time

Inserts the current clipboard time selection

 

 

 

Controller toolbar

The Controller toolbar is available in both the Curve Editor and the Dope Sheet. It is used to assign controllers to tracks. Table 33-5 describes these buttons.

Chapter 33 Working with the Track View 825

Table 33-5: Controller Toolbar Buttons

Toolbar Button

Name

Description

 

 

 

 

Filters

Opens the Filter dialog box, where you can specify

 

 

which tracks will appear; same button is found in the

 

 

Keys toolbar.

 

Copy Controller

Copies the selected track for pasting elsewhere

 

Paste Controller

Pastes the last copied track

 

Assign Controller

Enables you to assign a controller to the selected track

 

Delete Controller

Removes the current controller

 

Make Controller Unique

Changes an instanced track to one that is unique

 

 

 

Tools toolbar

The Tools toolbar is available in the Curve Editor and includes buttons to add some additional tracks such as the Notes and Visibility. Table 33-6 describes these buttons.

Table 33-6: Tools Toolbar Buttons

Toolbar Button

Name

Description

 

 

 

 

Add Note Track

Adds a note track to the current track for recording

 

 

information

 

Delete Note Track

Deletes an associated note track

 

Add Visibility Track

Adds a track to an object for controlling its visibility

 

Snap Frames

Causes moved tracks to snap to the nearest frame; also

 

 

found in the Curves toolbar

 

Lock Selection

Locks the current selection of keys so that no other keys

 

 

can be selected

 

Properties

Displays a dialog box of properties associated with the track

 

Track View Utilities

Opens a dialog box of available Track View utilities

 

 

 

826 Part VII Animation

Other toolbars

The Dope Sheet layout includes two additional toolbars: Ranges and Extras. Table 33-7 describes these buttons.

Table 33-7: Ranges and Extras Toolbar Buttons

Toolbar Button

Name

Description

 

 

 

 

Edit Ranges

Enables edit ranges mode; same button is found in

 

 

the Keys toolbar.

 

Position Ranges

Enables position ranges mode

 

Recouple Ranges

Used to line up the keys with the range

 

Exclude Left End Point

Leaves the left end point out of the current time block

 

Exclude Right End Point

Leaves the right end point out of the current time

 

 

block

 

 

 

Controller and Key panes

Below the menus (and below the topped docked toolbars) are two panes. The left pane, called the Controller pane, presents a hierarchical list of all the tracks. The right pane is called the Key pane, and it displays the time range, keys, or function curves, depending on the layout. You can pan the Controller pane by clicking and dragging on a blank section of the pane: The cursor changes to a hand to indicate when you can pan the pane.

Each track can include several subtracks. To display these subtracks, click the plus sign (+) to the left of the track name. To collapse a track, click the minus sign (–). You can also use the Settings menu to Auto Expand a selected hierarchy. Under the Settings Auto Expand menu are options for Selected Objects Only, Transforms, XYZ Components, Base Objects, Modifiers, Materials, and Children. For example, if the Auto Expand Transforms options is enabled, then the Transform tracks for all objects is automatically expanded in the Track View. Using these settings can enable you to quickly find the track you’re looking for.

The Settings Auto Select Animated toggle automatically selects all tracks that are animated. You can also auto select Position, Rotation, and/or Scale tracks. The Settings Auto Scroll menu command can be set for Selected and/or Objects tracks. This command automatically moves either the Selected tracks or the Objects track to the top of the Controller pane.

Note

You can also select, expand, and collapse tracks using the right-click pop-up quadmenu.

The Controller pane includes many different types of tracks. By default, every scene includes the following tracks: World, Sound, Video Post, Global Tracks, Raytrace Engine Globals, Environment, Render Effects, Render Elements, Renderer, Global Shadow Parameters, Scene Materials, Medit Materials (for materials in the Material Editor), and Objects, as shown in Figure 33-3.

Chapter 33 Working with the Track View 827

Figure 33-3: Several tracks are available by default.

The Shift, Ctrl, and Alt keys make selecting and deselecting multiple tracks possible. To select a contiguous range of tracks, select a single track and then select another track while holding down the Shift key. This selects the two tracks and all tracks in between. Hold down the Ctrl key while selecting tracks to select multiple tracks that are not contiguous. The Alt key removes selected items from the selection set.

Below the right pane is the Time Ruler, which displays the current time as specified in the Time Configuration dialog box. The current frame is marked with a light blue time bar. This time bar is linked to the Time Slider, and moving one updates the other automatically.

At the top right of the Key pane (above the vertical scroll bar) is a split tab that you can use to split the Controller and Key pane into two separate views, as shown in Figure 33-4. Using this feature, you can look at two different sections of the tree at the same time. This makes it easy to copy and paste keys between different tracks.

Tip

You can drag the Time Ruler vertically in the right pane.

Figure 33-4: Drag the tab above the vertical scroll tab to split the Track View into two views.

828 Part VII Animation

Lower interface toolbars

At the bottom edge of the Track View window are three toolbars that appear by default. These toolbars include the Track Selection, Key Stats, and Navigation. Using these toolbars, you can locate specific tracks, see information on the various keys, and navigate the interface.

In the Track Selection toolbar is the Zoom Selected Object button and the Select by Name field, in which you can type a name to locate any tracks with that name.

Note In the Select by Name field you can also use wildcard characters such as * (asterisk) and ? (question mark) to find several tracks.

The Key Stats toolbar includes Key Time and Value Display fields that display the current time and value. You can enter values in these fields to change the value for the current time. You can also enter an expression in these fields in which the variable n equals the key time or value. For example, to specify a key value that is 20 frames from the current frame, enter n + 20 (where you supply the current value in place of n). You can also include any function valid for the Expression controller, such as sin( ) or log( ). Click the Show Selected Key Stats button to display the key value in the Key pane.

Cross-

Chapter 32, “Using the Expression Controller” presents the functions that are part of the

Reference

Expression controller.

 

Table 33-8 describes the buttons found in the lower interface toolbars consisting of the Track Selection, Key Stats, and Navigation toolbars.

Table 33-8: Track Selection, Key Stats, and Navigation Toolbar Buttons

Status Bar Button Name

Description

 

 

Zoom Selected Object

Places current selection at the top of the

 

hierarchy

Show Selected Key Statistics

Displays the frame number and values next to

 

each key

Pan

Pans the view

Zoom Horizontal Extents, Zoom

Displays the entire horizontal track or keys

Horizontal Extents Keys

 

Zoom Value Extents

Displays the entire vertical track

Zoom, Zoom Time, Zoom Values

Zooms in and out of the view

Zoom Region

Zooms within a region selected by dragging

 

the mouse