- Hey there, Joey here for School of Motion
and in this lesson we're gonna take a peek at the Graph Editor in After Effects. I know that the Graph Editor may seem a bit
intimidating at first, but if you hang in there through this lesson, you'll be on your
way to having better looking animations right away. We can only cover so much in just this one
lesson. So, if you really want an in-depth animation
training, you're gonna wanna check out our bootcamp animation program. Not only does it entail several weeks of intense
animation training, but you also get access to class-only podcasts, PDFs, and critiques
on your work from our experienced teaching assistants. Every moment of that course is designed to
give you an edge in everything you create as a motion designer. Also, don't forget to sign up for a free student
account so you can grab the project files from this lesson as well as assets from any
other lesson on the site. And now, let's jump in and check out the Graph
Editor. Alright, here we are in After Effects. So, first thing I wanna do is explain a little
bit about the way After Effects uses curves and it's, it's a little different than some
other programs like Cinema 4D and Nuke and Maya. So what I'm gonna do is just create, I'll
just create a new shape, alright? We'll just make a little, a little rectangle
here. A little square. Alright? So, if I put a Position keyframe on here,
option P, and I go forward one second and I move it over here, right? Let me set my, set my comp right. So let's preview this. Alright, so it moves from point A to point
B. Very boring. Doesn't, doesn't feel that good, you know? Feels kinda stiff. So, the first trick that everybody learns
is to use one of the, the animation helper kinda presets that come with After Effects. And so, if you select both of these, go up
to Animation, keyframe Assistant, you've got Easy Ease In, Out and Easy Ease. And the one most people use is Easy Ease. Alright? And now your keyframes look a little different
and when we preview this, you'll see that it, it feels better, right? The, the box sort of slowly starts moving
and then it picks up speed and then it slowly decelerates at the end of the move. And this is the way things move in the real
world and this is why, you know, when you see animation, you know, you want it to feel
similar to this because it just feels more natural to you 'cause that's what you're used
to seeing. Animation is all about tricking you into thinking
things are moving that are not actually moving. And it helps, you know, the illusion if you
make things move the way they do in real life. And once you sort of get the hang of that,
then you can start breaking the rules and doing really cool things. So for now, we have Easy Ease keyframes. Now, what is actually happening? Like, how is After Effects deciding how fast
and how slow and when to speed up the key, the square and basically, how is it setting
the timing of this? So, the, the way to understand this is to
use this button here, which, is, they're calling the Graph Editor. And it looks like something out of, you know,
your algebra homework and maybe that's why people are, are not, you know, really using
it a lot, or not as much as they should because it's just a little silly. I mean, look at these cute icons, and then
you have this one and it's just really boring. So, what I'm gonna do is click this, and you'll
see now we have this graph. And now if I click on position, it will show
me what my position keyframes are doing. Alright? I'm gonna show you guys a really handy little
button, it's this one down here. Fit all graphs to view. If you click that, it will scale your view
to just fit the graph you're looking at. It's very helpful. So, right now, you see this green line down
here is totally flat. That is the X position. Sorry, the Y position, okay? And if I float my mouse over it, it'll tell
you. Position Y. And that's flat because this cube, this square
is not moving up and down at all. It's only moving left to right. So, this curve here, this is the X position. And if you, you know, if you try to visualize
this as we're moving left to right through time and at the same time this curve is going,
you now, from low to high, and that low to high motion is, is the same as moving left
to right. When you, when you increase the X value, you're
moving something to the right. So that's why it's going up. And you can see now that it's got a curve
to it. And the way that you need to think about this,
and it will take a little while but, you'll start to see it. The steepness of this curve tells you how
fast something's going. So, if this curve is flat like it is at the
beginning and the end, that means it's moving slowly, and if it's totally flat, it's not
moving at all. So it's actually starting from a standstill
and then it's slowly picking up speed and it, and in the middle here is where it's the
fastest and you can see that's where that curve is the steepest, okay? So, this is what's telling After Effects start
slow, right about here it picks up speed and it stays fast 'til about here and then it
slows down again. Now, you can change that, and that's the beauty. You can make it do things differently. Now, the problem is, by default, After Effects
puts X, Y and if you're in 3D mode, it puts a Z value all inside of one keyframe. And what this means is if I select this, I
can't actually manipulate this curve at all because this keyframe actually has two values
inside. And I'm gonna show you guys how to fix that
but in the meantime I also wanna show you the other Graph Editor that's inside of After
Effects. And this is the, the sort of, legacy one,
the old one that was in older versions of After Effects. And they still include it just in case you
wanna use it and I'm gonna show you how it works. It's a lot less intuitive. If you come down and click this little button
next to the eyeball and say edit speed graph, now you have a totally different looking graph,
okay? This graph is telling you, and it's kind of
hard to, it's kind of hard to explain even, but it's basically telling you how fast that
layer is moving. Alright? And so, the, the steepness has nothing to
do with how fast it's going. The actual value, you know, at this point
is how fast it's going. So it's starting at zero and it's picking
up speed and then it's, you know, hitting its maximum speed here and then it's slowing
back down again. So, you actually can edit these curves. If you select a keyframe, you get these little
handles and you can pull them, alright? And that's changing the shape of the curve. And just to show you what that does, if I
pull this to the right, okay, what's happening is it's increasing that speed at a slower
rate, right? And if I pull this one, now it's decelerating
at a slower rate. So when I play this, you can see what it's
doing. It really takes awhile to pick up speed and
then when it does it shoots over really quickly, okay? So this is kinda the shortcut. If this is the animation you want you can
use the speed graph and do it. Most of the time I try not to use it because
this doesn't tell me a lot. This is, like, hard to look at and I, you
know, don't like, it offends me and so I usually use the value graph. This makes a lot more sense. Now you can see visually, we're going slow,
slow, slow, slow, boom, really fast right there and then we slow down again, alright? So, let me undo all this. So the way to use the value graph to change
the speed of things is to right-click or control-click on your keyframe for position or for the property
and you'll see this option here, separate dimensions. So we'll click that and now we have X position
and Y position separated out. So the Y position we can actually turn off
'cause this is not moving on Y at all. And X position now, we have a curve and it
messed up our Easy Ease but that's okay 'cause we're gonna change this curve. So now because the X position is on it's own
curve, we can change this, alright? So the way animations curve work, you know,
I explained that the steepness is how fast it's going. So if I pull this handle down like this, and
if you hold shift it will sorta lock it to, you know, to straight, straight out. If I go like this, what I'm doing is I'm saying
to, I'm telling After Effects we're gonna go really slow, we're gonna accelerate very
slowly, okay? And if I pull this up, this, it's the opposite. It's saying immediately start moving quickly
and then slow down, alright? And you can bend this curve as well so you
can get completely different animations. So what's happening if I do a curve like this,
okay, sort of an inverted curve? So this is telling it move very fast right
off the bat and then slow way down and if you see, you know, imagine here's your starting
point, here's your ending point, imagine cutting that in half, okay? The first half of the animation, or sorry,
the second half of the animation almost nothing happens, right, if you imagine a line here. From here to here it's almost flat. From here to here there's a lot going on. Really, most of the movement is happening
in the first, probably, third of the animation. So let's go ahead and preview that. Alright, and you can see it just pops out
and then slows way down which can be kinda cool. You know, if we, if this cube, sorry I keep
calling it a cube, it's not a cube. If this square started off screen, and we
may need to, we may need to stretch that keyframe out a little bit now. By the way, the way I just did that, very
handy key, hot key, is just the plus and minus key on that top number row, the top, sort
of, row on your keyboard. Minus zooms out, plus zooms in. It's just a nice way to do it. So if you have somethin' like that, you know,
you're trying to introduce some object into your screen, this is maybe a cool way to do
it. You can, you can really fire that thing in
there quickly and get a fun little kind of effect like that. And you can really, really crank this too
if you want to, you know, so that it, it's just, it's almost all the way there, like,
instantly. Like, pew, just like that. Alright, so now what's a different type of
curve? Well, if we do sort of your typical S curve,
like this, but we're really, we're really pulling these handles out very far, so what's
happening is it slowly comes in and then flings itself over and kinda decelerates, alright? And then you could also have, you know, the
opposite of the first curve where it slowly picks up speed and then it just stops very
quickly, okay? And I don't know, maybe, maybe you want that,
maybe it's some sort of jerky kind of experimental thing you're doing and that's what you want. But the key is you'll start to just intuitively
know how to shape these things once you do this a few times. And I know if you've never seen this before
this may look funky to you but I promise you if you start getting into this Graph Editor
and just think of it as an animation curve editor, don't call it the Graph Editor, but
it, you know, you'll start to just intuitively know where to pull these things and you'll
get a sense of, you know, having a little bit more control over your animation, you
know? Now it's kind of really slowly picking up
speed, it gets quickly here and then it decelerates, but much, much shorter, you know, over a much
shorter time than the beginning, alright? So you have a lot of control that way. So, now I'm gonna show you guys the other
great thing about the, the animation curves. So, in the example video that, that I made
for this, I just wanted to make something really simple to show you guys and one of
the basic things that you would learn in an animation program is how to make a bouncing
animation because that's sort of a good example of something that really requires, you know,
using some of the principles of animation to make it look right and, and requires using
the animation curves to get it to feel like a real bounce. So, the way that I started this was I just,
you know, basically said okay, well this box is going to land here and it's gonna drop
from off screen, okay? So how many frames should it take to get from
here to here? Well I don't really know. I had to kind of experiment and play around
until it felt right. But let's just say, let's just try this, let's
try 20 frames, alright? That might be too much. So I'm gonna put a position keyframe here
and you can see I've already separated out the, the dimensions on the position so I have
my X and Y separate and I'm gonna turn X off 'cause I'm not using that right now. Alright so I have the Y position. I'm gonna add another keyframe at the beginning. Okay, so now it's offscreen. Alright, and if we play that that's really,
that's way too slow, that's not what we want at all, right? Of course. Now think about what happens when something
falls. It's accelerating all the way down to the
ground, you know? Things get faster and faster and faster until
they hit something, and then, then the direction reverses and now they're going up in the air,
alright? And so, you, you gotta kind of think about
how things actually work in real life sometimes. I'm gonna go into the, the animation curve
editor for this, alright? And you can see right now it's linear which
is not what we want. What I want is, I want it to start slow and
get faster so I'm actually sort of drawing the curve I want with my mouse, I don't know
if that helps you guys. I'm gonna select both keyframes and these
little icons over here, these are actually shortcuts to make Easy Ease, Ease In and Ease
Out keyframes. So I'm just gonna hit Easy Ease and it'll
give me this nice S curve. So this, this first keyframe, this is actually
pretty close to what I want. But I want it to, you know, I want this to
feel a little bit cartoony so I'm gonna pull this out a little bit further. Now, this is not going to ease into the ground. It's not like there's a parachute on this
little orange square. It's going to hit the ground and just come
to a dead stop basically. Alright? And that's, that's what happens when things
hit the ground so if we preview this really quickly, okay, you can see it doesn't quite
feel natural yet. It feels a little slow maybe. So I'm gonna, I'm gonna click and just drag
this over and I'm gonna have this not accelerate so slowly. I'm just gonna kind of mess with this curve
a little bit. Alright, and, you know, it's trial and error. I'm not, I'm not a super advanced animator
by any stretch but, you know, usually I can play around with it until it starts to feel
good. Alright, so that's starting to feel pretty
good. It kinda lingers and then falls, okay? It's almost like it fell of a table that's
just offscreen. Alright, so what happens next? Now it's going to bounce up somewhere, you
know, and a good rule of thumb if you're, if you're doin' something like this is just
make it bounce up half the height it fell from, alright? And then next time it bounces, you know, half
that height. And then, you know, it'll sort of decay and
you can also do that with your keyframes. So we're at frame 17, that's how long it took
to fall. So, you know, let's just, for easy math let's
say 16 frames. So how many frames should it go up? Well half of 16 would be eight frames. So why don't we do eight frames. So from 17 that would be, let's see, 'cause
we're in 24, so that'd actually be one, two, three, four, five, six, seven, eight, alright? And I'm gonna add a couple of extra frames
because I do want it to kind of have a little bit of that cartoony feel to it almost like
it sticks to the floor and then flings itself back up and hangs a little bit longer than
it should. So I want this cube to now come up here. Maybe about to there. And you can see that as I did that it actually
added a point on my curve, alright? Now, it starts here, it falls and hits, when
it hits it's not gonna bounce immediately back up like that, okay? But it's also not gonna slowly accelerate
like this, it's gonna be somewhere in the middle, right? Because, and this also depends if you're trying
to make the ball feel like, like a rubber ball or like a pool ball, you know, like a
billiards ball. You know, the material it's made of is gonna
affect that too. So we're pretending this is some really flexible
bouncy material, so I do want it to accelerate up and then when it gets to the top, it's
gonna decelerate and hang there for a second, alright? So what I did was I basically made an S curve
but then I'm gonna bend this down just a little bit, okay? So that when it hits it bounces up right away
but slower, you know? So let's preview that real quick. Okay? Now that feels way too slow how it comes out
of that, okay? So I am actually gonna just shorten this and
lengthen that, okay? It's gettin' better. And the whole thing feels a little slow so
I'm actually just gonna compress this a little bit. Okay. And you can see, you're probably starting
to see the benefit of animating this way. This actually, in a visual way, represents
what this square is doing. I almost called it a cube again. Alright, so now, it's gonna fall down and
when it's falling it's probably gonna take the same amount of frames as when it went
up, okay? So, this was frame 14 to 22, that's eight
frames. So go another eight frames and it's gonna
come back to here. And all I did was select this and hit copy,
paste. Alright, and the motion, it's basically gonna
mirror what's happening here except it will not ease into the ground, right? It's just gonna slam into it. So if we play this, right, it's startin' to
feel like a bounce. Alright, and this curve is telling you what's
happening. Slams into the ground, eases out, stops, eases
down and then slams into the ground again. Alright? So now we're gonna go four frames, alright? And you can see where this keyframe was that
we just had the square at and I'm gonna go halfway to that keyframe, okay? And basically all we have to do now is make
the next curve look just like this one, just smaller. Alright, so if I look at the angle of that
I can just sort of mimic that, pull this out, go forward four frames, copy and paste this,
and actually maybe I'll copy and paste... No I will copy, I'll copy and paste this one. And you can see it actually, it sort of maintained
the angle of this little handle. So it sort of, once you set a curve here,
you know you set your Bezier handles for what the curve is gonna do on the, on the incoming
and the outgoing side. You can copy and paste those and it'll maintain
that for you. Alright, so let's see how our bounce is doin'. Alright, it's feelin' pretty good so far. And what I'm gonna do is I'm just gonna have
it bounce a couple more times and then we're gonna tweak the curve overall. I'm gonna show you guys how to do that, alright? So, that was four frames, so now why don't
we do three frames. Just because. So it's gonna come up about half way. Alright, and then we'll copy this. And I'm just tryin' to make each curve a little
miniature version of the preceding curve, you know, and you can kinda see the shape
of it. Alright, one more bounce, two frames. Just go halfway. Alright, and this last bounce, I mean, it's
so quick that I don't need to mess with the curves too much. Okay? So now we've got a decent, it's not amazing,
but it's a decent bounce animation, right? And the speed of it feels appropriate. You know, and you could sit here and tweak
this for another 10 minutes and probably get it better but the next thing I wanna show
you is, you know, how do we make it even more exaggerated, even more cartoony. Alright. So we've got this nice curve here and what
we can basically do is just, you know, we can scale our keyframes so we can make this
take a little longer but then actually, you know, compress the curves so that there's
more action sort of in between the acceleration and the deceleration. So, if you guys don't know, the way to scale
keyframes in After Effects, you have to select all the keyframes you wanna scale, and you,
and you hold option. And on a PC I'm assuming option is ALT maybe,
or Control. So if you, you click either the first or last
keyframe, you can't select any of the ones in the middle, it won't work. So if I hold option and click and drag you
see how it scales them all, right? So I'm gonna scale them just a little bit
longer. Okay, just a few frames. Go back into my curves. Now what I want to happen is I want, let's
just play this really quickly. Okay? I want the square to hang a little bit longer
at the top of each bounce and at the top, at the beginning, okay? Almost like a, like a cartoon, like when,
you know, Wiley Coyote hangs in midair for a little bit longer than he should. So what I'm gonna do is I'm gonna select all
of the keyframes which represent the top of the bounce and then at the same time I can
just pull all of their handles so I can stretch those out. And I can stretch 'em out on both sides and
you can see that when they're all selected they all respond the same way. Alright, so now let's play that. Cool, so now it's a lot more cartoony and,
you know, there's a lot more goin' on. Now, you're probably noticing this doesn't
feel exactly right and that's also because when you're doing something like this, generally
it's good to use what's called squash and stretch. If you've never heard of that, you can Google
it and it will, it will be explained to you. There's a million websites that will explain
what this is. And in After Effects, the way that you would
do that is you would just animate the scale of this square. I don't wanna spend too much time on this
tutorial, so I'm not gonna do that, maybe that's one for another day. But I wanna show you how you can, you know,
you can add to this a little bit by creating those little waves that were in the video. Sort of those impact waves that came out. Because using animation curves, it's not just
for position, you can use 'em for anything. So the way that I made, and actually let me
pull this up and show you guys the way I made these little, these little radiating lines
that came out, you know? So, the way I did that was I made a new comp
and I called it wave and I added a shape layer. And I wanted, I wanted a square so that it
would match the shape of the square that's bouncing. So let's just name this Wave01. Alright, and so right now I need to dive into
the contents of this shape layer. Go into the rectangle path and I wanna make
this path match the size of my square. Alright. And then I want to delete the fill so I only
have a stroke. And let's just change that stroke to two pixels
and let's make it black so we can see it a little better. Alright? So this is what I had. And what I wanted was as soon as that square
hits, I want sort of a radiating square to pop out of it like an impact wave but I also
wanted it to kinda draw and do some cool stuff. So, the first thing I wanted was the size
to get bigger. So what I did was I put a keyframe here and
I went forward one second and I made it grow pretty big. Alright? And if we ran preview that, that's really
boring. Of course, right? So, now we know how to make it feel better. We can add, and by the way, the hot key to
add Easy Ease is F9. You should memorize that. It's just a good place to start before you
go into the curve editor so I always make my keyframes Easy Ease, then I go into the
curve editor and I'm gonna click this button. Alright. So now I have this nice S curve. Now, when that square hits the ground, I want
those things to shoot out and then slow down, alright? So, right now, you can see it's slowly accelerating
and that's not what we want. We want it to shoot out. So I'm going to invert this curve like this,
okay? And then I want it to really slow down at
the end. So now let's play that. Okay? Now it feels a little bit more like a pop,
you know? Like a explosion or somethin', alright? So that's a good start. So then the next thing I wanted to do was
have the, I didn't want the entire square drawn on, I just wanted a piece of it and
I kinda wanted it animating a little bit. So I'm gonna show you guys a trick that I
like to do and I've done this in a lot of projects and you can get some cool effects
with it. What you do is you add a Trim Paths effector,
I'm not sure what these are called but you add a Trim Paths to this. And then you open it up and what Trim Paths
does is it let's you determine the start and end of the path that's actually gonna be drawn. So instead of drawing this entire square,
I can set this to, I don't know, let's say 30, and it only draws a little piece of it,
alright? And I kinda want more than that. So let's set it, let's set it to 50, alright? So it draws 50% of the square and then you
can use this offset, and I know it's a little tricky to see with the, with the handles on
here but now you can see that, you know, I can basically make the little, the Snake game
that used to show up on your Nokia phone. So I'm gonna, what I'm gonna do is keyframe
that and I want, I basically want it to rotate as the square's growing, so I'm gonna have
it rotate, let's say, 90 degrees. Cool, okay. So now if I play this, you know, the scale
feels good but that move doesn't feel good. I want that move to feel the same as the scale
so I'm gonna select the keyframes, I'm gonna hit F9, I'm gonna go in a Graph Editor and
I'm going to make this curve look exactly the same as the other one. And if, it doesn't have to be exactly the
same, but if you wanted it to be exactly the same, you can actually select multiple properties
and see their curves together. So I can kind of visually check and make sure
that my curves are actually looking the same. Alright, so now you get this kind of interesting
effect. And, maybe as a little bonus, I'm gonna, I'm
actually gonna make this animate a little differently than the one I showed you guys
at the beginning of the video. As it offsets, I'm gonna have it actually
draw off too. So, I'm gonna, by the way, another hotkey,
if you hit U, you may know, it brings up the, the properties on that layer that have keyframes. If you hit U twice, it brings up anything
that has been changed which is great when you're working with shape layers because if
you've added things or if you've tweaked anything, it'll just show you that. So I want another option in Trim Paths, which
is the, the start, right? So you can see I can, I can animate the start
and if I animate it to match the end, then the shape goes away. So, let's put a keyframe at the beginning,
go forward one second, set the start to 50 so it matches the ending, alright? Hit F9. Go into the Graph Editor. Pull this up. This is like old hat to you guys by now. Alright, so now you get this interesting,
this interesting animation, right? This kinda funky lookin' thing. And by itself it's not much, it definitely
doesn't look like a, like an impact wave or something. But if I, let me scale this layer up a little
bit. Alright. I'm gonna scale it up to 200%. That's too big, maybe 150. Alright. If I duplicate this and I scale it's copy
down 100, you know, 10% less, and then I'm gonna offset it a couple of frames. So I'm gonna hold Option and I'm gonna hit
Page Down twice and it's gonna slide that two, two frames. And then I'm also gonna rotate it 90 degrees. Alright, so now I get this cool kind of cascading
thing. And I'm gonna do that a few more times. So scale this to 130. Rotate this 180 degrees. Alright, and what do we have now? Now we have somethin' kinda interesting. I actually like this a lot better than the,
than the one that was on the clip I showed you guys. So yeah, so you get this kinda interesting
impact wave thing and then I just brought that in and I just lined it up. Let me scale this down a little bit. Yeah, and that's basically it. And then I colorized it, you know, I used
a fill effect to colorize it. And I had the, you know, I had the square
change color every time it landed and some other things. But basically that's all I did. So I'm gonna duplicate the wave and every
time it lands I'm gonna add another one. And here's another keyframe for you guys. So, I'm hitting Command D to duplicate the
layer and then I'm hitting the left bracket. And what that does is it brings whatever layer
is selected, it brings the head of it to wherever your play head is, this, this red line, right? And then at the end there's one more. Alright, so now you can see that, you know,
it starts to get a little crazy at the end. So what I did was actually take each wave,
the whole pre-comp of that wave and rotate it 90 degrees. 180, 270, and then I'll rotate this first
one negative 90. So now you actually get kinda slightly different
waves each time. So when you have multiple ones playing, you
know, they don't overlap as much, you know? And now I'm, now I'm starting to critique
this and I'm thinkin' that maybe two frames apart isn't enough. Maybe you need like three or four frames and
maybe they should be a little random. Now let's play that. Yeah, it needs a little work. What are you gonna do. Anyway, so I hope that now you guys understand
the, the animation curve editor a little bit better in After Effects. And I really, really want you guys to get
in there and use that thing because, you know, I've seen a lot of people do things like this,
which makes me crazy, where they're animating something and they say, "Okay, I want, I want
this cube to be here in a second "but I want it to be almost all the way there by 12 frames." So they go to frame 12 and they just do this,
and they, now they have three keyframes. And why? You don't need three keyframes, all you need
is two. You wanna have the least amount of keyframes
humanly possible when you're doing motion graphics, that is, that is a good rule. Because inevitably when you're doing stuff
professionally, it's all gonna change, and if you have two keyframes versus four keyframes
it will take you half the time. So, get in there, use the animation curve
editor, make your animations feel good and, you know, and just remember that, you know,
when you animate this way you can actually see your animation. If you're doing a bounce, you can actually
see the bounce and, and after awhile you'll, you know, in a year, if you guys do this,
you could look at this and tell me what's happening without actually seeing the animation. And you'll have a common language when you're
talking to other animators and when you're, you know, if you ever get to a position where
you're supervising somebody and you see that their animation doesn't feel right, you can
tell them, "Go into that curve editor and," you know, you know, "Pull those handles out
"and make that deceleration a lot longer," you know? And maybe they won't know what you're talkin'
about but you can show them and impress your friends. So I hope this was helpful. Thank you guys as always for watching. Schoolofmotion.com, I will see you guys later. Thank you so much for watching. I hope this lesson gave you some insight into
how the Graph Editor in After Effects can be used to make your animations look better. We only had enough time in this lesson to
scratch the surface of what knowing the Graph Editor can do for your work. If you want to know more about using this
incredibly powerful tool, make sure you check out our Animation Bootcamp Program. Anyway, thanks again, and I'll see you next
time.