Working with Keyframes


The After Effects keyframe interface is fairly highly evolved, meaning you can create quite complex animations in After Effects. I mastered keyframes in After Effects by matchmoving shots in After Effects 2.0, before there was any tracker. If you feel like you need a refresher of the basics of keyframes, they are well detailed in the documentation. Press F1 to launch After Effects Help in a Web browser and choose Animating Layers for solid, basic information on transforms and keyframes. If you want to know all the nuances of the various types of keyframes available, choose Fine-tuning Animation. In this chapter, I will focus only on the issues that come up all the time for effects compositors.

When using rub text in either the Timeline or Effect Controls window, holding down Shift while dragging increments at ten times the normal amount, while holding down Ctrl+Alt (Cmd+Option) increments at one tenth the normal amount. The "normal amount" is often, but not always, 1 for any given property; it depends on the slider range, which you can edit by context-clicking on the value and choosing Edit Value.


Temporal Data and Eases

The most common way that keyframes are used in an effects situation is to say, about a given value, "I want it to be this value at this point in the shot, and this value here." By default, After Effects sets linear temporal transitions; in other words, you travel from keyframe A to keyframe B at a steady rate, then from keyframe B to keyframe C at a separate but still steady rate.

Many basic animations are greatly aided by adding eases. Experienced animators and anthropologists alike will tell you how rare it is that anything in nature proceeds in a linear fashion; nature is full of arcs and curves. A classic example of this is a camera push: In most cases, with a real camera operator, a push would start and stop gently, moving at a steady rate only at the middle of the transition.

Flips and Flops

That's all very well, but how do I flop a shot? Unlike many other compositing and editing applications, After Effects has little in the way of dedicated transform effects, so searching in the Effects palette for flop is not going to help you. For those unfamiliar with the term, to flop a shot is to invert it horizontally, on its Y axis (as opposed to flipping a shot upside down on its X axis). To flop, you toggle Constrain Proportions off and set the X value to100 (Figure 2.12).

Figure 2.12. To flop a shot, be sure to uncheck Constrain Proportions before setting the X value to 100%.



Easy Ease

A quick way to deal with easing is to apply the Easy Ease keyframe assistants. To apply them, context-click on a keyframe. Now, look under the Keyframe Assistant submenu, or use the keyboard shortcuts. Clicking F9 applies Bezier interpolation, creating eases in and out of a keyframe, while Shift+F9 creates an ease into the keyframe only, and Ctrl+Shift+F9 (Cmd+Shift+F9) creates an ease out. For the camera push example, you would ease out of the first frame and ease in to the final frame, and you would add an ease in both directions if there were any keyframes in the middle (for example, if the speed of the push changed at some point).

To see the result, twirl down the property to which the eases were applied. Figures 2.13a and b show the difference between a default linear camera push and one to which eases have been applied. The keyframes have changed from linear to Bezier type, and rate of motion is described by a curve instead of a straight line.

Figure 2.13a. With no eases, the Speed: Position graph is flat, moving at a steady rate of 34.72 pixels/sec.


Figure 2.13b. Add eases and it arcs from 0 (at the beginning and end of the move) to 52 pixels/sec (at the center peak of the ease).


Holds

You must set Hold keyframes deliberately, by context-clicking on the keyframe and choosing Toggle Hold Keyframe from the menu or by using the shortcut Ctrl+Alt+H (Cmd+Shift+H). A Hold keyframe's value does not to interpolate to the next keyframe, which is indicated by the square appearance of the right side of the keyframe.

If you need a layer to reposition over time with no transitions (no keyframe in-betweening whatsoever) begin by setting the first frame as a Hold keyframe; all keyframes that follow it in time will be Hold keyframes, signaled by their completely square appearance (Figure 2.14).

Figure 2.14. A series of Bezier keyframes have been converted to Hold keyframes, evident by the square shape at the right of each keyframe and the speed of 0.0.


Keep holds in mind as a problem solver any time you see unwanted in-between information creep into an animation, which can particularly happen with Position animations.

Spatial Data and Curves

Effects compositors are rarely, if ever, called upon to perform complex animations, but eventually your project may require it, and the keyframe interface of After Effects has long been one of its strengths. Rather than teach you to be a great animator in After Effects, though, I prefer to keep it simple and focus on what you need to know to keyframe effectively and to avoid common pitfalls.

When keyframing Position (or Anchor Point) data, there are in fact two ways you can adjust keyframes: temporally (on the timeline) and spatially (in the Composition window). To illustrate this, I'm going to use the most classic bare bones animation the world has ever known: the bouncing ball (Figures 2.15 to 2.18). This example will show you (rather than just tell you) what you need to know about adjusting spatial keyframes.

Figure 2.15. Under Preferences > General (Ctrl+Alt+; or Cmd+Option+;) the option Default Spatial Interpolation to Linear is off by default, producing this result when you create three or more position keys. After Effects also applies an automatic Bezier shape to any point that falls between two other pointsthe opposite of what you want for a bouncing ball.


Figure 2.18. Finally, temporal eases create a more realistic variation in motion speed. Selecting the first and last frame and pressing F9 causes eases to those frames and an effective acceleration in and out of the keyframe in between them. Look closely. The dots are spaced further apart (traveling faster) at the bottom and closer together at the top, where the eases are.


Figure 2.16. Click the check box for Default Spatial Interpolation to Linear, restart After Effects, and you get this result: three keyframes that are linear in both time and position. Often this is they way you want moves to go, but it does not create the realistic arcs of a bouncing ball.


