- In After Effects, select the layer you want to animate.
- You can add keyframes for parameters including Anchor Point, Position, Scale, Rotation and Opacity.
- Move the timeline to where you want to place a keyframe. Then click the stopwatch next to the chosen parameter.
- To copy a keyframe, use the Lasso Tool to select a keyframe, then copy and paste where the time indicator is located.
Animate graphics using keyframes in After Effects CC
Learn how to add, copy, paste, and edit keyframes — the primary mechanism for creating animation in After Effects — as well as adding motion blur and working with parenting.
Keyframing is arguably the most fundamental aspect of creating any kind of motion graphics. And we're going to explore how to add and adjust keyframes by animating the appearance of this logo into the scene.
Now rather than trying to describe the move, let's go ahead and double-click on the logo animated comp in the Project panel. Let's load a RAM Preview by pressing 0 on your keypad or Ctrl + 0 on your regular-size keyboard. So as you can see, we have the logo sliding into the scene. And while it's a relatively simplistic animation, there's a fair amount of work that goes in behind something like this.
So I'm going to press the Spacebar and stop playback. And let's go ahead and get started. So if you click on the H+ logo tab on the left side of your Timeline panel, you can see here we've got our logo. Now go ahead and press home to move your current time indicator to start of the timeline. That's a good general practice when you're starting to build your animations just in case you've a built a composition and moved the current time indicator anyway.
You'll see the tight role it plays with setting keyframes in a moment. Now I know in the example animation, we had both the logo and the circle moving together as one unit. And if we look at the layers in our composition, we have layer one, layer two, and layer three. I'm just turning their visibility off in the timeline so you can see they are indeed three separate layers.
Now what we'll do is animate just the circle and then later tie the H logo to the circle so it moves at the same time rather than setting keyframes for each and every layer. So turn the visibility off for layer one and click on the triangle for layer two to open up its parameters that we could animate. Now if your transform parameters didn't already open, go ahead and open those parameters.
Since this is a shape layer, we have contents as well as transform. Now since this is a shape layer, we could add keyframes to both the contents or the transform. For simplicity's sake, I just want to animate the transform options for this entire layer. So as you can see, we have five parameters under transform and there are stopwatches to the left of each one of those parameters. That means you can add keyframes for any one of those parameters. And you'll see these stopwatches repeated throughout many different parts of the interface. Since the circle already exists where I want it to stop, I'm going to employ a technique of animating backwards to get started with my first keyframe.
So move your current time indicator to around one second in your timeline. It's fine if you're a frame off here or there. Now we can go ahead and add a keyframe for the position by clicking the stopwatch to the left of the Position parameter. That records a keyframe specifically where the current time indicator is set. So let's press Home so we can now move our shape layer off the left side of the canvas.
So click in the comp window over the shape, and drag. And as you drag to the left, go ahead and hold down Shift after you've started dragging to make sure that the object stays snapped to the X parameter. Now make sure the object goes off the left side of the screen and let go. Now you should see a line like this. Now this line pertains to the motion path. And the way the motion path is drawn, there's a box for every single keyframe. So notice when I click on this keyframe in the center, this second key frame is already highlighted.
If I zoom out by pressing the Comma key on the keyboard, you can see, I have a second keyframe that's right here. If I click on it, that automatically selects that one in the timeline. Now with the object all the way off to the side of the screen, this part is not going to be a part of the rendered animation. We won't see the circle until we start moving down the timeline.
Now go ahead and click on the current time indicator and scrub down your timeline. This is a way to preview animations without necessarily having to load up a RAM Preview all the time. Now since we want to move this off the right side of the canvas, go ahead and move your current time indicator anywhere you want further down the timeline. I'm moving mine to around 3:18.
Now click and drag again on our shape in the comp window and hold down Shift as you start to drag. Now you should notice the dots on the right side of my motion path are more close together than on the left side of the motion path. That's a visual representation of the speed of the object. So if I scrub through my animation here, I'm getting an idea that it's going to move quickly and then slowly.
Now go ahead and load a RAM Preview. And as you can see, the playback, it's going very quickly and then very slowly. Well, I'm gonna to press the Spacebar to stop playback here. What we need to do is have the circle pause in the middle. And in order to do that, we need to have another keyframe that's exactly the same as our second keyframe. So, move your current time indicator to around 1:12. If you draw a lasso around the middle keyframe, that will select it.
I encourage you not to click directly on keyframes in the timeline because you might accidentally move them as you click. So again, draw a lasso around the keyframe and press Command + C or Ctrl + C, and then Command + V or Ctrl + V to copy and paste. Notice it copied the keyframe we had selected, and when I went to paste, it pasted right where the current time indicator resides.
We can press Home and then load up another RAM Preview. Again, 0 on your keypad. So that looks pretty good, but it's still extraordinarily slow. So I'm going to press the Spacebar to stop playback and draw a lasso around all four keyframes.
Now if you hold down the Option key on the Mac or Alt on Windows, you can click on either the end keyframe or the beginning keyframe. I'm going to click on the end keyframe and drag it to left. Notice as I do that, all the other keyframes in between are dragging in proportion. So I'm always going to have a fast section, a stop, and then a slow section. This is a great way to retime things in your timeline without necessarily having to create all new keyframes.
Now if you're working with keyframes, if you realize all the keyframes are starting to reside in one small area in your timeline, you might want to reset your work area. So I'm going to move my current time indicator to around 1:19 and press N, as in Nancy, on my keyboard. When I do that, that resets my preview range.
So if I load a RAM Preview, it's only going to preview these parts in the timeline. So that looks a little bit better. I'm going to go ahead and press the Spacebar to stop playback and there's one last thing we should do before we go ahead and try and render this. Just so you can see it more clearly, I'm going to zoom in on my canvas a little bit and resize my comp window just so you can see things.
Now go ahead and move your current time indicator to around frame six. Now look at the third checkbox from the right in your switches area. If you don't currently see this, you want to go ahead and toggle your switches and modes to make sure you have this active. Go ahead and enable that option. If you click and hold, you can see it's called Motion Blur.
When I enable Motion Blur, I don't immediately see it in the comp window. This allows me to enable Motion Blur for any layers I want but then still continue to work rather quickly, and then before I actually go to render, I can enable my Motion Blur so I can actually see it in the canvas. This just allows you to work more quickly. Now what Motion Blur does is just adds a little bit more sense of realism to what's moving through the scene.
So since this is moving rather quickly, I have a large amount of Motion Blur for the front area. No Motion Blur for when it stops, and then a little less as it moves out of the scene. Now of course, to finish our animation, we want to make sure that our H+ logo moves with the circle. So turn the visibility for layer one on, and then scrub in the timeline.
In order to have this move with the circle, you want to position your current time indicator in the area where it's stopped. This way we know it's lined up perfectly over top of the circle.
And now we're going to use a feature called parenting. So if you don't see this Parent panel in your timeline, you can go ahead and just right-click anywhere along this gray bar. I usually right-click right next to the layer name. If you go to Columns, you can enable any of these different options. You want to make sure Parent is selected. Since it's already selected in mine, I'm just going to click outside of that area. And click on this little curlicue shape. If you click on that and then start to drag, notice I can point it at different things. Well, specifically, I want to point it right at the word Circle on layer two.
Now, when I let go, notice the parent has listed the Circle layer as the parent layer for the H+ logo. Now as I scrub through the scene, you can see, oh, yeah, it's totally tied to the circle. But what's wrong? We haven't enabled Motion Blur. So go ahead and enable Motion Blur, and let's click on the right side of our work area end and drag it all the way to the end of our comp.
Then go ahead and load up a RAM Preview so you can check out what we've built using keyframes and enabling some extra features like motion blur and parenting.
* Nguồn: After Effects CC
Ý KIẾN THÀNH VIÊN