In this After Effects Fundamentals lesson, you'll learn how to use masks to control where a layer is visible. In other words, masks are a way to crop a layer. This lesson covers when masks can be useful, different ways to create them, and how to animate them.
Masks are created on the layer that you're cropping. If you want the mask to be a separate layer, what you want is called a matte. That's covered in the next lesson.
Jump to topic on this page:
Find in video:
0:37
2:22
4:05
5:00
First, make sure the layer you want to be masked is selected. Then, using either the Shape Tool or the Pen Tool, draw out your mask. The Shape or Pen Tool will have a mask icon next to it, before you start using it, to indicate you'll be making a mask on the selected layer.
When using the Pen Tool to create a mask, the mask will be applied when you close the shape. To close a shape, hover over the first vertex point so you see a small circle icon next to the Pen Tool cursor. Then click that vertex point to close the shape. More on using the Pen Tool here.
Once you create a mask, it should automatically toggle open the mask on the layer in the timeline.
To access the mask properties to adjust or animate a mask, toggle open the Mask on the layer, in the timeline. Or, the keyboard shortcut to revel Masks on a layer is M.
To adjust the individual points of on the path of your mask, first make sure the layer the mask is on is selected and that you're using the Selection Tool. Then, click the mask path in the Composition Viewer. Now you can click and drag individual points on the mask path or adjust their handles.
If you double click the mask path in the Composition Viewer, it will select the entire mask path so you can adjust the whole path. This way, you can scale or move the entire mask.
When you move the layer with the mask, the mask will move with the layer. If you want to keep the mask in place but adjust the positioning of layer that's being masked, use the Pan Behind Tool (the keyboard shortcut is Y).
Note: This just works for adjusting the positioning of the masked layer, not for animating it while keeping the mask in place. If that's what you're looking to do, you probably want to use a matte (covered in the next lesson).
To adjust or animate the Mask Path, see above.
If you click on "Shape" next to Mask Path, you can put in the exact pixel dimensions you want your mask to be. Or, you can easily switch from a circle to rectangle or vice versa.
Increasing the Mask Feather creates a soft, fading edge around the mask.
Does just what you'd expect–adjusts the transparency of the mask.
Increases (positive values) or decreases (negative values) the size of the mask. This can be a handy thing to animate to easily animate a layer appearing or disappearing.
When you create a mask, by default it will be set to "Add", but there are other types of masks you can choose from.
Use the Inverted checkbox to swap what's being masked out and what's visible:
Choosing the Subtract mask type from the dropdown menu has a similar effect when there's just one mask on the layer.
To utilize the other types of masks, you'll need more than one mask on the same layer. To create another mask on the same layer, make sure the layer is selected and create a mask with the Shape or Pen Tool.
Rename masks to stay organized by selecting the mask in the timeline, and pressing return/enter.
By changing the mask type on each layer, you can get different effects. Keep in mind, the layer order of masks matters. Here are some examples:
Subtract:
Intersect:
Difference:
In the next lesson, you'll learn all about mattes. If you've ever needed a mask, but on a separate layer (so that you could animate it independently of the masked layer), what you want is called a matte.