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 controllers. The Copy Controller and Paste Controller buttons let you move existing controllers between different tracks, and the Assign Controller button lets you add a new controller to a track.

CROSS-REF 

Chapter 32, "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 controller to apply. If the controller types are similar, the keys are maintained, but a completely different controller replaces any existing keys in the track.

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. You can add notes only in the Dope Sheet layout.

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 33.23. Each note track can include several note keys.

image from book
Figure 33.23: The Notes dialog box lets you enter notes and position them next to 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 image from book Note Track image from book Remove menu command to delete a selected note track.

Tutorial: Animating a hazard light

As an example of working with the Track View, you animate a flashing hazard light in this tutorial.

To animate a flashing hazard light using function curves, follow these steps:

  1. Open the image from book Hazard.max file from the Chap 33 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 image from book Omni01 image from book Object(Omni Light) image from book 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.

    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 33.24 shows the Stepped tangents.

    image from book
    Figure 33.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 Objects image from book Light Lens image from book Lens image from book Shader Basic Parameters image from book 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 33.25 shows the hazard light as it repeatedly blinks on and off.

image from book
Figure 33.25: The hazard light flashing on

Tutorial: Animating a checkers move

As an example of working with function curves, we 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 image from book Checkers.max file from the Chap 33 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 image from book White Piece image from book Transform image from book Position image from book X, Y and Z Position.

    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 diagonally 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 33.26.

    image from book
    Figure 33.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 33.27.

    image from book
    Figure 33.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.

  7. Hold the Shift key down, and move the handles on the keys to make them discontinuous tangent types, as shown in Figure 33.28.

    image from book
    Figure 33.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 image from book 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.

  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 33.29 shows the checkerboard.

image from book
Figure 33.29: The checker pieces on the checkerboard




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