One of those skills is motion tracking. You’ve probably seen the effects of motion tracking — smoothly floating text, perfectly placed graphics — in professional videos. Today, we’re going to learn how to use After Effects (AE) to do it ourselves.
The Basics of Motion Tracking
Let’s start at the beginning: what is motion tracking? Motion tracking is what makes text, graphics, or masks move with an object in a video. Here’s an example:
This effect is often used to indicate characters or illustrate video captions. Don’t confuse motion tracking with camera tracking. It’s a similar feature, and allows users to set text in landscapes by tracking and accounting for camera movement.
With motion tracking, AE analyzes the movement of color patterns and transfers that movement data onto another parameter. Keep in mind, tracking the motion of an object must track camera movement as well.
In this tutorial, I’ll explain how to use AE’s default motion tracking function to track the movement of an object and match that movement with text. The process is generally the same for motion tracking images and masks as well. This makes it a great tool to have in your AE library.
Here’s the clip we’ll start with:
A small range of motion across a frame, accompanied with a stark color contrast, will allow for optimal motion tracking.
Step : Enable Motion Tracker
Put your video clip into After Effects by dragging and dropping it into the left-hand panel of the After Effects window. Once your media appears in the Project panel, drag it into your timeline. You’ll see your video in the middle screen.
Next, click on the Tracker option on the right-hand panel under Info. You’ll see four options: Track Camera, Track Motion, Warp Stabilizer, and Stabilize Motion. Click on Track Motion in order to open the tracker options.
In order to view your track point and its path, you must set Motion Source to your video clip and Current Track to the track name used to track your object.
Once those two parameters are listed, you will be able to see your track point’s path. A small icon will appear in the middle of the screen labelled Track Point 1. The track point is composed of two squares: the inside square locates the color you want to track, and the outside square outlines the scanned area so as to limit the color’s reference space.
Drag the track point onto a moving object so the center square is focused on a point of high color contrast. The tracking point does not know it’s tracking an object: it’s simply trying to track a moving color.
If your object is moving fast, expand the outer square. This will make your motion tracking load slower, but will also provide more accurate results.
Step 2: Analyze Motion Tracking
Next, we have to analyze the motion of your object using the Track Motion tool. After you’ve placed the track point on an area of high contrast, click on the Options button in your Tracker section.
Change the default Adapt Feature to Stop Tracking, and change the If Confidence is Below rating to 90–95%. When the motion tracking software begins analyzing motion, it sometimes moves hectically to do so. This can lead to wildly varying motion from frame to frame. The previous options will pause the analysis whenever its confidence — the automated motion of the object — drops below a certain rate.
Then, click on the play button beside the Analyze section. The Motion Tracker will scan the movement of the object and stop intermittently. If the tracker deviates from the object, you can always move the tracker again with your mouse cursor.
Once the tracker is done analyzing the motion, ensure it has tracked a smooth path. On the timeline section of AE, click the drop-down icon beside your source video until the track parameters and key frames are visible.
Zoom into your key frames using Alt + Scroll Wheel Up so you see each individual frame. Then drag the Current Time Indicator (in blue) along the track in order to refine the motion tracker. Ensure your Track Point maintains its position on the object in order to ensure its valid movement.
Step 3: Create Your Null Object
Null objects don’t add anything to the video: instead, they provide an empty object that users can observe and modify. To create a null object, right-click an empty space on your timeline and select New, then Null Object.
You’re going to apply the motion information you received with the motion tracker into your null object. This will allow you to connect one or several objects to your null object’s motion. Once your object is created, rename it whatever you’d like by right-clicking the object and selecting Rename.
Then head back to your Tracker category. Ensure you have the correct Motion Source and Current Track listing. Then click on the Edit Target option.
In the drop-down menu that follows, select your null object. Finally, click Apply in the Tracker panel. In the window that follows, enter a parameter for Apply Dimensions. To track motion fully, select X and Y and click OK.
Click on the drop-down menu under your Null object until you see its individual key frames. You should see similar key frames to those in your original video.
You’ll see a red object moving with your track point. Leave these settings as they are, since the red square of your null object won’t show the subtle movements of your tracking path.
Step 4: Create Your Moving Object
Let’s add some text above Louis C.K.’s head in the video. First, create your text. You can create text using the large T icon on the top of your window. Then edit the text using the Character panel on the right-hand side.
Place your text wherever you’d like, but keep in mind that the text will move relative to the Null object. Once you’ve placed your text, click and hold the spiral shape beside your text — under the Parent parameter — and drag it to your null object.
This will convey the movement information from your null object to your text. Once you’ve tied the text to your null object, play the clip through.
Step 5: Refine Motion Tracking
While using the default motion tracking function will often get the job done, there are times when you’ll get choppy motion. A simple way to refine your motion tracking is to use the Smoother tool.
Remember, any motion tracking conducted by your text or shape will be modified through the null object since it’s the null object that coordinates movement. Click on the drop down icon beside your null object until you can see the Position key frames. Then, click on the S-curve icon, labeled Graph Editor, located slightly above your timeline.
The graph editor displays your key frames as X and Y coordinates, increasing and decreasing as your null object moves. The smoother tool will decrease the amount of individual key frames while maintaining the overall motion of your object. This may smooth the typical jittery motion of AE’s default motion tracker over large portions of the frame.
Click on the Smoother tool on the right-hand side of the window. You’ll see grayed out parameters. Select all of your key frames by clicking and dragging your mouse within the timeline. Your key frames will be converted into yellow squares. Finally, in your Smoother panel, change the tolerance to a low number (increments of 1 preferably) and click Apply.
You’ll note there are fewer key frames after Smoother is applied. You should also note a less jittery, smoother movement. While this may help somewhat, over-smoothing your key frames will also create motion issues.
Get Your Text Moving
This is the final product of motion tracking. Keep in mind that a larger or faster motion will require more editing in order to smooth out.
While automated motion tracking is a great tool, it will only be as good as the time and effort you put into your own motion tracking. Good motion tracking can sometimes mean tracking movement frame-by-frame. No matter what you’re tracking, you’re now equipped to motion track using Adobe’s After Effects, one of the best tools in the Creative Cloud.
What other After Effects tricks would you like to learn? Let us know in the comments below!
Image Credit: Teerasak Ladnongkhun via Shutterstock.com
Explore more about: Video Editor.