About Setting Keyframes


Keyframes are at the heart of animation in Maya. Setting a keyframe means that you want a certain attribute to have a specific value at a point in time. For example, a ball could begin at 2 along the X axis at frame 1, and end at a Translate X of 2 at frame 10. Between those frames, it would gradually move across the screen (Figure 12.13).

Figure 12.13. As you play back the animation, the sphere moves across the panel.


There are many ways to set keyframes and adjust them once they've been set. When you set a keyframe, a couple of things happen: The channels that were keyframed are highlighted orange in the Channel Box. In addition, you'll see key ticks in the timelinethin, red lines indicating where each keyframe is (Figure 12.14). Keyframes also show up in the Graph Editor and the Dope Sheet, discussed later in this chapter.

Figure 12.14. The thin line near the 10 is a key tick. It lets you know there is a keyframe for the selected object at that time.


The following section covers most of the ways to set a keyframe.

To set a keyframe:

1.

From the Create menu, select NURBS Primitives > Sphere.

2.

Press .

This keyframes the translates only. Press to keyframe the rotates and to keyframe the scales. These correspond to the hotkeys for the Move, Rotate, and Scale tools.

3.

In the Channel Box, select Rotate X and -select Rotate Y and Rotate Z (Figure 12.15).

Figure 12.15. Rotate X, Y, and Z are selected in the Channel Box so that they can be keyframed. You can easily select multiple attributes in the Channel Box by dragging the names.


4.

Right-click the Channel Box and choose Key Selected from the Marking menu that appears (Figure 12.16).

Figure 12.16. When you click in the Channel Box with the right mouse button, you can keyframe the selected attributes.


Any channels that are selected (in this case, the rotate channels) are keyframed.

5.

Go to frame 10 by clicking that number in the timeline.

6.

Move and rotate the sphere.

7.

Press .

All attributes in the Channel Box are keyframed.

8.

Turn on Auto Keyframe .

The button will look pressed down and become highlighted.

9.

Type 20 in the Current Time field to change the time in the timeline; then press (Figure 12.17).

Figure 12.17. You can change the current time to 20 by typing this value in the field. When you have a particularly long playback range, entering a frame number can be easier than clicking it in the timeline.


10.

Move the sphere.

A new keyframe appears: when Auto Keyframe is turned on, it sets a keyframe any time an attribute is changed.

Tip

  • You can set keyframes on an object only when that object is selected. Likewise, you can see the key ticks in the timeline only when the keyframed object is selected.


While much of the advanced editing of keyframes can be done in the Graph Editor and Dope Sheet windows (discussed later in this chapter), you can access the most frequently used editing tools directly from the timeline.

To edit keyframes in the timeline:

1.

From the Create menu, select NURBS Primitives > Sphere.

2.

Change the playback start time to 1 and the playback end time to 30.

3.

Set keyframes on the sphere every five frames, starting with the first frame.

4.

Move the sphere and change the current time each time you set a keyframe. If Auto Keyframe is still on, you can press in the first frame and all of the other frames will automatically be keyed (Figure 12.18).

Figure 12.18. This is an example of some simple motion you can add to an object. Select the sphere and press to keyframe it With Auto Keyframe turned on, Maya will automatically keyframe the sphere every time you move it.


5.

Click a frame in the timeline where there is a key tick. With the right mouse button, click the timeline; select Delete from the pop-up menu (Figure 12.19).

Figure 12.19. Clicking the timeline with the right mouse button gives you access to a variety of convenient commands.


The keyframe is removed.

6.

Hold down and drag over the range of two key ticks in the timeline.

A red area should appear with two small arrows near the middle and two small arrows at the edges (Figure 12.20).

Figure 12.20. The highlighted section of the timeline is selected. The outside arrows allow you to scale the time, and the inside arrows allow you to move several keyframes at once.


7.

Drag from left to right on the two small arrows in the center of the selected area.

The keyframes move together without being scaled. You can do this with an individual keyframe as well.

8.

Double-click the timeline.

All of the keyframes in the playback range are selected. However, the arrows used for scaling end up just outside the playback range, so you must change the playback end time to access them.

9.

Change the playback end time to 31.

An arrow appears at the end of the selected range (Figure 12.21).

Figure 12.21. Double-clicking the timeline is a convenient way to select all of the keyframes in the playback range.


10.

Drag the arrow to the left.

The animation is scaled down, which makes the sphere move faster. Note that the key ticks do not fall on whole-number frames anymore.

11.

With the right mouse button, click the timeline; select Snap from the Marking menu that appears.

The keyframes are moved to the nearest whole-number frame.

Tips

  • If you want to ensure that the timeline is sitting on a keyframe, use the back and forward arrows with the red marks on them in the animation controls. These jump the timeline to the preceding and next keyframes, respectively.

  • When you're working on the timing of your animation, it's often fastest, and easiest, to select, move, and scale keyframes in the timeline.




    Maya for Windows and Macintosh
    MAYA for Windows and MacIntosh
    ISBN: B002W9GND0
    EAN: N/A
    Year: 2004
    Pages: 147
    Authors: Danny Riddell

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