Learn How to Use Masks in After Effects

After Effects April 2, 2020 6 min read

In Adobe After Effects, masks are one of the tools you will likely use the most. They either hide or reveal elements of a layer, and can be used in conjunction with animation to create fun, stylish wipes. They’re an incredibly versatile tool but can be a little confusing to get your head around at first. That’s why we put together this After Effects masks tutorial, so read on, boot up After Effects, and you’ll be an expert in no time.

Part 1: What is a Mask?

A mask is an invisible shape that tells After Effects to only pay attention to a specific section of your composition. You can use it to hide or reveal part of a layer or object. Regular masks are attached to and exist within the layer they are affecting, while Shape Layers exist as separate objects which can work in a similar way to masks.

Masks are very versatile tools but generally can be used for hiding and revealing text, or cropping out a frame. Animations can begin with a mask over an object, such as text, and then slide out to reveal the object. Alternatively, they can remain static on the frame to crop out any unwanted elements.

Part 2: How to Create and Manage Masks 

So how exactly do you create masks in Adobe After Effects? Well, after reading this section you’ll be using masks like a pro.

There are two ways you can do this. The first, Reveal Masking.

Step 1: Select the layer you’d like to mask.

Step 2: Hit the Q button to bring up the rectangle shape tool.

Step 3: Click and drag on the frame to draw a mask around the object you’d like to reveal. This will hide everything else in the frame that isn’t beneath the mask.

The second way of using masks in After Effects is using the pen tool to create a custom shape mask.

Step 1: Select the pen tool or hit G on the keyboard.

Step 2: Click different points around the frame to draw a custom shape. Try outlining an object that you’d like to remove from the frame if the shot is static.

Step 3: To do this, create the mask then go to Time > Freeze Frame. Anything that isn’t masked will play as usual, but the mask will freeze in time, letting you be creative with making things disappear.

Additional Tip: How to work with Multiple Masks

It’s unlikely you will create a composition that uses just one mask. Often your projects will require having multiple masks across multiple layers. They can get confusing to keep track of, but there’s a handy tool in After Effects to help with this.

By default, After Effects uses yellow for all masks, but to separate them to make it easier to work with you can tell After Effects to cycle through mask colors for new masks. To do this:

Step 1: Go to Edit > Preferences > Appearance.

Step 2: Select Cycle Mask Colors.

Whenever you create a new mask the color will change, helping you keep track.

If you don’t want to make any more changes to a mask, you can lock the layer to prevent anything from accidentally affecting it.

On the left of a layer, you can toggle the Padlock icon to fix the layer in one position and prevent any further changes. To be doubly sure, you can hide this by going to Layer > Mask > Hide Locked Masks which will disappear from the project view entirely. Just to be safe!

For more information on masks, check out our video tutorial on How to Add Masks and Basic Shapes in After Effects.

When you create a mask within a layer you can amend the mask mode to one of seven options, all of which do different things. Beside the name of the mask, click the dropdown. By default, it should be set to Add.

Add – Select Add for the most commonly used and default mask mode. It simply creates a mask, and if you lay multiple masks together it will sit one on top of the other.

None – This deactivates the mask.

Subtract – This mask mode shows the difference between a mask and anything beneath it, negating the one beneath it but unaffecting the mask above it.

Intersect – If you have more than one masks that overlap, the Intersect mask mode will reveal only the sections of the masks which overlap.

Difference – Difference is basically the opposite of Intersect. Selecting the Difference mask mode will reveal all of the mask, except for the section which is overlapping another mask.

Lighten – When two masks that have less than 100% opacity overlap, the color of the intersection will be darker than the opacity of the rest of the masks. Selecting Lighten will make the opacity even across the masks.

Darken – Darken works the opposite way of Lighten, increasing the opacity of two masks that are intersecting.

Part 3: How to Add Animation and Movement

Masks don’t just have to be stationary objects that cover up or reveal individual things in a frame. You can animate them just like other assets in After Effects to create cool, seamless transitions and reveals. To animate a mask:

Step 1: Select the mask you want to animate within the layer it is sitting in.

Step 2: Collapse the drop-down and click the stopwatch beside Mask Path. This will create a keyframe and set the mask’s first position.

Step 3: Move the playhead forward in time.

Step 4: Adjust the mask to its final position.

Step 5: Click the stopwatch again. The mask will then move from the starting position to the final position in the time you have moved the playhead to.

You can continue to add keyframes throughout the mask path to slow it down, speed it up, smooth out the animation and generally move the mask in different ways. Simply move the playhead to when you want the particular stage of animation to finish by, adjust the mask position or size, and hit the stopwatch again to create a keyframe.

Masks make up some of the fundamentals of After Effects, and mastering them will set you on the way to creating great motion graphics very quickly. Once you’ve got to grips with the different ways of creating a mask, create several within one composition and change the mask modes to affect how the masks interact with each other. Finally, use keyframes in the Mask Path tool to animate your masks, creating slick and seamless transitions.