Big Heads, Tracking Motion, and Napoleon Dynamite

Written by Tim Yoon

I love watching the NBA. In addition to loving the game, I often enjoy watching the NBA promotional video series (“Where Amazing Happens” is a personal favorite). There was a particularly amusing promo series a couple years back where NBA stars had big head cutouts and looked akin to bobbleheads:

Today we will use After Effects to create this effect, which is often referred to as the “JibJab” effect (named after the digital media company that made said effect popular).

Set-up:

  • Desired Video Clip

I would recommend picking a clip that has a close-up of the head (which makes it easier to track motion) and where the head is only facing forward. For this tutorial we will be using a dance scene from the movie Napoleon Dynamite.

  • Cutout head image

We won’t cover how to cut out a head in Photoshop in this tutorial. That being said, in order to preserve the transparent background (once the image is cut out), you’ll want to save your image as either a .tif or a .psd. Otherwise AE will add a white background to the empty space around the face, ruining the cutout feel.

Part 1: Using the Tracker Tool to Create Initial Motion Paths

Bring the movie down as a layer in the project. With that layer selected we want to use the Track Motion tool (under the “Animation” menu option).

The Track Motion tool allows you to create motion paths by having AE follow a specific target of your choosing, frame by frame. Once you select it, “Tracker Point 1” with two adjustable squares (inner and outer) should appear.

The inner square tells AE what to track (the specific pixels in the box). Ideally this square tracks a group of pixels that contrast well with its surroundings (otherwise the tracker will get confuse about what to track). Because we’re looking to track a face, eyes are often good targets for the square. The pupils provide a good place to put the x, and an eye tends to contrasts well with the rest of the face. Adjust the box to fit your target of choice.

The outside square is the space in which the inner square could move to in the next frame. This is to help AE anticipate where to expect the main target to move next. Increase the square size if you anticipate the target to travel a large distance during the next frame, vice versa.

With that in mind, you can now use the “Analyze” section in the Tracker Menu. It looks similar to a playback menu but it serves a different purpose.

  • The “Analyze Forward” button tells AE to go through the whole clip and follow the target as best its can (and in doing so creating a motion path).
  • “Analyze Backward” tells AE to create the motion path by trying to track the target while the clip is rewinding.
  • “Analyze 1 frame forward” tells AE to only follow the target for one frame ahead
  • “Analyze 1 frame backward” tells AE to only follow the target for one frame before

The general “Analyze Forward/Backward” buttons save time at the expense of motion path accuracy. And the “1 Frame” buttons create a more accurate motion path at the expense of time.

Depending on how easy the target is to follow, the “Tracker Point 1” box may or may not get lost. If it does get lost on a frame, you can simply move the box to where it needs to be by navigating to that frame. Understandably, there may be multiple frames that you may need to adjust.

Page up and Page down are shortcut keys that will allow you to move between frames quickly. Moreover, as you’re trying to follow the Tracker box if you hold the spacebar down you can move across the canvas (as an alternative to scrolling).

Stepping back for a moment: in the video, Napoleon Dynamite’s head is constantly moving, turning, and bobbing. But if our face cutout were to follow our one tracker path, it would never rotate while moving as if affected by the motion.

So we want to add a rotation effect (essentially another motion path) to create a more realistic feel.

To add a rotation effect, we need to use the “stabilize motion” option (found in the tracker menu). This will create a “Track Point 2” box that works in the same way as the previous “Track Point 1.”

This time though, you’ll need to focus on a different target on the face, such as the nose or lips. In our case, we’ll be using the lower lips because the lighting provides the best contrast relative to other facial parts. Notice how the two Track Points are connected; the rotation effect happens because AE determines the relative positions between the two targets.

Again, the same rules apply to the inner/outer boxes, and adjusting frame by frame.

 

Part 2: Attaching the Face

Now that we have the motion paths, we need to transfer them onto a layer separate from the video.

To do this we will create a null object layer (layer-> new -> null object).

Next, under the Tracker menu we want to click “Edit Target…” and choose the null object that we just created.

Once the target is set, we want to click “Apply” from the bottom of the Tracker menu and have both “X and Y” dimensions.

Now we can finally add the face cutout picture as a layer, making sure that the layer is on top of the video clip layer.

Adjust the cutout size, position, and rotation (Layer->Transform->Rotation) so that it covers the face from the original video appropriately.

Picture layer selected, assign the null object to be the picture layer’s parent.

Voila!

If you play the composition, we should now see that the cutout image follows the motion paths applied to the null.

Part 3: Clean up and Exporting

Unfortunately, the cutout may not follow the path you thought you set as well as you would like. The cutout may jerk oddly at times, or may even rotate randomly.

To clean this up, you’ll need to go back to the video layer, edit the specific frames that have issues, and then reapply them to the null object. Unintended jerks are often because one of the “Track Point” boxes lost its target. Random rotations are an extreme case of this, in which the two “Track Point” boxes switch locations.

Again: the page up, page down, and spacebar keys will be your friends here.

Once the edit is to your liking, you can create the movie by going to Composition->Add to Render Queue, and then clicking Render.

Note: if the video clip had audio and you wanted to preserve the audio, then within the render menu go to Output Module->Lossless and then in the popup menu check on the “Audio Output” setting.

++++++++

Otherwise, that’s it! Here’s the final version of my JibJab example:

Happy JibJab-ing!

- Tim

This entry was posted in AfterEffects, Tutorial and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Christine Vucinich
    Posted April 29, 2012 at 8:14 am | Permalink

    This is great Tim!!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • New MPS West Now Open!

    The new MPS in 006 Bostock is officially open! Come see us in our new location near the Link in the lower level of Bostock.

    The Old Chem branch of the Multimedia Project Studio is now permanently closed.

  • What is the MPS?

    The Multimedia Project Studios are a series of high-end computer labs located at Duke University. We feature cutting edge equipment and industry standard software and are staffed by a corps of student Multimedia Consultants who are available to help you out with your project on a one-on-one basis, but are not able to do production work on your behalf.
    MPS Lab Locations & Hours
    MPS East
    115 Lilly Library
    The MPS in Lilly is open whenever the library is open. Check their site for hours, which can change during holidays and academic breaks.

    MPS West
    006 Bostock
    The MPS in Bostock is open whenever the library is open. Check their site for hours, which can change during holidays and academic breaks.




    Staffed Hours for Both Locations

    Winter, summer, and other break hours will vary, according to student consultant availability. To check consultants' availability, view our Live Schedule.

    Sunday - Thursday: noon to midnight
    Friday: noon to six
    Be sure to check our Live Schedule to see who will be on staff and our staff page to meet our talented consultants.