TECH TIPS


Mocha-AE Caffeinates Workflow
Motion Tracking in After Effects Made Easy
by Ben Bardens


Figure 1: The Mocha-AE, interface. In this example, I am tracking the label of a can as I lift it up and out of frame. Potentially a time-consuming and difficult task using After Effects' built-in tracker, but a breeze for Mocha-AE's powerful planar tracker.

Motion tracking is one of the most common tasks that compositors and visual effects artists have to deal with. Ask any experienced After Effects compositors, though, and they’ll tell you it can also be one of the most difficult. Depending on the nature of the shot, the quality of the footage and type of tracking that needs to be performed, completing an accurate track can be tedious and time consuming.

Using the tracker built into After Effects can get the job done, but it can also take several tries, and oftentimes much manual adjustment to get it right. And when the shot has problems, such as inconsistent lighting, motion blur, objects obscuring the motion source, or a motion source that travels in and out of frame, the standard motion tracker can require so much manual adjusting that you might as well be rotoscoping.

Well, no more. Thanks to Imagineer Systems’ new affordable Mocha-AE, the challenge of motion tracking difficult shots for use in your After Effects composites just got a whole lot easier.

Understanding Motion Tracking
Motion tracking is the process of following movement in a source clip (the motion source) and then applying that movement to another footage item, or a special effect control point (the motion target). Some common examples of composites that require motion tracking include placing video or animated graphics onto a TV screen or computer monitor, removing or replacing product labels, or adding a special effect, such as a traveling particle stream, to an object in an effects sequence.

The built-in motion tracker in After Effects uses what are called “track points” to determine the transformation data that it will apply to the target. A track point identifies a group of pixels on a particular frame (the feature region) and then attempts to locate those pixels on each subsequent frame. Pixels are identified based on their color values, luminance or saturation levels. Generally speaking, point tracking works best when the pixels the tracker is attempting to follow have a very obvious color value, or high contrast, versus their surrounding pixels.

While there are settings that affect how the tracker looks for the feature region, and can even adapt it for each frame of the sequence (re-determining the values), there are limitations to using track points to perform a tricky motion track. For example, if the tracker can’t find the feature region within a specified “confidence” level, it will stop recording what is called “attach point” data––and the result will be breaks in the motion when applied to the motion target. Also, if the tracker has trouble locating the feature region, or the feature region is too large, it can start to drift or jump away from the point you are trying to track.

Another factor that can make point tracking a laborious task is that tracking motion that is more complex than just a flat x and y movement requires more than one track point. For example, to track the rotation of an object, or a change in scale, requires two track points so that the tracker can gauge the difference between them. To track a surface that skews or changes in perspective requires three or four track points respectively. When you take into account the limitations mentioned above, you can see how using basic point tracking on a clip that is less than perfect can become very difficult.

The Mocha-AE Difference
Mocha-AE performs motion tracking in a fundamentally different way than the built-in tracker found in After Effects. Instead of using track points and attempting to follow individual groups of pixels, Mocha-AE uses Imagineer Systems’ “planar tracking” technology to easily track a surface plane within the footage. The result is a much more accurate track, in a small fraction of the time that it can take to work with individual track points.

Using simple X-spline, or Bezier drawing tools, you can simply outline the area you are attempting to track and literally hit the track forward or backward button and Mocha-AE does the rest. It really is that good. No need to specify search regions or fine-tune feature areas. Mocha-AE even tracks footage accurately as it travels out of frame.

In the example pictured here (see Figure 2), I performed a track to follow a product label as it changes perspective and travels completely out of frame.


Figure 2: Mocha-AE's tool to create an X-spline or Bezier mask identifying the plane to track.

In After Effects, using the built-in tracker, it would involve pre-composing the motion source, changing composition settings, applying a four-point tracker, tweaking tracker options, performing the track more than once, and then still having to manually adjust individual keyframes as the label travels off the frame. And then, to apply the result, I most likely would have to use expressions to hook up my feature regions to my corner pins for each track point, as the attach point becomes useless when the label travels out of frame. Setting all this up and getting it to look right could easily take an hour.

In Mocha-AE, it took me about two minutes to get the perfect track. All I had to do was import the motion source, draw a rough X-spline around the label, adjust the “surface” corners and hit track forward. I got a perfect track on the first try that stayed perfect as it traveled completely out of frame. Amazing!

Mocha-AE and After Effects
Mocha-AE is a smaller version of Imagineer Systems’ Mocha Tracking Station software that has been developed specifically for the After Effects market. Mocha-AE is a standalone application, not a plug-in that runs within After Effects. To use Mocha-AE in an After Effects pipeline, you follow these basic steps:

Set up your project in After Effects as you would normally with both your motion source and your motion target in a composition.

Launch Mocha-AE and start a new session.

Import your motion source footage into Mocha-AE. This should be the exact same clip that you are using in AE, and should be interpreted with the same settings for resolution, aspect ration, pixel aspect ratio, interlace, 3:2 pulldown and frame rate.

Use Mocha-AE’s tools to create an X-spline or Bezier mask identifying the plane to track (see Figure 3).


Figure 3: The keyframe data as exported from Mocha-AE. Ready to be copy and pasted to a corner pin effect on the motion target layer, back in After Effects.

Click the Surface button and set the corners where you want the corner points of AE’s corner pin effect to be located for the target layer.

Use forward or backward track buttons to analyze the footage.

Chances are you’ll be impressed with the first track. If necessary, you can modify your track using the “Adjust Track” features to correct for drift.

When happy with the track, simply click the Export Tracking Data… button.

Mocha-AE exports Tracking Data as After Effects keyframe data within a standard text file (.txt). You then simply copy and paste the data from the text file to the appropriate property back in the After Effects timeline. Mocha-AE will export either corner pin effect data, or basic transformation data (Position, Scale, Rotation, Anchor Point), depending on the format you specify in the Mocha-AE export dialogue. Workflow between AE and Mocha-AE is as simple as copy and paste.

The Mocha-AE interface is intuitive and easy to use, with familiar buttons and controls most editors and compositors will easily recognize. The Imagineer Systems website (www.imagineersystems.com) has helpful video tutorials to get you up to speed, and the software includes a useful Quick Start PDF. One limitation: the software does have a minimum monitor resolution requirement of 1200x800.

Final Word
Many third-party software tools make bold claims about simplifying complex or tedious compositing tasks. Mocha-AE is one software tool that completely lives up to expectations. It even surpasses them. And with a retail price of only $299, Mocha-AE is a fraction of the cost of the original Mocha Tracking Station. It’s well worth the price.

Ben Bardens teaches After Effects at Glendale Community College and at Studio Arts (www.studioarts.tv) and has been using After Effects professionally since version 3.0. He can be reached by e-mail at bbardens@glendale.edu.

[ return to top ]