User Guide Cancel

Managing and animating shape paths and masks

  1. After Effects User Guide
  2. Beta releases
    1. Beta Program Overview
    2. After Effects Beta Home
  3. Getting started
    1. Get started with After Effects
    2. What's new in After Effects 
    3. Release Notes | After Effects
    4. After Effects system requirements
    5. Keyboard shortcuts in After Effects
    6. Supported File formats | After Effects
    7. Hardware recommendations
    8. After Effects for Apple silicon
    9. Planning and setup
  4. Workspaces
    1. General user interface items
    2. Get to know After Effects interface
    3. Workflows
    4. Workspaces, panels, and viewers
  5. Projects and compositions
    1. Projects
    2. Composition basics
    3. Precomposing, nesting, and pre-rendering
    4. View detailed performance information with the Composition Profiler
    5. CINEMA 4D Composition Renderer
  6. Importing footage
    1. Preparing and importing still images
    2. Importing from After Effects and Adobe Premiere Pro
    3. Importing and interpreting video and audio
    4. Preparing and importing 3D image files
    5. Importing and interpreting footage items
    6. Working with footage items
    7. Detect edit points using Scene Edit Detection
    8. XMP metadata
  7. Text and Graphics
    1. Text
      1. Formatting characters and the Character panel
      2. Text effects
      3. Creating and editing text layers
      4. Formatting paragraphs and the Paragraph panel
      5. Extruding text and shape layers
      6. Animating text
      7. Examples and resources for text animation
      8. Live Text Templates
    2. Motion Graphics
      1. Work with Motion Graphics templates in After Effects
      2. Use expressions to create drop-down lists in Motion Graphics templates
      3. Work with Essential Properties to create Motion Graphics templates
      4. Replace images and videos in Motion Graphics templates and Essential Properties
      5. Animate faster and easier using the Properties panel
  8. Drawing, Painting, and Paths
    1. Overview of shape layers, paths, and vector graphics
    2. Paint tools: Brush, Clone Stamp, and Eraser
    3. Taper shape strokes
    4. Shape attributes, paint operations, and path operations for shape layers
    5. Use Offset Paths shape effect to alter shapes
    6. Creating shapes
    7. Create masks
    8. Remove objects from your videos with the Content-Aware Fill panel
    9. Roto Brush and Refine Matte
  9. Layers, Markers, and Camera
    1. Selecting and arranging layers
    2. Blending modes and layer styles
    3. 3D layers
    4. Layer properties
    5. Creating layers
    6. Managing layers
    7. Layer markers and composition markers
    8. Cameras, lights, and points of interest
  10. Animation, Keyframes, Motion Tracking, and Keying
    1. Animation
      1. Animation basics
      2. Animating with Puppet tools
      3. Managing and animating shape paths and masks
      4. Animating Sketch and Capture shapes using After Effects
      5. Assorted animation tools
      6. Work with Data-driven animation
    2. Keyframe
      1. Keyframe interpolation
      2. Setting, selecting, and deleting keyframes
      3. Editing, moving, and copying keyframes
    3. Motion tracking
      1. Tracking and stabilizing motion
      2. Face Tracking
      3. Mask Tracking
      4. Mask Reference
      5. Speed
      6. Time-stretching and time-remapping
      7. Timecode and time display units
    4. Keying
      1. Keying
      2. Keying effects
  11. Transparency and Compositing
    1. Compositing and transparency overview and resources
    2. Alpha channels and masks
    3. Track Mattes and Traveling Mattes
  12. Adjusting color
    1. Color basics
    2. Color management
    3. Color Correction effects
    4. OpenColorIO and ACES color management
  13. Effects and Animation Presets
    1. Effects and animation presets overview
    2. Effect list
    3. Effect Manager
    4. Simulation effects
    5. Stylize effects
    6. Audio effects
    7. Distort effects
    8. Perspective effects
    9. Channel effects
    10. Generate effects
    11. Time effects
    12. Transition effects
    13. The Rolling Shutter Repair effect
    14. Blur and Sharpen effects
    15. 3D Channel effects
    16. Utility effects
    17. Matte effects
    18. Noise and Grain effects
    19. Detail-preserving Upscale effect
    20. Obsolete effects
  14. Expressions and Automation
    1. Expressions
      1. Expression basics
      2. Understanding the expression language
      3. Using expression controls
      4. Syntax differences between the JavaScript and Legacy ExtendScript expression engines
      5. Editing expressions
      6. Expression errors
      7. Using the Expressions editor
      8. Use expressions to edit and access text properties
      9. Expression language reference
      10. Expression examples
    2. Automation
      1. Automation
      2. Scripts
  15. Immersive video, VR, and 3D
    1. Construct VR environments in After Effects
    2. Apply immersive video effects
    3. Compositing tools for VR/360 videos
    4. Advanced 3D Renderer
    5. Import and add 3D models to your composition
    6. Import 3D models from Creative Cloud Libraries
    7. Image-Based Lighting
    8. Extract and animate lights and cameras from 3D models
    9. Tracking 3D camera movement
    10. Cast and accept shadows
    11. Embedded 3D model animations
    12. Shadow Catcher
    13. 3D depth data extraction
    14. Modify materials properties of a 3D layer
    15. Work in 3D Design Space
    16. 3D Transform Gizmos
    17. Do more with 3D animation
    18. Preview changes to 3D designs real time with the Mercury 3D engine
    19. Add responsive design to your graphics 
  16. Views and Previews
    1. Previewing
    2. Video preview with Mercury Transmit
    3. Modifying and using views
  17. Rendering and Exporting
    1. Basics of rendering and exporting
    2. H.264 Encoding in After Effects
    3. Export an After Effects project as an Adobe Premiere Pro project
    4. Converting movies
    5. Multi-frame rendering
    6. Automated rendering and network rendering
    7. Rendering and exporting still images and still-image sequences
    8. Using the GoPro CineForm codec in After Effects
  18. Working with other applications
    1. Dynamic Link and After Effects
    2. Working with After Effects and other applications
      1. Export After Effects project as Premiere Pro project
    3. Sync Settings in After Effects
    4. Creative Cloud Libraries in After Effects
    5. Plug-ins
    6. Cinema 4D and Cineware
  19. Collaboration: Frame.io, and Team Projects
    1. Collaboration in Premiere Pro and After Effects
    2. Frame.io
      1. Install and activate Frame.io
      2. Use Frame.io with Premiere Pro and After Effects
      3. Frequently asked questions
    3. Team Projects
      1. Get Started with Team Projects
      2. Create a Team Project
      3. Collaborate with Team Projects
  20. Memory, storage, performance
    1. Memory and storage
    2. How After Effects handles low memory issues while previewing    
    3. Improve performance
    4. Preferences
    5. GPU and GPU driver requirements for After Effects
  21. Knowledge Base
    1. Known issues
    2. Fixed issues
    3. Frequently asked questions
    4. After Effects and macOS Ventura
    5. How After Effects handles low memory issues while previewing

