Join George Maestri for an in-depth discussion in this video Understanding animation curves, part of Animation Techniques: Creating Smooth Motion.
- Let's start off by understanding some of the basics of animation curves. Now, I'm using Maya but these techniques should apply to just about any software that supports animation curves. Now, we're gonna be animating these simple rocket planes here. I've got one, two, and three. So let's start off by animating some of these, taking a look at the curves and understanding how the curves affect the character of the motion of the object. So, gonna start off with the top one and we're going to create a very simple animation.
I'm gonna create a keyframe here at Frame 1 and then I'm gonna scroll forward to say Frame 60 and then create another keyframe. Now in Maya, I have auto key turned on and that will automatically set a key when I start to move the object. So, I'm gonna go ahead and move this object forward about 500 units. In fact, let's make it exactly 500 units. And when I do, you can just play this back and you'll see you get, oh, pretty smooth motion.
It starts off slowly and then you see it slows to a stop. Now, if we take a look at the animation curve here. I'm gonna hit "F" to frame this up, so I'm gonna select my object and hit "F" to frame this up. You'll see that it's basically has what's called a slow-in and a slow-out. So, it's slowing into the motion and slowing back out. Now, if I were to select all of these you'll see that I have what's called a Bezier handle here that allows me to affect this.
But I'm not gonna worry about that right now. We'll get to that in a little bit later. But what we see here is that as the object moves this curve shows you exactly where it's at. So, if we select this first one here you'll see that it starts at zero. And then, when you go to the end of the animation you'll see that this line corresponds with 500. So, it's going from 0 to 500 along the x-axis.
Now, let's go ahead and do another animation. Let's go ahead and take this middle one and again, do the same thing. We're gonna set a key here, go forward to frame 60 and again translate it 500 units in x and make sure we set a key. Now what this is doing it that it's actually creating the exact same animation that I have for the other one. But let's go ahead and change this up a little bit. Let's change the animation curve. Now, I can do that in a number of ways.
I can grab the handles and re-sculpt it or I can use a number of these presets for animation curves. And the one I'm interest in is this one here and that's called Linear Tangent. And what it does is it turns it from a curve into a straight line. When that happens it basically goes the same speed throughout. So, now we have two objects and they're each moving with a different animation curve. One is straight, one has a slow-in and slow-out.
Now, when I play them you could see how that affects it. So at the beginning, the first one lags behind and then it goes faster and catches up. Now, we can actually see that in the animation curve. You could see how this one here which is the top one is starting off more slowly and notice how the curve is more horizontal and that means that it's changing less.
And then, as it gets towards the middle here this curve actually changes and the slope of the curve is actually greater than the other rocket plane's curve. So, the slope of the line also determines velocity. The steeper the slope the faster the object is moving. So, this is a really great thing to know when you want to look at a curve and understand how fast something's moving relative to another. If the curve is steeper it's moving faster.
And now, as we go towards the end here, this top one is moving faster and you can see that in the curve. It's actually gone 400 units by the time it's hit 42. While the other one has gone maybe about 350. And then once we get to the end this one's again smooths out, slows down to a stop and they both stop at the same place. So again, let's take a look at these and again look at the curves and see these play.
So you can see that as the curve changes in angle and slope, the velocity changes. Let's go ahead and do something a little more complex. We're gonna select the last one here and we're gonna set the same conditions. We're gonna set a keyframe at one go to 60 and then set another keyframe of 500 for translation of x. Now with this one we can actually start to play with the animation a little bit. So, let's go to frame 30 here and let's actually take this rocket plane and push it back a little bit.
So, let's make it kind of lag behind quite a bit. Now, I'm adding an additional keyframe here and you could see that as I change the position of this, it's actually changing that curve. So, this starts off very, very gradually. You can see how the curve is almost flat and then it accelerates and then again does a slow-out and they all reach the same positions. So now, this one starts off very slowy but you could see how it speeds up very quickly in the latter half.
Now, if we select all of these and see the curves, you can see how this curve here starts to have a steeper slope right around here. And this is where it really kinda takes off and starts to catch up with everything else. Now, we can certainly play with these curves to get any sort of effect we want. So, if I wanted to I can move this up and down or back and forth to change the timing or position of this. I can also grab the handles and change the angle of that curve.
Now, if I were to change the angle to something like this, you'll notice that we've got a complete reversal in direction of the slope of the curve. Now, what this will do is that it will actually move into negative velocity. So, what will happen here is that when I get this curve sloping down the object will start to move backwards. And you can see that that's probably not desirable in this situation. And so, these little bumps in the animation curve can be real strong pointers for something that's not quite right.
So what you need to do is learn to look for changes in direction or changes in velocity of the curve and that can help you create smooth animation. So that's just a quick overview of animation curves in one dimension and you could see how the shape of the curve really affects the character of an object's motion.