Figure 2.17. Hold down the Ctrl/Cmd key while clicking the middle keyframe to activate its Bezier handles, then Ctrl/Cmd-click on one of the handles to "break" them, enabling you to form the V-shape shown here, which naturally causes curved arcs to and from the bounce point.


You'll probably never have to bounce a ball to create a realistic effect, so what can you possibly learn from the example? Let's recap:

  • If your keyframes aren't cornering sharply at transition points, check Preferences > General and, if necessary, turn on Default Spatial Interpolation to Linear. For the most part, this setting is more intuitive and useful in the work you'll do, but do watch out for the opposite problem: transition points that are too abrupt.

  • Either way, you can take control of the shape of your motion path in the Composition window, using the same shortcuts for adjusting Beziers as with the Pen tool (described in detail in the next chapter).

  • Realistic motion often requires a combination of shaping the motion path Beziers and adding eases to keyframes; you can perform the two actions independently on any given keyframe.

So, even though there is an infinite variety of position animations available to you in After Effects, they will all be done with the basic constraints covered here. True, it can get a little trickier in 3D, but mostly it's just trickier to see what you are doing; the basic rules and constraints remain the same, with each Position keyframe having three basic transition types: Linear, Automatic Bezier, and Custom Bezier Shapes.

Copying and Pasting Trickery

There's a bit of a gotcha possible when copying and pasting keyframe data. The key is to recognize which item is active when you copy and which is active when you paste.

By default, After Effects does its best to help you work this out. If you copy keyframes from a particular property, then simply paste them to another layer, After Effects pastes them to that layer's corresponding property. If that property doesn't exist, because it comes from an effect that isn't applied on the target layer, After Effects adds the effect containing the property to the target layer, but with only the property that you copied.

However, you can also apply keyframes from one property to another similar property. For example, if you want to apply a 2D Position keyframe to the position of an effect, such as the Flare Center position of a Lens Flare effect, you can do so, but only by selecting the Flare Center property in the timeline before pasting.

That's still pretty logical. Where people get screwed up is by not noticing, for example, that an effect in the Effect Controls window is active and forward when they attempt to copy and paste a whole layer. Figure 2.19 shows a classic example, where a layer does not have its properties twirled down, and so it's easy to miss that the Effect Controls window is forward and has an effect highlighted, so that's what gets copied, instead of the whole layer.

Figure 2.19. A classic example where you can get tricked: Five separate items are highlighted: the source comp in the Project window, the target layer, the Curves effect (in both the Timeline and Effect Controls windows), and the layer itself in the Composition window. If I click Delete, which item disappears? Hint: Check which menu bar is not grayed out. Further hint: The Effect Controls window.


Bottom line: If strange things happen when you copy and paste, immediately undo and try the copy operation again, selecting exactly the thing you want to copy and copying it with no intervening steps. Because even if the logic of how copy and paste works seems obvious, you can still get tripped if you don't pay attention. When something stops making sense in After Effects, there is almost always a good reason traceable to something you've just done (and can undo). This is more than you can say for much graphics software.

Velocity and Value Graphs

Twirl down properties that have keyframes with numerical values, and you'll reveal graphs that are useful for fine-tuning transitions, going beyond what is possible with just keyframe assistants, such as Easy Ease. You only have to understand what these graphs are trying to show you.

Figures 2.20a, b, and c show the timeline of the bouncing ball example, this time with linear keyframes, with automated eases (courtesy Easy Ease, F9), and with eases accentuated manually, the result of adjusting the curve handles. You will mostly use the Velocity graph to fine-tune eases. The easiest way to do this, especially if you're not yet at home with this graph, is to start with an Easy Ease adjustment. Draw the handles out further from the keyframe to extend the ease, or move them in closer to shorten it.

Figure 2.20a, b, and c. These three timelines show a progression, from a default linear animation (2.20a), to adding eases to all keyframes (2.20b), and finally to toggling the middle keyframe back to a linear keyframe by Ctrl/Cmd-clicking on it and hand-adjusting the other eases, to accentuate the first and moderate the second (2.20c). Do not feel the need to follow these as a "recipe for a bouncing ball." Rather, they exemplify a progression of how you can use curves to refine an animation, and what that looks like.


Take care not to extend handles so far that they overlap; this can cause curves to spike and buckle, leading to sudden jumps in the animation. If you see something strange while previewing, look for a sudden sharp jolt in the graph and back the handles off to smooth it.


The main thing to understand about the Velocity graph is that it is shows you the rate of change in keyframe values; the Value graph shows the change of the values themselves. The other important thing to understand, which applies to both of these graphs, is that they show relative values; 200% velocity makes a steep slope if the surrounding values are smaller, but is dwarfed by an added 600% velocity change.

You can drag the lower boundary of the graph view to enlarge it and adjust the viewable range by editing the upper and lower values, in blue. Checking the box next to the current rate resets the graph view.

Roving Keyframes

Say you need an animation to follow an exact path, hitting precise points, but you want the animation to progress steadily, with no variation in the rate of travel. This is the situation for which Roving keyframes were devised. Figure 2.21 shows a before and after view of roving keyframes being applied to the finished bouncing ball animation; the path of the animation is identical, but the keyframes are now evenly spaced. This won't come up often, but if it does, Roving keyframes will be very useful.

Figure 2.21. The middle keyframe was set to rove (by turning off the tiny toggle below the keyframe) and is now positioned in between frames 15 and 16; the keyframe's interpolation setting is no longer taken into account, and it moves to keep the curve created by the other keyframes smooth and steady.





Adobe After Effects 6. 5 Studio Techniques
Adobe After Effects 6.5 Studio Techniques
ISBN: 0321316207
EAN: 2147483647
Year: 2006
Pages: 156

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