From the course: After Effects CC 2022 Essential Training

Adding and adjusting keys

- [Instructor] By using keyframes, we're able to tell After Effects that a property has a certain value at a certain point in time. And it's these keyframes that are responsible for animation. In this movie we'll see how to add and adjust keyframes in a few different ways to get our animation timing as needed. Let's come over to our second composition. Here I've got the beginnings of an animation with a circle making contact this triangle. I want to animate this square. But before I do, let's take care of a couple housekeeping things. Notably, we want to make sure that we can see our motion path. So I've selected my circle position. And first thing, if you're not seeing this motion path, make sure you come up over here to this icon and under view options make sure that all of this is enabled. Next, you'll notice that my layer label is colored yellow, so that makes the motion path a bit hard to see. I'll select both my square and circle and then tap on the swatch to change this to something like purple. And now that should make it a lot easier to see what we're doing inside the composition window. And lastly, I'm going to change out my time display from seconds to frames. And to do that, I'll hold down Control and just tap on the time and that'll toggle between frames and seconds. Let's select our square layer and come over to frame 35 where the circle makes contact with the triangle. And let's create keyframes here on the Square's position and rotation by clicking on the stopwatch. Let's go to frame 80 and let's define the end state of our square. The easiest way to do that is to just grab the layer in the composition window and move it to the end spot. Now, somewhere in between, I want this square to kind of bounce off the ground before it lands. So somewhere in the middle, somewhere right here, let's just introduce a brand new keyframe. I can insert or remove a keyframe by hitting this button here. Now that I've done that I can actually slide this down and move it into place using the value sliders or again just moving the layer itself inside the composition window. Now, you'll notice that our motion path is smoothed out already for us, which I don't necessarily always want. In fact, I'd rather have this as linear keyframes. So I'll select my position property to select all the keyframes here. Let's right click and go to keyframe interpolation. Under keyframe interpolation, we'll change this from continuous bezier to linear. And that'll draw the path out in straight lines instead. Now, somewhere here at frame 69 or frame 70 let's just bump this up so that we have a little bit of a bounce. So essentially the square is going to bounce off the ground once and land into place. Now, we just did this so that we can block in our animation, but rarely in life do things move in straight lines like this. In fact, motion moves in arcs. So let's introduce those arcs here. I'll hold down Command Option on a Mac and Control Alt on a PC and I'll hover over the first keyframe. Now, when I click and drag, I'll pull out the keyframes handles and start to introduce this arcing motion. Let's do the same for the top of the bounce. I'll click and drag to the left and you can see the handles draw out accordingly. Right now let's preview this and focus in on the motion path. Obviously, the timing is something we need to tweak. One big thing that's missing is the rotation of the square. So maybe somewhere here when we make that first initial bounce, we need to introduce some rotation. I'll switch to my rotate tool and just bring this over here this way. Maybe it bounces on the corner but we don't want this to intersect with this ground plane so I'll also nudge this up a little bit. And by the time we get to the end, I do want this to land on its side, so negative 90 is probably where we need to be. Now let's play this back in real time and see how this moves. Okay. I'll bring in this preview bracket over here so that we can preview just this section. And I'll zoom into the timeline by bringing this end bracket over here. Let's go back to the beginning and hit space bar. Okay. Some of the timing here needs to happen a lot quicker. Our triangle is already hitting the ground here and our squares still up in space. So what I'll do is select these keyframes here and we'll slide these over. And you can see the tick marks in our motion path start to distribute out little further indicating a real fast motion. At the back end of our animation, you can see that the tick marks are closer together indicating a slower motion. So let's move all of this together. I'm happy with the first half but this back half with these keyframes selected, what I'll do is hold down Alt, Option and click the outer most keyframe of that selection. And that allows me to compress time. Alternatively, I can stretch this out even further, but for now what I want to do is keep an eye on the tick marks and try to match what I have at the first half of the animation. So somewhere in here looks pretty good. Let's preview this. Okay, I'm happy with that. Let's add some easing here. I'll select these keyframes, right click, keyframe assistant, and easy ease out. As we saw here, when building up our animation, you'll find that you'll constantly preview, adjust, and preview. Adding and adjusting keyframes is how we refine interpolations in both time and space to our needs.

Contents