You animate mask paths and shape paths in much the same way that you animate other properties: set keyframes for the Mask Path or Path property, set paths at each keyframe, and After Effects will interpolate between these specified values.

Rotoscoping introduction and resources

Rotoscoping (commonly known as roto) is the drawing or painting on frames of a movie, using visual elements in the movie as a reference. A common kind of rotoscoping is tracing a path around an object in a movie and using that path as a mask to separate the object from its background. This allows you to work with the object and the background separately, so you can do things like apply different effects to the object than to its background or replace the background.

Note:

After Effects includes the Roto Brush and Refine Edge tools, which can be used to accomplish many of the same tasks as conventional rotoscoping, but in far less time. For information about using the Roto Brush tool, see Roto Brush, Refine Edge, and Refine Matte.

Note:

If a background or foreground object is a consistent, distinct color, you can use color keying instead of rotoscoping to remove the background or object. If the footage was shot with color keying in mind, color keying is much easier than rotoscoping. (See Keying introduction and workflow.)

Rotoscoping in After Effects is mostly a matter of drawing masks, animating the mask path, and then using these masks to define a matte. Many additional tasks and techniques make this job easier, such as using motion tracking on the object before you begin drawing masks, and then using the motion tracking data to make a mask or matte automatically follow the object.

Rotoscoping tips

  • Immediately after beginning to draw a mask, press Alt+Shift+M (Windows) or Option+Shift+M (Mac OS) to turn on keyframing for that mask and set a keyframe. This way, you won’t edit a mask frame-by-frame for several minutes (or longer) and then realize that you lost all of your work on previous frames because you forgot to click the stopwatch to make the mask path animated.
  • Draw your masks on a white solid layer with its Video (eyeball) switch off, above the (locked) footage layer. This way, you run no risk of accidentally moving the footage layer when you manipulate the mask, and you can also much more easily apply tracking data to the mask. (You apply the tracking data to the invisible solid layer that holds the mask.) This also means that you don't lose your cached preview frames each time you manipulate the mask. (See Toggle visibility or influence of a layer or property group and Lock or unlock a layer.)
  • Turn on the Preserve Constant Vertex Count preference. (See Designate the first vertex for a Bezier path.)
  • When possible, transform (rotate, scale, move) the whole mask or a subset of the mask vertices instead of moving the vertices individually. This is both for efficiency and to avoid the chatter that comes from inconsistent movement across frames. (See Move vertices in free-transform mode.)
  • Manual motion tracking is less time-consuming than manual rotoscoping. The more effort you spend getting good tracking data for various parts of your scene and object, the less time you'll spend drawing and fine-tuning masks. (See Tracking and stabilizing motion.)
  • Use the variable-width mask feather feature for more control when feathering objects.

