PDF (adobe.com)

Track or stabilize motion

Tracking motion and stabilizing motion are essentially the same process, only with a different target and result. Use Track Motion to track motion and apply the results to a different layer or effect control point. Use Stabilize Motion to track motion and apply the results to the tracked layer to compensate for that motion.

To stabilize a layer, After Effects tracks the motion of a feature in the layer that should be stationary in the frame, and then uses the tracking data to set keyframes to perform the opposite motion. You can stabilize to remove any combination of changes in position, rotation, and scale, while leaving desired motion unaffected. For example, if the camera is panning, deselect Position but select Scale and Rotation as the properties to stabilize.

When you select Rotation or Scale in the Tracker panel, you set two track points in the Layer panel. A line connects the attach points; an arrow points from the first attach point (the base) to the second. If possible, place the feature regions on opposite sides of the same object, or at least on objects that are the same distance from the camera. The farther apart the regions, the more accurate the calculations and the better the result.

After Effects calculates rotation by measuring the change of angle of the line between the attach points. When you apply the tracking data to the target, After Effects creates keyframes for the Rotation property.

After Effects calculates scale by comparing the distance between attach points on each frame with the distance between the attach points on the start frame. When you apply the tracking data to the target, After Effects creates keyframes for the Scale property.

When you track motion using either parallel or perspective corner pinning, After Effects applies keyframes for the Corner Pin effect to the layer to scale and skew the target layer as necessary to fit the four-sided area defined by the feature regions. The feature regions should lie in a single plane in the real world—for example, on the side of a bus, on the same wall, or on the floor. The attach points should also all lie in a single plane, but not necessarily the same plane as the feature regions.

Note: For parallel corner pinning only: To change which point is inactive, Alt-click (Windows) or Option-click (Mac OS) the feature region of the point to make inactive. (One point must remain inactive to keep the lines parallel.)
  1. Select the layer to track in the Timeline panel.
  2. Do one of the following:
    • Click Track Motion in the Tracker panel (or choose Animation > Track Motion), click Edit Target, and choose the target to apply the tracking data to.

    • Click Stabilize Motion in the Tracker panel (or choose Animation > Stabilize Motion). The target layer is the tracked (source) layer.

  3. Select Position, Rotation, and/or Scale to specify what kinds of keyframes to generate for the target.
  4. Move the current-time indicator to the frame from which to begin tracking.
  5. Using the Selection tool, adjust the feature region, search region, and attach point for each track point.
  6. In the Tracker panel, click either the Analyze Forward or Analyze Backward button to begin tracking.

    If the tracking ceases to be accurate, click the Stop button , correct the problem as described in Correct a motion track, and resume analysis.

  7. When you are satisfied with the position of the feature region and attach point throughout the track, click the Apply button to apply the motion to the specified target.

    After Effects creates keyframes for the target layer.

    When tracking position and applying this position data to a target, you can choose to apply only the x (horizontal) or y (vertical) component of motion. For example, you can apply the tracking data to the x axis to make a speech bubble (the motion target) remain at the top of the frame even when the actor (the motion source) moves downward.

    • X And Y (default) allows motion along both axes.

    • X Only restricts the motion target to horizontal movement.

    • Y Only restricts the motion target to vertical movement.

    To bypass the Motion Tracker Apply Options dialog box and use the previous setting, hold Alt (Windows) or Option (Mac OS) as you click Apply.
Note: You can change the order of steps 1-3 by first selecting the property to which to apply the tracking data (Scale, Position, or Rotation) and then choosing Animation > Track This Property. After Effects prompts you to choose the layer to use as a motion source.

When you stabilize a layer, the compensating motion may itself cause the layer to move too far in one direction, exposing the background in the composition or moving action out of the action-safe zone. You can correct this with a small change in scale for the layer. Find the frame where the problem is most severe, and then increase or decrease the scale of the layer until the problem is resolved. This technique adjusts the scale for the duration of the layer; you can also animate scale to correct this problem by zooming in and out at different times.

This post on the AE Enhancers forum describes and links to an animation preset from Donat van Bellinghen for scaling a set of Corner Pin effect points: www.adobe.com/go/learn_ae_donatscalecornerpin.

This post on the AE Enhancers forum describes and links to a script from Paul Tuersley that takes a stabilized layer, precomposes it, and then adds expressions that counter the stabilization: www.adobe.com/go/learn_ae_paulstabilizefortracking.

This post on the AE Enhancers forum describes and links to a script from Paul Tuersley that can make a difficult tracking job easier by averaging multiple sets of tracking data: www.adobe.com/go/learn_ae_paulaveragetracks.

Jeff Almasol provides a script on his website that creates a null layer with an expression that sets the Position property to be the average of the values of motion tracking track points for the selected layer: www.adobe.com/go/learn_ae_jefftrackaverage.