How to Mask in After Effects

November 9, 2020

In this quick beginner’s guide to masks in Adobe After Effects, we’ll demonstrate the fundamentals you need to create your own project, start to finish. Let’s get to it.

Contents:

  1. Setting Up
  2. Editing Paths
  3. Putting It Together
  4. In Review

1. Setting Up

Adding masks

There are two ways to add masks in After Effects. The first is using the shape tool (shortcut key: Q)

Step 1: Select the layer you want to create a mask on.

Step 2: Click the shape tool in the toolbar or press the shortcut key Q. Press Q again to change your shape selection; the default is Rectangle. 

Step 3: Over your layer, click and drag over your desired area to create a mask. 

Mask modes

Your current mask is by default in ADD mode. It looks like a cut out of the layer, with only what’s inside the mask being shown. Different modes will display your mask differently. To change the mode, press the shortcut key M to access the mask properties (by default, this will appear in the bottom left window). Let’s explore the options.

NONE mode: The layer will be unaffected as the mask is retained itself. 

SUBTRACT mode: The inverse of ADD mode, where everything inside the mask is removed while the outside part of the layer is visible.  

 The other modes, like DARKEN and INTERSECT, require the use of multiple masks.

Layering masks

Layering your masks is powerful for creating versatile shapes. For example, you can place a SUBTRACT mask underneath an ADD mask as shown in the image below. 

Putting an INTERSECT mask after another mask will only show the area of intersection in the layer.

Putting a DIFFERENCE mask after another mask will only show the area outside of where both masks overlap, the exact opposite of INVERSE.

The LIGHTEN and DARKEN modes depend on the OPACITY of masks above.   Put simply, a mask’s LIGHTEN mode shows the highest opacity values within the masks it intersects. This also includes the pixels within itself. A mask’s DARKEN mode only shows the lowest opacity values within the masks it intersects. The distinction is that DARKEN only cares about the opacity within the intersecting spaces, not the lonely parts like LIGHTEN does. 

Open the drop-down menu of a mask in the mask properties window to view and change opacity.

Use shortcut keys to immediately apply modes when drawing masks. To do this, press the key before you click and draw a mask.

Shortcut keys for modes:

  • NONE – N
  • ADD – A
  • SUBTRACT – S
  • INTERSECT – I
  • LIGHTEN – L
  • DARKEN – D
  • DIFFERENCE – F

You can customize your mask further with other mask properties.

For example, increasing the FEATHER value of each mask feathers the pixels on the path itself, creating a blurry outline effect. Increasing or decreasing EXPANSION value expands or shrinks the visible area of the layer in your mask. 

2. Editing Paths

Resize

Step 1: Select either the selection tool or pen tool and double click on your mask to select the entire thing.

Step 2: Resize the mask by dragging the corners to your desired position.

Rotate

Step 1: Hover your cursor to the side of the mask. The pointer will switch into a curved arrow.

Step 2: Click and drag to rotate to your desired angle. 

Change existing shape

Click and drag any vertex of an existing mask to move that point and change the PATH of the entire mask.

Create custom shape

You can create more complex shapes by using the pen tool to draw a mask, instead of the shape tool. This can be useful if the contents of your layer do not go well with simple shapes.

Step 1: Select the pen tool from the toolbar, or press the shortcut key G. 

Step 2: On your layer, click to create vertices wherever you want, as they will automatically connect in a path as you go. the pen tool for every vertex you add to the mask’s path. To close the path, click on the first point you made.

You can also use the pen tool to add a vertex to an existing path.

Every technique we can use for the shape masking tools also applies here. The pen tool simply allows for more control over the mask path.

3. Putting it Together

We’ve put together a short video demo for you, which uses everything we just covered to create an animated vending machine graphic.

4. In Review

We’ve covered all the basics you need to start using masks in After Effects to create the compositions you want. Stay tuned for more upcoming beginners’ guides for Adobe applications and more. Subscribe to Queue’s blog for more.

 

Leave a Reply

Your email address will not be published. Required fields are marked *