View mask paths and shapes

  • To view mask paths for selected layers in the Timeline panel, press M.
  • To view selected masks or shapes in the Timeline panel, press SS (press the S key twice).
  • To view mask and shape paths in the Composition panel, click the Toggle Mask And Shape Path Visibility button at the bottom of the Composition panel.
  • To view mask paths in the Layer panel, choose Masks from the Layer panel View menu.
  • To hide a mask path while showing others, lock the mask by selecting its Lock switch in the Timeline panel, and then choose Layer > Mask > Hide Locked Masks.
  • To isolate selected masks and hide others, choose Layer > Mask > Lock Other Masks, and then choose Layer > Mask Hide Locked Masks.

Select shape paths, shapes, and shape groups

You can select shape layers and their components at any of four levels of selection, referred to as selection modes:

Layer selection mode

The entire shape layer is selected. Transformations apply to the transform properties for the layer, in the Transform property group that is at the same level as the Contents property group.

Group selection mode

An entire shape group is selected. Transformations apply to the transform properties for the group, in the Transform property group within the shape group in the Timeline panel.

Free-transform mode

Multiple vertices on one or more Bezier paths are selected. A free-transform bounding box is shown around the vertices in the Composition panel. By operating on this box, you can move multiple vertices with a single transformation. Transformations apply to the vertices themselves, which are contained within the Path property in the Timeline panel.

Path-editing mode

Only vertices are selected. In this mode, you can perform path-editing operations, such as adding vertices to a path and moving individual vertices.

Note:

When a pen tool is active, path-editing mode is active. To remain in path-editing mode, select the Pen tool; press V or Ctrl (Windows) or Command (Mac OS) to temporarily activate the Selection tool as needed.

Selection modes for shapes on shape layers

A. Layer selection B. Group selection C. Free-transform D. Path editing 

For information on selecting masks, see Select masks, segments, and vertices.

Note:

Press Ctrl+A (Windows) or Command+A (Mac OS) with a shape vertex selected to select all vertices on that path. Press again to select all shapes. Press again to select all layers.

Select a shape layer

  • Click the layer name or layer duration bar in the Timeline panel.
  • Using the Selection tool, click within the layer bounds in the Composition panel.
  • To deselect all shapes on a layer but leave the shape layer selected, click within the layer bounds but outside all shape paths.

Select a shape group in group selection mode

  • Using the Selection tool, double-click a member of the group in the Composition panel. Each time that you double-click, you descend another level in the group hierarchy.
  • To activate the Direct Selection tool , hold Ctrl (Windows) or Command (Mac OS) with the Selection tool selected. Click a shape in the Composition panel with the Direct Selection tool to directly select that shape’s group, regardless of how deeply nested the shape is in the group hierarchy.
  • To select a group that is contained within the same group as the group that is already selected, click the group to select.
  • To add a group to a selection, Shift-click it. You can combine the Shift key with double-clicking and with the Direct Selection tool to add more deeply nested groups to the selection.

Select paths and vertices in path-editing mode

Note:

To specify the size of Bezier direction handles and vertices for masks and shapes, choose Edit > Preferences > General (Windows) or After Effects > Preferences > General (Mac OS), and edit the Path Point Size value.

  • To select a vertex, click the vertex with the Selection tool. To add vertices to the selection, Shift-click them.
  • To select a path segment, click the segment with the Selection tool. To add segments to the selection, Shift-click them.
  • To select an entire path, Alt-click (Windows) or Option-click (Mac OS) a segment or vertex of the path with the Selection tool, or select any portion of the path and press Ctrl+A (Windows) or Command+A (Mac OS).
  • To select vertices by dragging, select a path or portion of a path to enter path-editing mode, and then drag with the marquee-selection tool to draw a marquee-selection box around the vertices to select. To add vertices to the selection, hold down the Shift key as you draw additional marquee-selection boxes.

Select all points on a path and enter free-transform mode

  • Double-click a path segment while in path-editing mode or in group selection mode for a single shape.
  • Select the Path property in the Timeline panel and press Ctrl+T (Windows) or Command+T (Mac OS).

