Materials for This LessonComplete Tutorial

In the last issue, we began learning how to create sophisticated layer motion. This time, we'll continue working with the same project and refine our animation further using position keyframes. As before, you can follow along with this tutorial using the materials available.

The project has two layers: the blackbird airplane with an alpha channel (blackbird.tga), and the background (sky.jpg). Our goal is to simulate perspective and make it look as though the airplane is accelerating toward camera. We also want to make these two layers of still art feel like actual video footage.

Last time we set two keyframes for the scale property: one at Time 0:00 with a value of 0%, and another at Time 2:29 with a value of 1000%. By default, AE uses a linear keyframe, which means that the rate of change between the two keyframes is constant. When we changed the keyframes to bezier, we were able to manipulate the rate of change. We created a value graph curve for Scale that started very flat, then became very steep at the end. This made the layer stay small longer, then get very large very quickly as it approached the second keyframe (see Figure 1).

Figure 1. In the last issue, we learned to adjust Timeline keyframes and create curves like this value graph. This time, we'll do the same thing with spatial keyframes in
the Comp window.

While the scale property is now working well, the animation is still far from convincing. To make it feel much more fluid and realistic, we'll need to create a motion path so that we can control the way AE in-betweens keyframes in the Comp window, as well as in the Timeline.

1.Open up your saved project (Airplane Comp) and select the blackbird.tga layer in the Timeline.

2.Make sure the current time is 00:00:00:00.

3.Press the S key to show the scale property. Press Shift-P to show the position property.

4.Click the stopwatch icon to initialize keyframing for Position.

5.Press the V key to select the arrow tool.

6.In the Comp window, drag the blackbird.tga layer toward the top left corner of the window. You won't be able to see the contents of the layer because your scale value at the current time is 0%, but the layer's center point will be visible, and you can reposition it with the arrow tool.

7.Change your current time to 2:29. You'll now see the contents of the blackbird.tga layer, but it will be very magnified, because its scale value at 2:29 is 1000%. The layer's center point should still be in the same place where you dragged it for the first keyframe. Again using the arrow tool in the Comp window, drag the layer and position it slightly below center (see Figure 2). You don't have to drag exactly on the center point this time, because the layer is visible.

Figure 2. Use the arrow tool to set starting and ending positions for the blackbird.tga layer. The layer will travel along this path over time.

The steps will create a short motion path in the Comp Window -- as the comp plays, the layer will move from keyframe to keyframe along this path. Keyframes on the motion path are represented by little Xs, and the path itself is composed of little dots. Each dot represents a

Figure 3. In the Comp Window, each "X" represents a keyframe, while the dots represent all the ordinary frames in between them.

frame of the animation (see Figure 3).

The position keyframes are linear by default, so the speed at which the layer moves is constant. We can also see this represented by the even distribution of frames along the motion path. But as with the scale value, we want the layer to move more slowly at first and more rapidly toward the end. Open the position attribute in the Timeline and reveal its graph -- a straight line.

We could follow the same steps we used last time to change the shape of the graph. But this time, we're going to use something different: the Keyframe Assistant. This provides preset bezier values for transitions in and out of keyframes.

1.Select the first position keyframe. From the Animation menu (the Layer menu in AE 4), choose Keyframe Assistant, and then Easy Ease Out.

2.In the Timeline, the keyframe icon will have changed, and the speed graph will now show a gentle curve (see Figure 4).

Figure 4. Create smooth motion in and out of keyframes by using the Keyframe Assistant to set "Easy Ease" bezier values for the transitions. In the Timeline, the keyframe icon and the speed graph will both change shape.

3.You can still manipulate the curve manually. Drag on the bezier handle to exaggerate the curve and approximate the curve in Figure 4.

4.Preview your animation. The layer should accelerate a bit, easing out from its first position. This is better, but because the keyframes in the Comp Window are linear by default, like those in the Timeline, the path that layer travels in space is a perfectly straight line. By changing the speed graph in the Timeline, we've only affected the temporal interpolation for those keyframes -- the speed at which the layer moves from point to point. To curve the path, so that the onscreen motion of the layer (and therefore of the airplane) appears less mechanical and more realistic, we will need to change the shape of the path in space.

5.Change the current time to 1:14.

6.The center point for the layer should be halfway between the first and second keyframes. Using the arrow tool, drag the center point so that the layer is closer to the upper right corner of the Comp window. Note that whenever you make a change to a layer that has keyframing turned on, a new keyframe is created both in the Timeline and the Comp window. This lets us know that this keyframe has a value both in time and in space.

7.Using your Time Controls palette, do a RAM preview. As the preview plays, keep an eye on the bottom of the palette to see if it is playing in real-time (see Figure 5). If your computer is having difficulty previewing the entire Timeline in real-time, reduce the preview quality using the quality pop-up in the Comp window.

Figure 5. The Time Controls palette lets you preview your animation and indicates whether it is playing in real-time.

The speed at which the blackbird layer moves should have changed noticeably at the new 1:14 keyframe position. This is because the keyframe has both temporal and spatial interpolation. But in this case, we want the middle keyframe to affect only the shape of the path in the Comp window, not the speed at which the layer moves between the first and last keyframe.

8.With the middle position keyframe still selected, choose Keyframe Interpolation from the Animation menu and select "Rove Across Time" from the Roving pop-up.

9.In the Timeline window, the keyframe icon will change to a tiny little circle and shift position. In the Comp window, the keyframe will stay where it was, but it is now unlocked in time. If you click on the keyframe in the Comp window and change its position, the corresponding keyframe in the Timeline will slide around under the time measure as you change its position in space.

10.Preview your animation.

11.In the last tutorial, we used bezier handles to reshape our curves in the Timeline. Here, we use a similar technique to further define the shape of the motion path. Select the pen tool from the tools menu. Drag on a keyframe in the Comp window, and you will pull out a small bezier handle that you can use to reshape the curve of the motion path as it goes in and out of the keyframe. (see Figure 6).

Figure 6. To precisely control motion in the Comp window, click and drag on a keyframe to create bezier control handles for it. Then use the handles to refine the shape of the motion path. The white rectangle is an outline of the layer under control.

12.To further refine the timing, you can experiment with the keyframes. Slide the first scale keyframe a few frames to the right, or shorten the distance between the keyframes to increase to speed of the animation. To see how I arranged my keyframes, you can look at the sample project.

13.After fine-tuning the scale and position values, you can also experiment with some of the other layer attributes on your own. If you initialize keyframing for rotation, you can add a few subtle rotation keyframes so that the airplane will bank into its turns.

14.When you are happy with your animation, you can add motion blur to the blackbird.tga layer. Check the M switch on the layer to turn it on, and click Enable Motion Blur button at the top of the switches panel (see Figure 7).

Figure 7. To see motion blur for a layer, you must click on two separate switches.

AE will apply blur to layers based on their movement. The faster the layer is moving, rotating or changing scale, the more blur will be calculated. You can affect how much blur will be applied by changing the shutter angle

1.From the Composition menu, select Composition Settings. Click on the Advanced tab.

2.Change the Shutter Angle to 360 degrees (the maximum) and click OK.

3.AE will now add much more blur than it did before. Save your project and do a draft render to see it. Continue to adjust the shutter angle until you get exactly what you want.