Mapping Puppet to Motion Track in After Effects

In Aftereffects, first track a couple of points using multiple trackers. To set this up - refer to the Motion Tracking in After Effects tutorial.

Once you have some trackers on your video, and you have applyed the transform motion to other layers - so you have solids, or nulls moving around based on captured motion - you are ready to begin these steps.

Create a solid and use the pen tool to draw on a mask, or import a photoshop file.

With the object that you want to deform selected, click on the pushpin icon at the top of the screen, then click on the object to add control points for aniamtion.

Once you have multiple control points, on the timeline, open up the attributes to reveal the Puppet effect that has been applied to your layer. If you click on the word Puppet, you should gain access to the control points - and you can test the way that your puppet deforms. You may delete or add puppet pins at this point.

Next, open up the Mesh Attribute and find the Puppet pins in the time line. Just below the puppet pin word, click on the word "Position" which will be partially obscured (see screenshot below). With this selected, go to Animation->Add Expression. Type over the existing expression so it matches the expression below. Notice I have used layer names to designate how each puppet pin will lock to each layer.

Here is that expression for copy-paste. I could add that instead of ("hand") in quotes you could simply have this list the layer number (2) without quotes.

N = thisComp.layer("hand");

Adding these scripts should keep the pins locked to the position of the layer that have motion tracked keyframes applied to them.

Joshua Mosley 2010