# after effects masking
Masking is used to control visibility of pixels on a layer. In After Effects you can create a mask using the Pen and other Vector drawing tools. Masks can be animated over time and so are a powerful tool to have. They are especially powerful when creating [[animated type]].
If you simply want to cut an object out of its background, then you will have more control using [[photoshop cutouts|Photoshop to make cutouts]].
Masks are one of the most powerful tools in your arsenal. There are many subtle nuances possible in how you apply them. This page will cover the basics. [This webpage and embedded video from School of Motion covers the basics in a deeper level extremely well.](https://www.schoolofmotion.com/blog/how-to-use-masks-in-after-effects)
## how to mask elements
Masking a Layer is a relatively simple process. Start with a layer with visible content (image, text, video, etc.).
![[Pasted image 20221103180439.png]]
Choose one of the Vector Tools from the main Toolbar.
![[Pasted image 20221103180603.png]]
Draw your shape in the main Comp. If you are using the Pen Tool, you will have to make sure to close the shape before it will function as a Mask. Notice that all of the pixels outside of the vector shape are now hidden. You can move the mask around and see how the mask controls visibility.
![[Pasted image 20221103181054.png]]
## adjusting the mask
You can use the Vertex Tools hidden in the Pen Tool drawer to modify the mask. Add, Delete, Convert points to tweak the shape. Mask Feather Tool will soften the hard edge into a blurred fade.
![[Pasted image 20221103181825.png]]
Once you have clicked off the Mask it is connected to the image. Moving or adjusting the mask or the image moves both together. To move or animate the mask shape separately, you need to choose the Move Tool and double-click directly on the path. Now you can adjust the mask path and it will leave the underlying image unaffected.
## change how the mask functions
In the Layers portion of the Timeline you can change the mask function.
- **Add** will show the content inside the mask shape
- **Subtract** will show the content outside the mask shape and hide it inside shape
You can use multiple shape paths together to build a more complex masks. Add and Subtract modes work as listed above. **Intersect** allows you to use only the area where multiple paths overlap. The other options are more of a specialty and can be ignored for now.
![[Pasted image 20221103182230.png]]
## animating the mask
Since the mask is a separate entity in the Timeline, you can animate several different options over time.
- **Mask Path**: the mask shape itself
- **Mask Feather**: how soft or hard the mask edge is
- **Mask Opacity**: transparency level of the mask, allows you to fade the layer in and out
- **Mask Expansion**: allows offsetting the edge of mask
![[Pasted image 20221103184741.png]]
---
Learn more…
- <https://www.shutterstock.com/blog/how-to-mask-in-after-effects>
- <https://www.educba.com/masking-layers-in-after-effects/>
- <https://www.beyondthesight.com/how-to-mask-in-after-effects/>
---
tags: #aftereffects #resources
home: [[! after effects]]