Software used
After Effects CS5.5
What you will learn
In the days of hand-drawn animation, a group of top Disney animators came together and defined twelve rules of animation that, when applied properly, would create amazing animation and an engaging experience for the audience. In 1981 Frank Thomas and Ollie Johnston released a book titled 'The Illusion of Life: Disney Animation', which detailed all 12 principles. Since then, animators around the world have studied and applied these techniques. Although they were originally created for hand-drawn animation, these 12 principles apply directly to our modern computer generated animation. Whenever you set a keyframe in any application, you should be thinking of the 12 principles of animation.
In this lesson we're going to learn how to automate some follow-through and overlapping action and using expressions. So I've just opened up the scene file from the end of our follow-through and overlapping action tutorial, or you could open up 14_begin. Now, just a quick recap of that. Overlapping action and follow-through happens when a primary mask is connected to other objects, or appendages, and those appendages, or children, move with the force of the current mass, but at a delay. So here we have our hand keyed example where we have this object, or the light bulb, driving the chain so that, whenever the light bulb moves, the chain moves, but at a delay. So we hand keyed this, and of course this could have gone faster. Now, for expressions to work, we need a relatively simple chain of objects, and we need some initial animation. So we'll see on pull cord two, we've already animated this with follow-through, and overlapping action, and ease in and ease out applied to it. So let's begin by deleting the animation on the rest of these appendages. So we need at least one appendage, or we need at least one object's worth, of key frame data. Now from here, we can simply grab that rotation key frame and then offset the time. So let's jump right in. I'm going to hold Alt, create an expression here, and let's pick whip this to the rotation on pull cord two. Now, if we click off, we can see the value is just directly being copied in. Not exactly what we want yet, but we're getting close. Now, if you want to learn more about expressions, you could take a look at our After Effects Expressions Made Easy course where we go through expressions and we go through almost everything we're going to talk about in this lesson. So if you're not yet comfortable with expressions, I recommend going through this course before trying to apply this in your own projects. Now, next, we need to get the value at a different time. So let's say we want to get the value at a minus 1 frame. So to do that, we'll need the .value AtTime command. And this needs two parentheses, and inside, we need to define what time we want to put here. So we can put a value, so let's say at frame zero. So at frame zero, a value of the rotation is negative 0.4. Not super helpful yet, but we can also add in the time. So if we do the current time, that just returns the second of the current time. Now, we said we wanted to get one frame before. So let's try time minus 1. Now, if you've already scene the caveat here, this is in seconds, and we want to subtract frames. So we're going to need to do a little math, I'm sorry. Let's take a look at our frames per second, and we're going to go to our composition settings. Let's see. We've got a frame rate of 24. 1 divided by 24, which gives us the number of frames, or the amount of seconds per frame Comes out to be 0.04. Now, I'm not a genius. I put that my calculator before starting this lesson. So, instead of one, we want to take the time and subtract 0.04 seconds. And that, again, equates to one frame. And so now, this next layer has that value minus that time. So now you might be thinking, OK, we can just copy this expression and paste it into the other rotations. Let's take a look at what happens. So just paste that in, and take a look. Now, it looks so like it's working, however, you'll notice the values for these are all exactly the same. And instead of that, we want the values to be offsetting according to the layer below this. Now the problem is, of course, that we are directly referencing this layer. So we're directly saying go to pull cord two and take that information. What we really wanted to say was, take the layer below this. So in expression terms, that just means the index of the current later plus 1. So index plus 1 inside of this layer will grab the layer below it. Now, if we pace this expression in all of our rotations, we should have a working follow-through and overlapping action quite automatically. So you can see here, with very few key frames we were able to create this very dynamic motion and very appealing motion. And the great thing about this is, now we can change the timing and spacing of only a single layer, and we're going to have everything else follow along appropriately. Now, I'm not exactly sure if this is the right changing for this timing and spacing, but you can see here that we only have to update a single set of key frames instead of every single key frame on every single layer. So using expressions can make follow-through and overlapping action much, much faster and much, much easier to understand and execute. OK great. So again, here is that expression, and let me bring up a slightly larger text window. So all we did was take this comp, we took the layer below this, and that is specific to our hierarchy where each of the appendages was on the layer above the primary mass. So we went primary mass, appendage one, appendage two, so on and so forth. And again, these are parented to the layer below them. Then we took the transform rotation from that layer below it, and then took the value at a time minus a single frame converted into seconds. So again that's just 1 divided by your frame rate. So that brings us to the end of this course on the 12 principles of animation in After Effects. As always, I' hope you've enjoyed this content. If you have any questions, or if you want to just show off your work, feel free to join our forums where we're active members and where we have hundreds of helpful customers. So I can't wait to see how you apply these 12 principles in your own projects.