Select masks, segments, and vertices

Unlike layers, masks can have more than one level of selection. You can select a mask as a whole path, which is appropriate when you want to move or resize a mask. However, if you want to change the path of a mask, select one or more points on it. Selected points appear solid, and unselected points appear hollow.

Note:

To specify the size of Bezier direction handles and vertices for masks and shapes, choose Edit > Preferences > General (Windows) or After Effects > Preferences > General (Mac OS), and edit the Path Point Size value.

Select or deselect masks in the Layer or Composition panel

  • To select a vertex on a mask, click the vertex with the Selection tool . To add vertices to the selection, Shift-click them.
  • To select a mask segment, click the segment with the Selection tool. To add segments to the selection, Shift-click them.
  • To select an entire mask, Alt-click (Windows) or Option-click (Mac OS) a segment, vertex, or handle of a mask with the Selection tool, or select any portion of the mask and choose Edit > Select All or press Ctrl+A (Windows) or Command+A (Mac OS). To add masks to the selection, Alt+Shift-click (Windows) or Option+Shift-click (Mac OS) them.
  • To select masks by dragging, select a mask or portion of a mask to enter mask editing mode and then drag with the Selection tool to draw a marquee-selection box completely around the vertices or masks that you want to select. To add masks or vertices to the selection, hold down the Shift key as you draw additional marquee-selection boxes.
  • To select all masks on a layer, select a mask on the layer, and choose Edit > Select All or press Ctrl+A (Windows) or Command+A (Mac OS).
  • To deselect all masks, press Ctrl+Shift+A (Windows) or Command+Shift+A (Mac OS).
  • To select an adjacent mask on a layer, press Alt+accent grave (`) (Windows) or Option+accent grave (`) (Mac OS) to select the next mask, or Shift+Alt+accent grave (`) (Windows) or Shift+Option+accent grave (`) (Mac OS) to select the previous mask.
  • To deselect a mask, click anywhere other than on the mask.
  • To remove a vertex or segment from a selection, Shift-click the vertex or segment.
Note:

To use the Selection tool when the Pen tool is selected, hold down Ctrl (Windows) or Command (Mac OS).

Select masks in the Timeline panel

  1. Click the right arrow next to a layer name to expand it.
  2. Click the right arrow next to the Masks heading to expand it, revealing all masks on that layer.
  3. Do any of the following:
    • To select one mask, click its name.
    • To select a contiguous range of masks, Shift-click the names of the first and last masks in the range.
    • To select discontiguous masks together, Ctrl-click (Windows) or Command-click (Mac OS) the names of any masks you want to include.
Note:

You can select only whole masks in the Timeline panel. To select individual vertices on a mask, use the Composition or Layer panel.

Lock or unlock masks

Locking a mask prevents you from selecting it in the Timeline, Composition, and Layer panels or setting it as a target in the Layer panel. Use this feature to avoid unwanted changes to the mask.

  1. In the Timeline panel, expand the Masks property group.
  2. In the A/V Features column, click the box underneath the Lock icon next to the mask you want to lock or unlock. A mask is locked and cannot be selected when its Lock switch is selected—that is, when the Lock icon appears in the box.
Note:

To unlock multiple masks at one time, select one or more layers and choose Layer > Mask > Unlock All Masks.

Note:

To isolate selected masks and hide others, choose Layer > Mask > Lock Other Masks, and then choose Layer > Mask Hide Locked Masks.

Move vertices in free-transform mode

You can scale and rotate an entire mask or shape path (or selected vertices in one or more paths) using the Free Transform Points command. When you use this command, a free-transform bounding box surrounds the selected vertices, and an anchor point appears in the center of the bounding box to mark the anchor point for the current transformation. You can scale and rotate the selected vertices by dragging the bounding box or its handles. You can also change the reference point from which the vertices are rotated or scaled by moving the bounding box anchor point. The free-transform bounding box handles and anchor point exist independently of the handles and anchor point for the layer.

Note:

