User Guide Cancel

Create 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. Transition effects
    12. The Rolling Shutter Repair effect
    13. Blur and Sharpen effects
    14. 3D Channel effects
    15. Utility effects
    16. Matte effects
    17. Noise and Grain effects
    18. Detail-preserving Upscale effect
    19. 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. Work in 3D Design Space
    13. 3D Transform Gizmos
    14. Do more with 3D animation
    15. Preview changes to 3D designs real time with the Mercury 3D engine
    16. 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
    3. Sync Settings in After Effects
    4. Creative Cloud Libraries in After Effects
    5. Plug-ins
    6. Cinema 4D and Cineware
  19. Collaboration:, and Team Projects
    1. Collaboration in Premiere Pro and After Effects
      1. Install and activate
      2. Use 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 can create shapes and masks with the Rectangle and Pen tool in After Effects. When you create a mask or shape layer, keep the following things in mind:

  • If a layer is selected in the Timeline panel, you are creating a mask.
  • If a layer is not selected in the Timeline panel, you are creating a shape layer. See Creating shapes in After Effects.

Shortcuts for the Shape tool is Q, and the Pen tool is G.

Create masks

You can create one or more masks for each layer in a composition using any of the following methods:


Draw a path using Shape or Pen tool. Drawing a mask path is similar to drawing a shape path.

See Create a shape or mask by dragging with shape tools and Create a Bezier shape or mask using the Pen tool.

Specify the dimensions of the mask path numerically in the Mask Shape dialog box.

See Create a rectangular or elliptical mask numerically.


Convert a shape path to a mask path by copying the shape’s path to the Mask Path property.


Trace color or alpha channel values to create a mask using the Auto-trace command.

See Create a mask from a channel with Auto-trace.


Convert a motion path to a mask path.

See Create a mask or shape from a motion path.


Paste a path copied from another layer or from Adobe Illustrator or Photoshop.

See Copy a path from Illustrator or Photoshop.

Convert a text layer to one or more editable masks on a solid-color layer by using the Create Masks From Text command.

See Create shapes or masks from text characters.

Use captured shapes to create motion graphics.

See Use captured shapes to create motion graphics.

Points to keep in mind

  • When you create masks on a layer, the mask names appear in the Timeline panel outline in the order in which you create the masks. To organize and keep track of your masks, rename them.
  • To rename a mask, select it and press Enter (Windows) or Return (macOS), or right-click (Windows) or control+click (macOS) the mask name and choose Rename.
  • When you create additional masks for one layer in the Layer panel, make sure that the Target menu in the Layer panel is set to None; otherwise, you replace the targeted mask instead of creating a mask. You can also lock a mask to prevent changes to it.
  • When creating or editing masks, look in the Info panel for information such as the mask name and the number of vertices in the mask.

To create a mask that you can move independently of the primary layer that it is masking, do the following:

  1. Create the mask on a separate white solid layer, and use that solid layer as a track matte for the primary layer.
  2. Use parenting to make the solid layer a child of the primary layer so that the mask moves with the primary layer as if applied directly. Because the solid layer is a child layer, it can also be animated independently of its parent.
  3. You can use motion tracking to make the solid layer (and, therefore, the mask) follow moving objects in the primary layer. See Convert a layer into a track matte and Parent and child layers.

Create a mask by dragging with shape tools

The shape tools are the Rectangle , Rounded Rectangle , Ellipse , Polygon , and Star tools.


To activate and cycle through the shape tools, press Q.

A polygon is a star without an Inner Radius or Inner Roundness property. So, the name of the shape created for a polygon or a star is the same: polystar.

You can create a mask by dragging with a shape tool on a selected layer in the Composition or Layer panel.


To draw a mask on a shape layer, select the Tool Creates Mask button in the Tools panel with a shape tool active.

Create a rectangular or elliptical mask numerically

create a rectangular of elliptical mask

  1. Select a layer in the Composition panel, or display a layer in the Layer panel.

  2. Choose Layer > Mask > New Mask. A new mask appears in the Composition or Layer panel with its handles at the outer edges of the frame.

  3. Choose Layer > Mask > Mask Shape.

  4. Select Reset To, choose Rectangle or Ellipse from the Shape menu, and specify the size and location of the bounding box for the mask.

Create a mask from channel values with Auto-trace

  1. You can convert the alpha, red, green, blue, or luminance channel of a layer to one or more masks by using the Auto-trace command.
  2. Auto-trace creates as many Bezier masks as necessary to outline the specified channel values in the layer.
  3. It also creates masks with the smallest number of vertices possible while conforming to the settings that you choose.
  4. You can modify a mask created with Auto-trace as you would any other mask, and you can link its path to other path types, such as shape paths on a shape layer, using expressions.

