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, key ticks appear 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 task covers most of the ways to set a keyframe.

To set a keyframe:

1.

Choose Create > 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 looks pressed down and becomes 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. You can also select more than one object and view frame ticks of all selected objects at once.


Although 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.

Choose Create > 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 automatically keyframes 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 appears, 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 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 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 no longer fall on whole-number frames.

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 keyframe, 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 7 for Windows and Macintosh(c) Visual Quickstart Guide
Maya 7 for Windows & Macintosh
ISBN: 0321348990
EAN: 2147483647
Year: 2006
Pages: 185

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