When you animate rotation using Free Transform Points, the vertices of the mask are interpolated in a straight line from keyframe to keyframe. For this reason, the results may be different from what you expect.

  1. Display the layer containing the paths that you want to transform in the Composition or Layer panel.
  2. Using the Selection tool, do one of the following:
    • To transform any number of vertices, select the vertices that you want to transform and choose Layer > Mask And Shape Path > Free Transform Points.
    • To transform an entire mask or shape path, select it in the Timeline panel and choose Layer > Mask And Shape Path > Free Transform Points.
  3. To move the anchor point of the bounding box, place the Selection tool over the bounding box anchor point until the Selection tool changes to a move anchor point icon . Drag to position the anchor point.
  4. Do any combination of the following:
    • To move the path or selected vertices, position the pointer inside the bounding box and drag.
    • To scale the path or selected vertices, position the pointer on a bounding box handle and, when the pointer changes to a straight, double-sided arrow , drag to a new size. Hold down Shift as you drag to constrain the scale. Hold down Ctrl (Windows) or Command (Mac OS) as you drag to scale around the anchor point of the bounding box.
    • To rotate the path or selected vertices, position the pointer just outside the free-transform bounding box and, when the pointer changes to a curved double-sided arrow , drag to rotate.
  5. To exit free-transform mode, press Esc, Enter (Windows), or Return (Mac OS).

Convert a path between manual Bezier and RotoBezier

You can convert any manual Bezier mask path or manual Bezier shape path to a RotoBezier path. If the manual Bezier path has direction handles that have been adjusted, this conversion changes the shape of the path, because After Effects calculates the curvature of RotoBezier segments automatically.

The conversion of a RotoBezier path to a manual Bezier path does not change the shape of the path.

  1. Select a mask in the Layer, Composition, or Timeline panel, or select a shape path in the Composition or Timeline panel.
  2. Choose Layer > Mask And Shape Path > RotoBezier.

Modify a Bezier mask path or shape path

You can change a Bezier mask path using the Selection tool and pen tools in the Layer or Composition panel. You can change a Bezier shape path using the Selection tool and pen tools in the Composition panel.

The pen tools—Add Vertex, Delete Vertex, and Convert Vertex tools—are grouped with the Pen tool in the Tools panel. To reveal these tools in the Tools panel, click and hold the Pen tool in the Tools panel.

Note:

In most cases, the appropriate pen tool becomes active when you place the Pen tool pointer in a particular context. For example, the Delete Vertex tool becomes active when you place the Pen tool pointer over an existing vertex, and the Add Vertex tool becomes active when you place the Pen tool pointer over a path segment. To manually activate and cycle through these tools, press G.

When modifying a path, make sure that you click only existing vertices or segments; otherwise, you may create a new path instead.

Move, add, or delete a vertex

  1. Do one of the following:
    • To move a vertex, drag the vertex with the Selection tool .
    Note:

    To temporarily switch from the Pen tool to the Selection tool, press V or Ctrl (Windows) or Command (Mac OS).

    • To add a vertex to a mask, use the Add Vertex tool to click the segment between two existing vertices.
    • To delete a vertex from a mask, use the Delete Vertex tool to click the vertex.

Adjust a path segment

  1. Do one of the following with the Selection tool:
    • Drag a vertex.
    • Drag the direction handles extending from an adjoining smooth vertex.
    • Drag a curved segment.
    Note:

    Dragging a curved segment on a RotoBezier mask also moves the vertices.

Toggle a vertex between a smooth point and a corner point

  1. Click the vertex with the Convert Vertex tool  .
    Note:

    To activate the Convert Vertex tool when the Pen tool is selected, hold down Alt (Windows) or Option (Mac OS).

Adjust the tension of a RotoBezier mask

  1. If you want to adjust the tension of more than one vertex simultaneously, then select them.
  2. Using the Convert Vertex tool , drag a vertex.
    Note:

    To activate the Convert Vertex tool when the Pen tool is selected, hold down Alt (Windows) or Option (Mac OS).

    The Adjust Tension pointer appears as you drag a vertex of the RotoBezier mask.

    Clicking a vertex instead of dragging sets the vertex to a corner point (100% tension); clicking again sets the vertex to a smooth point (33% tension). Dragging up or to the right decreases the tension of the selection, increasing the curve of adjacent path segments; dragging down or to the left increases the tension of the selection, decreasing the curve of adjacent path segments.

    Note:

    To view the tension value of a vertex, look in the Info panel as you adjust the tension.

Change a mask path numerically

  1. Select the mask.
  2. In the Timeline panel, expand the Mask properties.
  3. Next to the Mask Path property, click the underlined word, and specify the changes in the Mask Shape dialog box.

Designate the first vertex for a Bezier path

To animate a path, After Effects designates the topmost vertex at the initial keyframe as the first vertex and numbers each successive vertex in ascending order from the first vertex. After Effects then assigns the same numbers to the corresponding vertices at all successive keyframes. After Effects interpolates the movement of each vertex from its initial position at one keyframe to the position of the correspondingly numbered vertex at the next keyframe. At any time during an animation, you can designate another vertex as the first vertex; this causes After Effects to renumber the vertices of the path. Renumbering vertices causes path animation to change, because After Effects then maps the new vertex numbers to the corresponding old vertex numbers still saved at successive keyframes.

