If you've checked out my Cartoon Animation Basics series or my MPV Hub article on Monty Python Mouth Animation in After Effects, you've seen some examples of jointed animation: where the character is broken up into the sections (usually at the joints), the joints are "pinned" together with anchor points, and you animate the character by rotating or re-positioning the limbs (or jaws) around those anchor points. It's a simple and effective animation technique, but tends to create rigid characters that look like marionettes on strings.
However, there's another technique available to us in After Effects that lets us create much more organic, spontaneous "squash-and-stretch" animation. Squash-and-stretch was a fluid, rubbery animation style dating back to the 1920s, and used to great effect in cartoons like Betty Boop animations, where the squash-and-stretch style is taken to surreal extremes:
Using After Effect's Puppet Pin Tool, we can animate our own characters in a highly organic, natural squash-and-stretch style, and even record our character's movements in realtime while syncing the movements to a soundtrack, all in After Effects. And in this feature tutorial, I'll show you the basics of how to do just that. (My new series "More Cartoon Animation Basics" covers the Puppet Pin Tool in detail.) Let's get started.
Now, unlike the characters you need to create for jointed animation, where you have to break the character up into separate layers in Photoshop before importing it into After Effects, your Puppet Pin character should be all one piece on a single layer. In fact, all your character needs is an alpha channel outline, which will define the character's edges when you rig it with the Puppet Pin Tool (this will make more sense in a bit.)
For this tutorial, I'm just going to use a very simple outline of a generic exercise figure, white on black:
You can use whatever image you like, of course, but it's essential that the image has an alpha channel that outlines its shape. If it doesn't have one of its own, you'll need to mask the outline of the image manually. Fortunately, my image is an easy one to mask, which is one of the reasons I chose it. If you have a similar image, here's one method for quickly masking an image. Grab the Magic Wand Tool (W):
Then click with it in the larger white area of the image to select all the white pixels:
We also want the character's head to be part of the Puppet Pin animation, so we need to add that to the alpha channel. So, Shift-click with the Magic Wand in the head area to add its pixels to the selection:
Now choose Select > Save Selection... and save the selection as a New Channel to create an alpha channel:
We now have an alpha channel that exactly duplicates the image. However, we need to connect the head part of the alpha channel to the body, or else the Puppet Pin Tool will see them as two separate objects and won't connect them into a single character. At the same time, we don't want to create an artificial neck for the figure that is, we want the head to appear detached. We solve that problem by painting directly into the alpha channel, not the RGB channels.
So, in Photoshop, click the Channels tab to show the channels, turn off the visibility for the RGB channels, turn on the visibility for the Alpha channel, and select it for editing:
Next set your background color to white and use the Rectangular Marquee tool to make a selection between the head and neck, then delete the selection to white:
We still have black in the RGB channels, so the head will appear to be detached when composited against black, but the alpha channel connects the two sections together for the Puppet Pin. Just save the image as a Photoshop file to preserve the alpha channel, and we're ready to start working in After Effects.
The music excerpt I'm going to use here is 22 seconds long, so that's how long my project will be. And I'm going to work at 640 x 480 pixels for a reasonable video frame size. Also note that my comp background color is black:
Import your music and image files, add them to your comp, and we're ready to rig the character.
The next step is to rig the character with the Puppet Pin Tool, which means to set the deformation points that we'll be animating. The way that Puppet Pin works is that setting an initial Pin point with the tool divides the entire character'"based on its alpha channel'" into a fine mesh of triangles. You can then add additional Pin points to define joints and deformation centers. After that, you can move those Pins around (including keyframing them), and the pixels underneath the mesh will warp and bend with the mesh, almost as if your image has been printed onto a sheet of rubber, and you're stretching and pulling the sheet. It's a cool effect, but you need to rig the character first.
So, to start, grab the Puppet Pin Tool from the toolbar, leaving its settings at their defaults for now:
Click with it in the foot region of the figure - you'll see the figure covered with the mesh:
Next we want to add some additional Pin points. These points serve as animation control points and set limits for the influence of other points on the mesh. However, you don't need very many points for a simple animation. In my case, I'm just going to have the figure swaying its hips to the music while waving its arms overhead, but keeping its feet in place. So, I really only need Pins in both feet (to keep them in place), one at the hips (which will be our main animation point), and one on the head near the neck, which will let the head move along with the body but also help keep it in place, so it isn't completely in sync with the body:
Experimentation will, of course, help you understand how the Pins affect each other, but for now, we only need a couple. Now that you have a couple of Pins in place, you can just position your cursor on one of the points and drag it around to see what happens: you'll see that the mesh, and the character, deform to follow the point:
Now comes the fun part: making the character dance. We could do this by keyframing the character over time in the usual way, but it's much more entertaining to record an animation in realtime while listening to a soundtrack. This is one of the Puppet Pin's coolest features.
To start with, we need a soundtrack, of course; I'm using an excerpt of one of my old scores. Just add that to the character's comp and position it in time where you'd like it to start. Then, with the Puppet Pin Tool selected, hold down the Command key and position the tool over one of your Pin points; you'll see the cursor add a small clock icon. As soon as you click with that Record cursor on the Pin, the recording will start, so be prepared for that. You might need some practice to get a feel for how the recording begins, but you can always undo any false starts you make.
So, click and start dancing! Here's a screen capture of one of my own efforts, something like what you'll see when you do it yourself:
And here's the result:
And basically, that's what you need to know to get started with the Puppet Pin Tool, a wonderful but lesser-known feature in After Effects. And as always, experiment, and have fun.