When you apply Auto-trace, affected layers are automatically set to Best Quality to ensure accurate results.


To reduce the number of masks created by Auto-trace, apply a keying effect to the layer to isolate your subject before applying Auto-trace.

  1. In the Timeline panel, do one of the following:

    • To create mask keyframes at a single frame, drag the current-time indicator to the desired frame.
    • To create mask keyframes across a range of frames, set a work area that spans that range.
  2. Select one or more layers and choose Layer > Auto-trace.

  3. Select one of the following:

    Current Frame

    Creates mask keyframes at only the current frame.

    Work Area

    Creates mask keyframes for frames within the work area.

    Once done, select from any of the following options:

Invert: It inverts the input layer before searching for edges.

Blur: It blurs the original image before generating the tracing result. Use it to reduce small artifacts and to smooth jagged edges. Deselect this to closely trace details in a high-contrast image.

Tolerance: How far, in pixels, the traced path is allowed to deviate from the contours of the channel.

Threshold: Specifies, as a percentage, the value that a pixel’s channel must have for that pixel to be part of an edge. Pixels with channel values over the threshold are mapped to white and are opaque; pixels with values under the threshold are mapped to black and are transparent.

Minimum Area: Specifies the smallest feature in the original image that is traced. For example, a value of 4 removes features smaller than 2 pixels wide by 2 pixels high from the tracing result.

Corner Roundness: Specifies the roundness of the mask curve at vertices. Enter a higher value for smoother curves.

Apply To New Layer: Applies the mask to a new solid the same size as the selected layer. It is automatically selected for layers that have Collapse Transformations enabled.

Preview: Select to preview the mask results and the results of the various options of the Auto-trace command.

Create a mask of the size of the layer

  1. Select the destination for the new mask:

    • To create a mask, select a layer in the Timeline, Layer, or Composition panel. To create a mask on a shape layer, select Tool Creates Mask in the Tools panel with a shape tool active.
    • To replace a mask path, select the mask in the Timeline, Layer, or Composition panel.
  2. In the Tools panel, double-click the Rectangle , Rounded Rectangle , Ellipse , Polygon , or Star tool.

Create masks from text characters

The Create Shapes From Text command extracts the outlines for each character, creates shapes from the outlines, and puts the shapes on a new shape layer. You can then use these shapes as you would any other shapes.

The Create Masks From Text command extracts the outlines for each character, creates masks from the outlines, and puts the masks on a new solid-color layer. You can then use these masks as you would any other masks.

create mask from text

  1. Select the text to convert to masks:
    • To create masks for all characters in a text layer, select the text layer in the Timeline or Composition panel.
    • To create masks for specific characters, select the characters in the Composition panel.
  2. Do one of the following:
    • Choose Layer > Create Masks From Text.
    • Right-click (Windows) or Control+click (macOS) the layer or text and choose Create Masks From Text from the context menu.

Points to note

  • The Video switch for the text layer is turned off.
  • The new solid-color layer is created at the top of the layer stacking order.
  • For characters that consist of compound paths—such as i and e—multiple masks are created and combined with the Subtract mask mode.

Create a mask from a motionpath

You can copy position keyframes, anchor point keyframes, or an effect control point’s position keyframes and paste those keyframes into a selected mask path or shape path. When you create mask paths or shape paths from motion paths, make sure that you copy keyframes from a single Position property only—do not copy the keyframes of any other property.


Draw a motion path with Motion Sketch and then paste the path into a mask path or shape path.


When copying between a mask path to a motion path, keep in mind that the mask path’s values are expressed in the coordinate system of the layer (layer space), whereas the motion path’s values are expressed in the coordinate system of the composition (composition space). This difference causes the pasted path to be offset, requiring you to reposition the path after pasting it. (See Coordinate systems: composition space and layer space.)

Create a mask path from a motion path

  1. In the Timeline panel, select the name of the Position property or Anchor Point property from which you want to copy the motion path. (This selects all keyframes. To select only some of the keyframes of a motion path, Shift+click them.)

  2. Choose Edit > Copy.

  3. To create a mask, select the layer on which to create the mask, and choose Layer > Mask > New Mask.

  4. In the Timeline panel, select the name of the Mask Path property for the mask into which to paste the keyframes from the motion path.

  5. Choose Edit > Paste.


Get help faster and easier

New user?