When copying a closed path into a motion path, the vertex designated as the first vertex of the closed path is used as the beginning of the motion path. All motion paths are open paths.

Some shape path operations, such as Trim Paths, also use the first vertex as input to determine how to modify the path.

Note:

By default, when you add a vertex to a path, the new vertex appears on the path throughout the duration of the path but reshapes the path only at the time at which it was added. When you delete a vertex from a path at a specific point in time, the vertex is deleted from the path throughout the duration of the path. Prevent After Effects from adding and deleting vertices throughout the duration of the path by choosing Edit > Preferences > General (Windows) or After Effects > Preferences > General (Mac OS), and deselecting Preserve Constant Vertex Count When Editing Masks.

Note: Preserve Constant Vertex Count When Editing Masks is called "Preserve Constant Vertex and Feather Count when Editing Masks", in After Effects CC and CS6. Also, this setting only applies to the current editing session, not to already stored data

  1. Create an animated path.
  2. In the Timeline panel, move the current-time indicator to the point where you want to designate a new first vertex.
  3. Select the vertex to designate as the first vertex.
  4. Choose Layer > Mask And Shape Path > Set First Vertex.
    Note:

    The vertex designated as the first vertex appears slightly larger than the other vertices in the Composition panel.

Animate a mask path with Smart Mask Interpolation

Smart Mask Interpolation provides a high level of control for creating mask path keyframes and smooth, realistic animation. After you select the mask path keyframes to interpolate, Smart Mask Interpolation creates intermediate keyframes based on settings you provide. The Info panel displays the progress of the interpolation and the number of keyframes created.

  1. Choose Window > Mask Interpolation.
  2. Select at least two adjacent mask path keyframes.
  3. Set options in the Mask Interpolation panel, and then click Apply.
    Note:

    To interrupt the interpolation process, press Esc. The Info panel indicates that the process has been interrupted and reports the number of keyframes created.

    Keyframe Rate

    Specifies the number of keyframes that Smart Mask Interpolation creates per second between the selected keyframes. For example, a value of 10 creates a new keyframe every 1/10 of a second. Choose Auto to set the keyframe rate equal to the composition frame rate, which appears in parentheses. Create more keyframes for smoother animation; create fewer keyframes to reduce render time.

    Note:

    Regardless of the keyframe rate you choose, Smart Mask Interpolation always adds keyframes at the frame just after the first mask path keyframe and at the frame just before the second mask path keyframe. For example, if you interpolate between keyframes at 0 seconds and 1 second in a 30-fps composition with a keyframe rate of 10 keyframes per second, mask path keyframes are added at frame numbers 1, 3, 6, 9, 12, 15, 18, 21, 24, 27, and 29.

    Keyframe Fields

    Doubles the keyframe rate. When this option is selected, and Keyframe Rate is set to the composition frame rate, a keyframe is added at each video field. Select this option for animated masking for interlaced video. If this option is not selected, the mask may slip off the object that you are attempting to key out. For more information about fields in interlaced video, see Interlaced video and separating fields.

    Use Linear Vertex Paths

    Specifies that vertices in the first keyframe move along a straight path to their corresponding vertices in the second keyframe. Leave this option unselected if you want some vertices to interpolate along curved paths; for example, when the desired interpolation involves rotating parts. If this option is not selected, Smart Mask Interpolation creates a natural path for the mask.

    Bending Resistance

    Specifies how susceptible the interpolated mask path is to bending instead of stretching. A value of 0 specifies that, as the mask path animates, it bends more than it stretches; a value of 100 specifies that the mask path stretches more than it bends.

    Quality

    Specifies how strictly Smart Mask Interpolation matches vertices from one keyframe to another. A value of 0 specifies that a particular vertex in the first keyframe matches only the same-numbered vertex in the second keyframe. For example, the tenth vertex in the first keyframe must match the tenth vertex in the second keyframe. A value of 100 means that a vertex in the first keyframe can potentially match any vertex in the second keyframe. Higher values usually yield better interpolations; however, the higher the value, the longer the processing time.

    Add Mask Path Vertices

    Specifies that Smart Mask Interpolation adds vertices to facilitate quality interpolations. In general, Smart Mask Interpolation works best when the mask paths have dense sets of vertices. Also, a vertex on the first mask path cannot match the middle of a curve or straight-line segment on the second mask path, so sometimes you must add vertices before matching to produce the desired result. Smart Mask Interpolation does not modify the original keyframes. Only the new mask path keyframes computed by Smart Mask Interpolation have additional vertices.

    The value you set specifies how finely the input mask paths are subdivided. Pixels Between Vertices specifies the distance, in pixels, between vertices on the larger perimeter mask path after subdivision. Total Vertices specifies the number of vertices on the interpolated mask paths. Percentage Of Outline specifies that a vertex is added at each indicated percent of the mask path outline length. For example, a value of 5 means that a vertex is added at each successive segment of the outline that represents 5% of the total perimeter. To use only the vertices that were on the path at the first frame, do not select this option.

    Note:

    Smart Mask Interpolation may add vertices at existing vertex locations even if Add Mask Path Vertices is not selected. If two vertices on one mask path match a single vertex on the other, the single vertex is duplicated at the same location so that the segment between the two vertices shrinks to that location.

    Matching Method

    Specifies the algorithm that Smart Mask Interpolation uses to match vertices on one mask path to vertices on the other. Auto applies the matching algorithm for curves if either of the two selected keyframes has a curved segment; otherwise, it applies the polylines algorithm. Curve applies the algorithm for mask paths that have curved segments. Polyline applies the algorithm for mask paths that have only straight segments.

    Note:

    The mask path keyframes added by Smart Mask Interpolation are polylines when Polyline Matching Method is selected, regardless of whether the input mask paths contained curved segments.

    Use 1:1 Vertex Matches

    Specifies that Smart Mask Interpolation creates a vertex on one mask path that matches the same-numbered vertex on the other mask path. On each of the input mask paths, Smart Mask Interpolation matches the first vertices, the second vertices, the third vertices, and so forth. If the two paths have unequal numbers of vertices, this action may produce undesirable results.

    First Vertices Match

    Specifies that Smart Mask Interpolation matches the first vertices in the two mask path keyframes. If not selected, Smart Mask Interpolation searches for the best first-vertex match between the two input mask paths.

    Note:

    To ensure good results, make sure that the first vertices of the input mask paths match, and then select First Vertices Match.

