All Articles After Effects
After Effects: The Fundamentals of Keyframing
Richard Lainhart on Sat, March 5th 0 comments
One of the most important concepts that a new user must grasp, in order to do almost anything  in Adobe After Effects, are keyframes and keyframing. While there are a few procedural, or rules-based,

One of the most important concepts that a new user must grasp, in order to do almost anything  in Adobe After Effects, are keyframes and keyframing. While there are a few procedural, or rules-based, plugins in After Effects that can automatically generate animation without keyframing, the vast majority of operations, even the simplest, require you to create keyframes to have anything happen. Yet, creating keyframes is neither obvious nor intuitive, and so new users often have a hard time getting started. In this tutorial, we're going to explain the fundamentals of keyframing in After Effects, explore the three major types of keyframes, and show you the benefits of the sometimes-confusing keyframe options available.

"Keyframing" and "in-betweening" are terms that date back to the earliest days of cartooning and animation. The "keyframer" (usually the cartoon's director) would draw only the "key frames", or  those frames of significant action that would establish the characters' shape or motion. The "in-betweeners", or "slaves", would draw all the remaining frames between the key frames, while the keyframer sat on the beach drinking cocktails.

Those concepts still apply, except that you're the keyframer and the computer creates the in-betweens while you drink the cocktails. But unless you create those keyframes first, the computer has nothing to work on. So let's start with that. (Since we're going to be creating simple animations directly in After Effects here, you can follow along if you so choose - no external files or third-party plugins required.)

Step 1 - Create the Comp

We're going to make the simplest possible keyframe animation. Start by creating a new 640x360 Composition (Command/Ctrl-N), 10 seconds long. Add a small red Solid (Command/Ctrl-Y) to your comp, say 60x60 pixels, and position it in the upper left corner of the comp:

Step 2 - Create Your First Keyframe

Next, select the red solid layer in the Timeline and hit "P" on your keyboard (without the quotes) to solo the Position property for the layer. With the Current Time Indicator (CTI) at zero, click the Stopwatch icon next to the word 'Position' to enable keyframing and set your first keyframe (the diamond-shaped object), which will be created at the current time:

At this point, you're welcome to try a RAM preview or just play back the animation, but you won't see any motion, because you've only created one keyframe - you need to have at least two keyframes set for the property to animate. Not only that, but those two keyframes need to have different values - if they're the same, there's no difference between the frames and so nothing for the computer to create the in-between frames from, a process called interpolation.

So, we need to make at least one more keyframe, and make that keyframe different from the first keyframe.

Step 3 - Create The Second Keyframe

Move the CTI to the 5-second point, then drag the red square straight across the comp frame over to the right side. You'll notice that a second keyframe automatically appears for the Position property at the 5-second point, and that a motion path displays between the start and end points of the animation:

Note that you didn't need to click the Stopwatch icon again to create the second keyframe; it happened automatically once you enabled keyframing for Position and changed the layer's position at a different point in time. In fact, you want to be sure that you don't click the stopwatch icon again once you've enabled keyframing for a property - otherwise, you'll disable keyframing completely and lose any keyframes you've set, and you'll have to Undo to get them back.

Now if you do a RAM preview, you'll see the simplest possible position animation:

Not very exciting, but animation nonetheless, and that's basically how keyframing works in After Effects. Next we'll look at some of the other types of keyframes available.

First, drag your second Position keyframe to the 2-second point, and preview that:

A faster version of the previous animation, but basically the same thing. However, we've sped it up here to illustrate an important point: by default, any new keyframes you create in After Effects are Linear keyframes, which means that the rate of change in the values between two such keyframes is constant - that is, how quickly the values change when going from one keyframe to the next is always the same.

When you set up two linear keyframes to move a layer across the frame, as we have done here, as soon as the CTI hits the first keyframe, the layer instantly starts to move at the speed necessary to get it across the frame in the available time, and stays moving at the same speed. As soon as the CTI hits the second keyframe, the layer instantly stops.

In the real world, however, anything with mass (meaning any real object) takes a certain amount of time to get moving up to full speed once it's been set in motion - it needs to accelerate to get up to speed. By the same token, any real object needs to decelerate - to slow down - to some degree before it can stop. We're so accustomed to this that any moving object, even a virtual object on a computer screen, looks unnatural or robotic if it doesn't accelerate and decelerate. This unnatural motion is one of the real giveaways that a moving object has been computer animated, and one of the fundamental problems artists are faced with in creating natural animation.

Fortunately, After Effects provides us with many tools for creating natural animation, and an important one is the keyframe assistant Easy Ease. Easy Ease automatically changes any keyframes to which it's applied to Bezier keyframes, which are keyframes that do not change equally over time. To see the difference, follow these steps:

Step 4 - Display the Graph Editor

With the Position property for the layer selected, click the Graph Editor button next to the Time Ruler:

and choose to display the Graph Editor:

Without going into great detail here, note that the two Position keyframes are visible as white squares, and that there's a straight line between them, meaning that the rate of change between those keyframes is constant. Now let's apply Easy Ease and see what happens.

Step 5 - Apply Easy Ease

Hide the Graph Editor again, select both Position keyframes, Control- or right-click on one of them, and choose Easy Ease from the pop-up menu (or choose: Animation > Animation Assistant > Easy Ease)

Preview this animation, and this is what you'll see:

Note that now the solid smoothly accelerates and coasts to a stop at the second keyframe, all with the single click of a mouse. Also note that the formerly diamond-shaped Linear keyframes have turned into inverted diamonds - these are Bezier keyframes:

And, if you open up the Graph Editor again, you'll see that the formerly straight line indicating a constant Position speed is now curved, showing you how the layer speeds up and slows down over the course of the animation:

Easy Ease automatically creates a much smoother and more natural animation for almost any property it's applied to, and it's your special friend.

There's one more type of useful keyframe I want to show you to close out this tutorial, called the Hold keyframe. To see how they work, follow these steps:

Step 6 - Add Animation Keyframes

Close your Graph Editor, move your CTI ahead to the 4-second point, and drag your solid down into the lower right of the comp. Move to 6 seconds, and drag the solid to the lower left corner. Finally, move to 8 seconds and drag the solid back up to the upper left, making the solid move in a rough oval:

Preview this, and note that the motion ramps up and down smoothly, because all your subsequent keyframes after the first two Bezier keyframes will also be Beziers and will follow the same acceleration-deceleration pattern:

Suppose, however, that we wanted the solid to jump from position to position, rather than glide? That's what Hold keyframes are designed to do. So, let's convert those Bezier keyframes to Holds and see what happens.

Step 7 - Convert the Bezier keyframes to Hold keyframes

Select all the Position keyframes by clicking on the Position property name, then choose: Animation > Toggle Hold Keyframe. When you do, you'll see that the right sides of all the inverted diamonds of the Bezier keyframes have turned into squares:

Also note that the motion path for the solid disappeared; that's because there is no longer any motion path. Preview the animation, and you'll see why:

Instead of smoothly sliding from position to position, the solid now jumps from one to the next. As you see, Hold keyframes are intended to hold a keyframe value at a particular value until the next keyframe takes over; when they're all Hold keyframes, the values jump between each keyframe instead of smoothly interpolating.

OK, we've shown you some of the basics of keyframing in After Effects; there's a lot more to learn about keyframing, but this should get you started. Now take your new-found knowledge and start making some animation!

Learn more about keyframing and many other creative video manipulation techniques in Adobe After Effects here!

Comments (0)

You must be logged in to comment.

Course Advisor
Don't Know Where To Start?
Ask A Course Advisor
Ask Us!
Copy the link below and paste it into an email, forum, or Facebook to share this with your friends.
Make money when you share our links
Become a Affiliate!
The current affiliate rate is: 50%
Classes Start Next Week!
Live 8-week Online Certification Classes for: