In the Timeline panel, expand the layer and select the mask you want to track.
Learn how to use rigid mask tracking to track and attach masks to moving objects in your footage.
The mask tracker moves a mask to follow the motion of an object in a movie. Masks are commonly used to hide parts of a clip, isolate areas for effects, or composite footage from different sequences.
Track a mask
Before you begin
Draw a mask around the object you want to follow. For best results, the object should keep the same shape throughout the clip. Its position, scale, and perspective can change.
To draw a mask, select the layer in the Timeline panel and do one of the following:
- Use shape tools for simple shapes and the Pen tool for irregular shapes.
- For exact sizes, go to Layer > Mask > New Mask and adjust in Mask Shape.
The Mask Tracker panel is only available on footage layers that support tracking, such as video clips and precompositions. If you select a mask on an Adjustment, Text, Solid, or Shape layer, the Mask Tracker panel will not appear, as these layer types do not contain trackable footage.
Expand the Masks properties and use the following Mask Path analyze controls:
|
Name |
Function |
|---|---|
|
Track selected masks backward 1 frame |
Move the mask tracking one single frame backward in time, giving you precise frame-by-frame control to manually check or correct the mask position going back. |
|
Track selected masks backward |
Continuously analyze and track the selected mask(s) from the current time indicator back to the beginning of the layer/comp, generating mask path keyframes in reverse. |
|
Track selected masks forward |
Continuously analyze and track the selected mask(s) from the current time indicator onward to the end of the layer/comp, automatically generating mask path keyframes. |
|
Track selected masks forward 1 frame |
Move the mask tracking one single frame forward in time, letting you step through the footage manually to inspect or fine-tune the mask position one frame at a time. |
When a mask is selected, the Tracker panel also switches to mask tracking mode and displays these controls. If the Tracker panel is not displayed, select a mask, then go to Animation > Track Mask to display it.
After Effects adds keyframes to the Mask Path property as it analyzes each frame.
Use the following tracking method options in the Method dropdown menu in the Tracker panel, or select the icon next to the selected mask's Mask Path property in the Timeline panel.
Position, Rotation, and Scale work well with fixed cameras. Use Perspective when the camera or object changes angle. Face Tracking tracks detailed facial features beyond the mask outline.
- Position: Tracks only the X/Y location of the mask. Best for subjects that move across the frame but don't change size, rotate, or distort — like a simple sliding object.
- Position & Rotation: Tracks movement plus any rotation of the subject. Good for things like a spinning logo or a head that turns, but stays roughly the same size in frame.
- Position, Scale & Rotation: The default and most commonly used method. Handles subjects that move, rotate, and change apparent size (For example, moving closer or farther from the camera).
- Position, Scale, Rotation & Skew: Adds skew tracking on top of the above, accounting for subjects that shear or tilt in perspective (For example, a flat surface tilting relative to the camera). Useful for slightly more complex motion without full perspective solving.
- Perspective: A planar tracker that solves full corner-pin transformations. Ideal for tracking flat surfaces like screens, signs, or walls.
- Face Tracking (Outline Only): Uses facial detection to track a face's general shape — good for applying a rough mask around someone's head without fine detail. Faster and less computationally heavy.
- Face Tracking (Detailed Features): Tracks individual facial landmarks (eyes, nose, mouth, jawline) for a much more precise mask that follows facial expressions and movement. Best for detailed face isolation or beauty work.
The Position, Position & Rotation, Position, Scale & Rotation, and Position, Scale, Rotation & Skew tracking methods use algorithms that are up to 5x faster and offer enhanced accuracy.
Scrub through the clip in the Timeline panel to check the result. If the mask drifts, move the playhead to the problematic frame, manually correct the mask shape, and rerun the tracker from that point.
The result of using the mask tracker can be seen in the application of keyframes for the Mask Path property; the mask shape matches the transformations tracked in the layer, depending on the type of method that is chosen.
Other considerations when using the mask tracker
- For effective tracking, the tracked object must maintain the same shape throughout the movie, though its Position, Scale, and Perspective can change.
- You can select multiple masks before beginning the tracking operation, and keyframes are then added to the Mask Path property for each selected mask.
- The Mask Tracker is available on footage layers that support tracking, such as video footage and precompositions. It is not available on Adjustment, Text, Solid, and Shape layers.
The mask tracking analysis searches for content within the mask. Use the Mask Expansion property to expand or contract the area of the mask.
Learn how to use the Track Mask effect and mask tracker in After Effects with these tutorials.
Create stunning 3D animations in After Effects
Animate characters and illustrations, add motion to text, and more.