Move a mask or pan a layer behind a mask

You can adjust the area that is visible through a mask by either moving the mask in the Layer or Composition panel or panning (moving) the layer behind the mask in the Composition panel. When you move a mask, the Position values of the masked layer remain constant, and the mask moves in relation to other objects in the Composition panel.

When you use the Pan Behind (Anchor Point) tool to pan a layer behind a mask, the position of the mask remains constant in the Composition panel but changes in the Layer panel. The Position values of the masked layer change in relation to the composition. As you pan past the edges of the layer frame, the Mask Path values on the layer also change. Using the Pan Behind (Anchor Point) tool saves steps; without it, you would have to change the Position and Mask Path properties of the masked layer manually. You can animate a layer panning behind another layer by setting keyframes for the Position and Mask Path properties of the masked layer.

When you use the Pan Behind (Anchor Point) tool in the Composition panel, After Effects automatically makes two adjustments. In the Layer panel, the mask is moved in relation to its layer (top), and in the Composition panel, the layer is moved in relation to the composition (bottom).

Move a mask

  1. Select the mask or masks you want to move.
  2. In the Composition panel, drag the mask or masks to a new location. To constrain the movement of the mask or masks to horizontal or vertical, hold down Shift after you start dragging.

Pan a layer behind its mask

  1. Select the Pan Behind (Anchor Point) tool in the Tools panel.

  2. Click inside the mask area in the Composition panel and drag the layer to a new position.

Face tracking and mask tracking

You can use the mask tracker to transform a mask so that it follows the motion of an object (or objects) in a movie. For more information, see Mask Tracking.

You can also use the mask tracker to accurately detect and track human faces. For more information, see Face Tracking.

Expression access to path points on masks, Bezier shapes, and brush strokes

You can use expressions to read and write the x and y coordinates of path points, or vertices for:

  • Layer masks
  • Bezier shapes   
  • Brush strokes on the Paint and Roto Brush & Refine Edge effects.

The expression methods are similar to accessing path vertices via scripting. The expression method is named points() instead of vertices() for familiarity.

Access expression methods

You can access the expression methods using the following steps:

  1. To create a solid layer, select Layer > Solid.

  2. Once you create a solid, create a mask. Click Shape tool, for example, a polygon, and create a mask over the solid layer.

  3. In the Timeline panel, twirl open the Mask properties and alt-click Mask Path.

  4. The expression field is displayed. In the Timeline panel, click the Expression language menu and choose Path Property.

    Expression language menu
    Expression language menu

  5. Select an expression method from the list of path point expression methods.

    To learn more about the expression methods, see Expression access to paths points on shapes, masks, and brush strokes (expression reference).

