Part Four

An Introduction to Adobe After Effects

Advanced Animation - How To Adjust Keyframes For
Sophisticated Motion Effects


In-Betweening

To animate effectively in AE, we need to understand keyframes. A keyframe represents a change in the value of a property at a point in time. The distance between two keyframes is

Figure 1. The area between keyframes is known as an “in-between,” and its rate of change is determined by the value and type of keyframe on either side of it.

called an “in-between” (see Figure 1). The term comes from traditional animation, in which master animators would draw only key images, while junior artists would draw the “in-betweens.”

In AE, the computer fills in the information between the keyframes. This point was illustrated by the exercise we did in Part Two of this series (in the November/December 2001 issue). If you haven’t read that lesson, you may want to look at it before you start this one.

In that exercise, we had two layers — a still image of an airplane (including an alpha channel) and a still image of the sky. We animated the airplane layer by setting two keyframes for its position property. The first keyframe anchored the layer off-camera to the right, and the second keyframe anchored the layer off-camera to the left. The airplane flew across the sky because the position value changed between those two keyframes. AE automatically calculated the difference and rate of change between the two keyframes and used that information to set a position value at each in-between frame.

This is fine for very simple motion, but to make smoother and more realistic animations, we need to have more control over the way AE calculates the in-betweens, a process known as “interpolation.”

Keyframe Interpolation

The way that AE interpolates the values between two keyframes in the Timeline is determined by the type of keyframes on either side of the in-between. There are three basic types: linear, bezier and hold. And bezier keyframes come in three varieties: bezier, auto bezier and continuous bezier (see Figure 2).

Figure 2. The different types of keyframes available in the AE timeline. A single keyframe can also be composed of two different types — one for incoming values, and one for outgoing.

The default keyframe is linear, which looks like a little diamond. The interpolation between two linear keyframes will result in a constant rate of change between the two values. This is the interpolation that was used in our airplane exercise, and as you saw, the result was somewhat flat and mechanical. An auto bezier keyframe, which looks like a little circle, automatically smooths out the curve going into and out of a keyframe, resulting in a more fluid motion. You can toggle between linear and auto bezier keyframes by Command-clicking on the keyframe. A hold keyframe, represented by a little square, holds a value until the next keyframe, so that you can freeze the property momentarily. Different types of keyframes can also be combined, so that incoming and outgoing values are interpolated in different ways.

An Exercise in Controlling Motion

Once again, we will be moving an airplane through the sky, but this time, we will fake the perspective so that the airplane appears to accelerate rapidly toward us. For this exercise, you will need to download two new files from the Guild website click here to get: blackbird.tga and sky.jpg.

  1. Launch AE. If you don’t automatically see a blank, untitled Project Window, select New Project from the File menu.

  2. Import the two source files. Drag and drop the icons into the AE Project Window, or Select File — Import — Footage Files and navigate to the files. (AE will ask how to interpret the alpha channel for blackbird.tga. Click the box that says “Guess.”)

  3. Create a new composition. Select New Composition from the Composition menu, or click the New Composition button at the bottom of the Project Window.

  4. In the Composition Settings dialog box, choose Medium, 320 x 240, from the frame size pop-up menu. Set the frame rate to 30 and change the duration to 0:00:03:00. Pixel aspect ratio should be square, and resolution should be full. Name the composition Airplane Comp and click Okay.

  5. Place the sky.jpg file into the composition by dragging it from the Project Window into the Timeline. The image will appear perfectly centered in the Comp Window.

  6. Place the blackbird.tga file into the comp as well. Bringing it in second will make it appear above the sky.jpg layer in the Timeline window and in front of the sky in the Comp Window. If not, change their order by dragging the blackbird.tga layer above sky.jpg in the Timeline.

  7. Select the blackbird layer by highlighting it, then push the “S” key on your keyboard to bring up the Scale property.

  8. Make sure that the time display at the upper right of the Timeline is set to 0:00:00:00, then initialize keyframing by clicking the stopwatch icon for the Scale property. Set the initial value for Scale at 0%, so that the airplane is not visible.

  9. Move forward along the Timeline to 0:00:02:29 either by dragging the blue time marker until the display reads 2:29, or by clicking on the time display and typing 2:29 in the Go To Time dialog box.

  10. Click on the value for Scale and change it to 1000%.

  11. Play your animation by clicking the RAM preview button at far right of the Time Controls palette.

The airplane should appear as though it is coming toward you, but the movement will be far from realistic. Because the keyframes we have set are linear by default, the rate of change between the two keyframes is constant. If you place the time marker halfway between the first and last keyframes, at 1:14, you will see that the value for Scale is 500% — halfway between the first value (0%) and the second (1000%).

But if we were seeing this in the real world, the closer the airplane came to us, the faster it would appear to be traveling. (A mathematician would say that the motion is logarithmic rather than linear.) To simulate this in our animation, we want the airplane layer to progressively speed up. To accomplish this, we must tell AE how to in-between the keyframes.

Figure 3. The Value/Velocity graphs. Any property with keyframes has its own set of these graphs.

Click the little triangle next to the Scale property in the Timeline. Two graphs are revealed (see Figure 3). These are the value and velocity graphs, and every property with keyframes

Figure 4. Changing a keyframe from linear to bezier changes its icon from a diamond to an hourglass and also makes a handle appear on the value graph below.

has its own set. When the keyframes are linear, as both are here, the value line is straight — the values change at a constant rate. On the bottom is the velocity graph. It shows the speed at which the property is changing. When the rate of change is constant, the velocity graph is a straight line.

The graphs represent different ways of looking at the same keyframe data: changes you make in one will modify the other. But the value graph is much more intuitive, and it’s usually easier to make your adjustments there.

We now return to the bezier keyframes that I mentioned earlier. If you have used Adobe Illustrator or the Pen tool in Adobe Photoshop, you are familiar with bezier curves Developed by Pierre Bézier in the 1970s, they are composed of points that have handles protruding from either side. Pulling and stretching these handles affects the shape of the curve. AE makes a distinction between bezier and continuous bezier keyframes: with a continuous bezier, the incoming and outgoing curves are identical; with a bezier, they can be different.

By changing our keyframes from linear to bezier, we will be able to manipulate the value graph in a very precise way and make our animation much more sophisticated.

Here’s how:

  1. Select the first keyframe.

  2. From the Animation menu, select Keyframe Interpolation. (In AE version 4, you’ll find it under the Layer menu.)

  3. In the Keyframe Interpolation dialog box, choose Bezier from the Temporal Interpolation pop-up. Click OK.

  4. In the Timeline, the keyframe icon will have changed from a diamond to an hourglass. Meanwhile, on the value graph, a little handle will now be visible on the point below the keyframe (see Figure 4).

  5. Select the second keyframe and repeat steps 2 to 4.

  6. Use the little handles on the value graph to change the shape of the graph so the in-between values stay close to the starting value for a long time, then rapidly increase to the highest value at the end (see Figure 5).

  7. Preview your animation and continue to experiment with the shape of the graph until you get realistic motion

  8. Save your project file and render your movie. (See Part Two of this series.)

Figure 5. To mimic the motion of a plane accelerating toward camera, the value curve increases slowly at first, then dramatically near the end.

Next time, we’ll use the same source files to learn more about Position keyframes and finally add motion blur to make the animation look more realistic.