Types of Animation

table of contents

You can use several different methods to animate your scene. Each method has advantages and disadvantages, of course, so before deciding which method to use, let's quickly review in the following sections what each method is capable of.

Path Animation

You got a glimpse of path animation in Chapter 4, "Diving In: Your First Animation." Generally , in this method, you create a NURBS-based curve and then attach it to an object in your scene (in Chapter 4, the object was the boat). The object then follows the curved path to simulate motion. You can choose at which time the object is positioned at any point along the path, so the object can reverse itself, pause, or oscillate, if you want. You'll revisit this method in Chapter 12, "Cameras and Rendering," to fly the camera along a path toward the house.

Nonlinear Animation

Nonlinear animation (known in Maya as the Trax Editor) is a more advanced method of animation. Unlike keyframing , nonlinear animation is completely independent of time. You blend and layer animation sequencescalled clipsto set up the motion for characters . A character is a defined set of related objects you specify in Maya (see Figure 10.5). A timeline lets you drop clips of animation in wherever you like and blends clips that overlap. In addition, you can stretch or shrink clips to make the animation keys within them occur faster or slower.

Figure 10.5. Trax allows you to add and blend motion clips and poses at any point in your timelinea novel way to build animation.

graphics/10fig05.gif

You can also use this method to explore variations in parts of the animation without losing your previous work or affecting other parts of the animation. For example, if you want a character to run rather than walk, you can make the walking part of the animation a clip and then adjust the leg motion without affecting the way the rest of the character moves. If you're satisfied with the changes to the leg motion, you can make that running motion a clip and blend it with the rest of the character's animation without losing your previous work on the character. The Trax Editor is explored in more detail in Chapter 11, "Character Animation."

Keyframe Animation

Keyframe animation is the standard animation method, and the one you'll use in this chapter. In this method, you set keys for an object's extreme positions and let the computer fill in the in-between motion. For instance, if you're animating an arm that will bend, you set a key with the arm fully extended and another key with the arm in a flexed position. Maya then fills in the motionknown as the in-betweens between the two extremes. Keyframing also depends on time. Simply put, a key is an anchor point for a particular attribute at a designated time. When the animation reaches that specified time, the object's attribute will be at the value you set (keyed).

When preparing an animation, generally you specify the range first, as you did in the previous section. You can then place keys for numeric values throughout the range by using the Channel Box or hotkeys. As you set keys, you specify the time at which those changes in the attribute's value take place.

To set keys with the auto keyframe method, you click the Auto Keyframe button in the Range Slider (it turns red to indicate it's enabled). The idea with auto keyframing is that anything that changes creates a key. With auto keyframing, you can animate quickly by simply dragging the Time Slider to a given frame and then changing an attribute. However, you must set one initial keyframe on an attribute for the auto keyframe method to "activate" for that attribute.

note

Maya offers the option to change an attribute based on other keyed attributes. This is called set driven key animation (discussed in Chapter 15, "Your Next Steps: Efficiency and Artistry"). For example, you could tie a bouncing ball's motion to the intensity of the light shining on it, so that the ball is more brightly lit when it bounces to its highest point.


Tutorial: The House Is Alive

To see how keyframe animation works, you're going to bring your house to life. In this tutorial, you'll key specific attributes for a bend deformer. We've already applied the bend deformer so that you'll get reliable results in this tutorial. The bend deformer lets you twist the house into different shapes to create the effect of a kind of haunted house. You'll start by loading the scene file noted below the CD icon. This scene contains your fully textured house with the lighting added and includes the imported objects on the Maya Fundamentals CD-ROMin particular, the ground object that provides a landscape for the house to sit on.

  1. Use the Preferences dialog box to change the actual frame rate used for your animation. In the Categories list, click Settings to display the General Application Preferences. Under Working Units, in the Time list box, select NTSC (30 fps).

    graphics/ch10_icon.gif graphics/ch10a_icon.gif
  2. In the Categories list in the Preferences dialog box, select Timeline again. Under the Timeline section, change the Animation Start/End frames to 1 and 600 ; the Range Slider will be updated accordingly . Next, go down to the Playback section. In the Playback Speed list box, select Real-Time (30 fps). That means when you click the Play button in the playback controls (on the Time Slider), the active viewport regulates itself to play the animation at 30 fps. That is, it will skip frames if necessary to keep pace. To finalize the changes, click the Save button at the bottom of the dialog box.

  3. There's one problem, however. If you play the scene (hotkey: Alt+v ), you'll find that it stops and loops short of 600 frames because you never changed the specified playback range. You can change it directly in the Range Slider, though: Enter 600 in the Range End Time text box.

  4. Change your current layout to the Persp/Outliner saved layout (Panels Saved Layouts Persp/Outliner). To make it easier to work with your scene, in the Layer Editor, hide all the layers except for OuterWallsL, ChimneyL, WindowsL, InnerWallL, DoorL, RoofL, and PorchL. Next, press 5 to enter Shaded mode.

  5. Next, you need to select the deformer you're going to add keys to. In the Outliner, expand the Old_House group, and select House_Bend in that group . In the Inputs section of the Channel Box, click on bend1 to display the attributes you'll be working with for animation.

  6. Using the Time Slider, set your current frame to 1 . Click the Auto Keyframe button in the Range Slider to enable automatic keyframing. Under bend1 in the Channel Box, RMB-click on Curvature, and choose Key Selected to set the starting key. Now a keyframe will be set every time the Curvature value is changed. Attributes that have been keyed are represented in the Channel Box with a shaded (orange by default) text box. Look at frame 1 in the Time Slider to see the red bar representing the key that has been set.

    tip

    The scene is quite complex at this point. If interaction seems sluggish in the Perspective view, try selecting all the objects and decreasing their level of detail by pressing 1 .

  7. With a key set at frame 1, drag on the Time Slider and you will see a slider move across it, indicating the change in frame. Drag the slider to frame 150, or just type 150 in the Current Frame text box.

  8. In the Channel Box, change the Curvature to 0.6 to set another key. Go to frame 350 in the Time Slider, and change Curvature to 0.5 in the Channel Box. Then go to frame 400, and set Curvature to . Continue setting keys: At frame 450, set Curvature to 0.2 ; at frame 530, set Curvature to 0.5 ; and at frame 600, set Curvature to 0.3 . When you're finished, click the Auto Keyframe button in the Range Slider again to turn off auto keyframing.

  9. Change your animation's current frame to frame 1 by using the playback controls next to the Time Slider or by entering 1 in the Current Frame text box. Play the animation (hotkey: Alt+v ) and watch as the house bends back and forth. Press Alt+v again to stop the animation. Everything moves fine, but some parts of the animation seem to be jerky. In the next section, you'll work with the Graph Editor to smooth out the animation. Before going any further, save your scene as ch10HouseAnimation .



Maya 4. 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2005
Pages: 201

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