Listed below are example expression methods of the following path objects:

  • Layer mask paths: layer("Dark Gray Solid 1").mask("Mask 1").path or .maskPath
  • Bezier shape paths: layer("Shape Layer 1").content("Shape 1").content("Path 1").path
  • Paint effect stroke paths: layer("Dark Gray Solid 1").effect("Paint").stroke("Brush 1").path
  • Roto Brush & Refine Edge effect stroke paths: layer("Dark Gray Solid 1").effect("Roto Brush & Refine Edge").stroke("Foreground 1").path

Tips to work with these expression methods:

  • Point and tangent values are returned as an array of [x,y] number pair arrays for the coordinates of the vertices. Coordinate values are rounded to four decimal places.
  • Point and tangent arrays start with the first vertex on the path. You can change the first vertex of layer mask paths and Bezier shape paths using the Layer > Mask and Shape Path > Set First Vertex command.
  • Coordinates for layer mask path points are relative to the layer's origin in its upper-left hand corner.
  • Coordinates for Bezier shape path points are are relative to the anchor point of the path's shape group (ex., "Transform: Shape 1 > Anchor Point").
  • Coordinates for brush stroke path points are relative to the start of the stroke; the first point is [0,0].
  • The toComp() method, or other layer space transform methods, can be useful to convert coordinates from different layers into a common space or simply return the coordinates relative to the composition space.
  • Because Bezier shape paths are relative to the anchor point of their local shape group and not the layer, their values may be offset from where you expect them to be. To work around this, set all Transform properties in the shape group to zero. Keep in mind that converting a parametric shape to a Bezier shape may affect the shape group's position.
  • The createPath() method can be passed points, tangents, and isClosed methods of the same path or other paths. You can pass these methods unchanged to duplicate a path, or transform the point and tangent values before passing them to modify or animate the path.

Create Nulls from Paths panel

Create Nulls From Paths  scriptUI panel allows you to create intuitive animations driven by expressions, without manually writing expressions. You can directly link different paths to shapes, shapes to solids, etc. The Create Nulls From Paths panel uses expression access to path points to automatically link the nulls, so that you don't have to write the expression yourself.

The panel creates nulls for each path point on a mask path or Bezier shape path. You can use the following buttons in the panel to direct how the nulls perform:

  • Points Follow Nulls: The button creates nulls that control the position of path points. The path points are attached to nulls and you can animate the nulls to drive the path points.
  • Nulls Follow Points: The button creates nulls that are controlled by the position of path points. The nulls are attached to path points and you can animate the path points to move the nulls.
  • Trace Path: The button creates a single null that follows the path. The position of the null is linked to the coordinates of the path. The rotation of null auto-orients to follow the path. Trace Path controls the movement of the null along the path and whether it loops. By default, keyframes are set to trace the path in 1 second, and loop is enabled.

Work with the panel

  1. To open the panel, select Windows > Create Nulls From Paths.jsx.

  2. To add a shape mask, select Layer > New > Shape Layer. Add a shape mask to the layer.

    Note:

    The panel works with Bezier shapes, so all the parametric shapes such as rectangle, ellipse, and star, must be converted to a Bezier shape. To convert a parametric shape to Bezier shape, twirl open the shape layer and right-click the shape path for example, Rectangle 1, and select Convert To Bezier Path.

    Repeat step 2 to add more shapes.

  3. Every Bezier shape and mask has a path. In the Timeline panel, twirl open the layers to view the paths. If you want nulls to follow path points, select a path in the Timeline panel, and click Nulls Follow Points in the Create Nulls from Paths panel.

    The script generates a null for every point on the path. You can delete any nulls you don't need.

    Note:

    When you convert a parametric shape to a Bezier shape, After Effects adjusts the Position property of the shape. This causes an offset when the position of the nulls is calculated. To avoid the issue, set the value of the Transform property of a shape such as Transform: Ellipse 1 to zero before creating nulls.

  4. If you want the path points to follow nulls, select a path in the Timeline panel. And click Points Follow Nulls in the Create Nulls From Paths panel.

  5. Once you create nulls for all path points, you can attach them with each other to create animations. Nulls created with Points Follow Nulls button and nulls created with Nulls Follow Points have different colors. To attach nulls, select a null and hold down Shift as you use the pickwhip to select a parent layer and have the null's coordinates to jump to the parent layer.

    After you attach all the nulls together, preview your animation to see how it works.

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online