Unlimited AE and Premiere Pro templates, videos & more! Unlimited asset downloads! From $16.50/m

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

13.4 How to Mask in After Effects

In this lesson, you'll learn a bit more about how to mask in After Effects and how to crop in After Effects. Learn how to crop composition size, photos, and video layers inside of After Effects.

Related Links

1.Introduction
1 lesson, 00:49

1.1
Introduction
00:49

2.Getting Started
5 lessons, 42:55

2.1
What Is After Effects?
09:56

2.2
Main Panels
10:04

2.3
Settings
07:46

2.4
After Effects Tools
08:52

2.5
More AE Tools
06:17

3.Compositions and Layers
3 lessons, 26:35

3.1
After Effects Composition
08:53

3.2
Precomposing
08:10

3.3
After Effects Layer Properties
09:32

4.Keyframes
3 lessons, 25:21

4.1
After Effects Keyframe Basics
06:39

4.2
After Effects Keyframe Easing
10:37

4.3
Spatial Interpolation
08:05

5.Masks, Shape Layers, and Text
5 lessons, 45:36

5.1
Learn How to Mask in After Effects
08:42

5.2
After Effects Shape Layers: Part 1
09:24

5.3
After Effects Shape Layers: Part 2
10:05

5.4
Text in After Effects
07:16

5.5
Text Animation and More
10:09

6.2.5D
2 lessons, 13:42

6.1
What Is 2.5D?
08:37

6.2
More 2.5D
05:05

7.Motion Tracking
4 lessons, 34:04

7.1
Motion Tracking, Camera Tracking, and 3D Text
09:11

7.2
More Motion Tracking
06:15

7.3
Camera Tracking in After Effects
07:35

7.4
3D Text in After Effects
11:03

8.Mattes and Cool Effects
4 lessons, 43:43

8.1
Mattes
10:55

8.2
EFFECTS!
10:50

8.3
MORE EFFECTS!
11:19

8.4
Mind-Blowing Third-Party Effects
10:39

9.Build a Lower Third
2 lessons, 21:35

9.1
How to Make a Lower Third in After Effects
11:01

9.2
Final Touches on the Lower Third
10:34

10.Exporting
1 lesson, 09:11

10.1
Exporting From After Effects
09:11

11.Conclusion
1 lesson, 01:16

11.1
Conclusion
01:16

12.Bonus Lessons
4 lessons, 2:14:00

12.1
How to Make an After Effects Text Animation
29:19

12.2
How to Use After Effects Intro Templates
36:45

12.3
How to Create Handwriting Animation in After Effects
34:01

12.4
How to Create Brush Effects in After Effects
33:55

13.Frequently Asked Questions
8 lessons, 1:34:42

13.1
FAQ Introduction
00:55

13.2
How to Export Video From After Effects
12:26

13.3
How to Export Video From After Effects Using PreRendering
06:44

13.4
How to Mask in After Effects
15:25

13.5
How to Animate Text in After Effects
19:31

13.6
How to Make a GIF in After Effects
13:59

13.7
How to Duplicate Layer in After Effects
20:44

13.8
Conclusion
04:58


13.4 How to Mask in After Effects

In this lesson, you will learn a bit more about masks and cropping to see how you can crop composition size, photos and video layers inside of After Effects. So this idea of masks and cropping comes into play a lot in After Effects. And something as simple as just cropping in on a photo or a video layer can sometimes be a little bit confusing because there are multiple ways to do it. So I just wanna go through some practical examples of using masks and layer cropping and also changing the size of your composition, that can be pretty helpful for you in various ways. So let's say for example, we have a photo here and we want to crop in on it. Now hopefully just like you learned in the After Effects for beginners lesson on masks, we can do that with a mask pretty easily. With my layer selected, I can come up here to the rectangle tool, double-click on it and that will create a mask. Now with the mask selected, if I double click on that, that will bring up these transform handles and I can just use that to make my mask smaller. So let's say I just wanted kind of a narrow cropping on this skater photo here. I can adjust the mask to do that and it's pretty easy. Now what you may find is if you're gonna be kinda animating this layer around, moving the position of it is pretty simple. But if you want to scale this visually, by just grabbing one of these transform handles you'll find that that's difficult to do. Because every time you put your mouse over a transform handle, and try and scale the layer, you're gonna end up grabbing the mask. So one way you can avoid doing that, is to lock the mask, which you can do right down here, by clicking the lock right over here to the left of the mask. And now when you grab these transform handles you'll be able to scale this layer and animate it much easier than without this lock checked. So that's one idea of kinda cropping your layers. And that works with video layers, it works with shape layers. Pretty much that works with all layers is you can use a mask to kind of crop in on your layer. I'm just going to delete that mask and kind of reset things. Another way to think about this is, if you were gonna use a bunch of elements that you wanted kind of vertical cropping for. Another way to think about kind of cropping in on your photos is to just create kind of a pre-comp. So for this example, this would be Skater Mask and then just set your composition to the size that you're ultimately going to use. So if I wanted a narrow cropping on this I could jump into the composition settings by going to the menu, > Composition and Composition > Settings or using the keyboard shortcut Ctrl+K. And I can just change the width of the comp and I can pull that way down to something like that and then hit OK. Alternatively, you can grab this region of interest tool down here, and then you can just draw a box and often this is a lot quicker to do and get this to be just about the right size. And then I can come up here to Composition and choose Crop Comp to Region of Interest. And that will make my comp the size of that region of Interest box that I just drew. And now If I wanted to duplicate this and slot in another skater photo, I can just find wherever I put this reveal composition in project. Okay, there we go. If I duplicate this, and I double click on this skater mask too, I can take this photo, Delete it and then drop in another photo. And then to get the same exact kind of framing, all I have to do is move and scale the photo. I don't have to worry about a mask, and messing with the position and the scale. All I have to do is just kind of move my guy in the bounds of this composition here. So if you're doing a composition where you needed a bunch of elements that were about the same size for some kind of visual layout, this is another way that you can do it. It's a lot easier than working with photos that are a different size and then adjusting the masks to be all the same size. Let's look at another example here. So this is a really simple example of a composition or I have a photo here. It animates over to basically half of the composition and I have some graphics right here. Maybe move those over a little bit. I don't like really opening, position. Really, really simple. And how this works is I have a photo layer here. I have a couple of position keyframes, a couple of scale keyframes. And I have a mask on this layer. And the mask is animating along with my position in scale keyframes, so that if I bring up the title safe area by hitting the apostrophe key. It lines up at half of the composition here, okay? So let's say I was doing something or I needed to make a bunch of these, and this is the general layout I wanted to do a whole bunch of photos. Well, if I was going to do a whole bunch of photos, doing it this way would not be the most efficient way, and I'll show you why. If I duplicate my skater one here, And I double-click to Open, and let's say now I have a new guy wanna give them a new title, but let's just work on replacing the photo here. So I'll take that other photo of the skater and I will Alt+Replace so with my photo of my bearded skater guy here selected. I'll grab my new photo and hold Alt and then release the mouse button. You can see my keyframes are still the same, but my positioning is is all wrong. It doesn't start in the right location, it doesn't end in the right location. Everything has to be adjusted here. So to fix this, I would have to kinda reposition this. I'm just gonna fit to 100%, reposition this. Let's see something like that, make sure that this mask is in the right spot. Okay, let's see, yeah, something like that and move this over here. Okay, well the position isn't quite right. I want him kinda more here and then maybe adjust the mask. Positions still not right. Maybe I wanna bring him down a little bit and make sure that the mask is, yeah okay. You see that's too many steps. There's a faster way to do this and think about this. That works but I'm gonna show you a slightly faster way. So I'm gonna delete this here. And I'm gonna set up a new composition. And I'm just gonna call this Photo_01. I'll set the width to 1920. So I'm gonna do 1920 by 1080. That all looks great 10 seconds long. Perfect, click OK. I'm gonna bring in the photo of my bearded skater guy, but I hit Ctrl+Alt+Shift+H to set the width of the photo to my comp. And actually I'm a scale that up a little bit so I can center my guy here. And in fact, the easiest thing to do sometimes when you're moving people and you want to kind of center their faces to just move the anchor point right in the middle of their forehead. And then move the anchor point right in the middle of the comp and then just scale it up from there by holding Shift you constrain the proportions. And that way it keeps the anchor point dead center and it scales around the right location. Just kind of a really quick way to do that. So just like before, I'm gonna have this hang out here for a couple of seconds, maybe at two seconds. I'm going to scale this and move this, so I'll drop a position in a scale keyframe on there and then go maybe one second. So Shift PgDon, PgDn, PgDn. And then I'll move him over to about here and maybe scale him down a little bit. Make sure that he is filling up the frame. Cool, something like that. Now to do the actual cropping, I'm gonna create a solid Ctrl+Y. And I don't really care what color it is, but I'll rename this once it's in my comp, to Mat. And what I'm gonna do, is I'm gonna to use this solid as a track map. So I'm gonna set my photo here to Alpha Mat. I'm gonna go to these key frames right here, and then I'm going to keyframe the position of this layer, Shift+Alt+P. And then when it gets over here, I'm just going to slide that over and basically make the exposition zero. And that's gonna essentially do the same thing as that mask. But the cool thing is setting it up this way achieves the same crop but it's going to be easier to adjust. Because now if I want to adjust the position of my skater guy in this kind of cropping here that I have. I don't have to worry about how it's actually cropped because that's being controlled by this other layer here. So, if this were a mask when I moved the position, I would also have to move the mask as well because the mask is going to move with the layer. But setting it up like this kind of, unlinks those to work and have the crop being handled by this track mat here, which I've labeled Mat, and the position and scale of the layer just being controlled down here in the layer. It's a really simple way to do the same thing. And it's just another way to think about the idea of cropping. But in this particular case, I'm not using a mask. So really quick finish this up, I'm gonna hit F9 on the keyboard. I'm gonna jump into the graph editor, maybe grab these key frames right here, drag those out. And just make a little bit have a curve there. So we have something that looks like that. Pretty cool. So now what I wanna do is add a new photo. So I'm gonna select my photo one comp, duplicate it, double-click to open. I'm gonna select my photo here and Alt+Replace. So hold Alt and then release the mouse button. And the only thing that I have to change now, is just the scale and position of my photo. Because again, like I said before, the cropping is going to stay exactly the same. So I'm gonna get this position and scaled properly where I want it. Something like that. And then make sure that I am scaled properly over here and positioned right where I want it to be. Something like that. There really wasn't much of a scale there. So probably I would scale this up and move it down like that. Really, really simple to do. So if you were doing a lot of these graphics, this would be the way to do it. Using a mask would be really inefficient because like I said before, every time you move this layer, you'd have to readjust that mask because the mask will be moving with the layer. Now let's take a look at another comp here because there are a few things about masks that I didn't mention in the original lesson in the After Effects For Beginners course. So in this comp, I just have a text layer here. And if I grab the pen tool and I just draw a mask, I'm gonna create a mask around this kind of an interesting shape here. Okay, it's not that interesting, but that's okay. And i think i mentioned about feathering in the original course, but we have a feathering option underneath the mask here. And we can feather in the vertical. We can feather in the vertical or y axis, or we can feather only in the x axis which is horizontal. But another way that you can feather your mask is you can grab the mask feathering tool, which is this little feather tool here. And if you click on your mask and pull in or click on your mask and pull out what you'll get is much more finite control over your mask. So what I've just created is a kind of an inside feather and an outside feather. But you can see if I hover the tool over that dotted line, I can add more points in. So I can create some areas. Where there is no feathering and other areas where there is more feathering. And so you can create much more intricate kind of feathering of your masks to create some interesting looks or to help you to be able to cut out something a lot easier than using just one mask and a general feather. Because sometimes that doesn't work at all. Sometimes you need to feather out just a portion of the image and you can do that like this, And then you need another part of the image when I hit G to switch back to the pen tool, to have less feathering. So it's kind of an interesting way to think about using a mask. And this will come into play when you are cutting out a photo maybe inside of After Effects. And you can do kind of a similar thing that you can do inside of Photoshop using masks and brushes. But I think this way is in some aspects a little bit easier to apply feathering because unlike a brush in Photoshop, you can just move everything around and everything here can be animated. So you can take your mask and all of its feathering. And you can animate, oops, and you can animate everything. So you can have this feathering animate here, and you can take the mask points and have those animate And I'm just pressing G on the keyboard, To switch between the pen tool and the feathering tool, so check this out. All of that control you get with just one mask. Now a lot of that stuff, you can kind of do, using two masks, or multiple masks with different feathering. So, you could use an Add Mask and then use a Subtract Mask with a lot of feathering to do a similar thing. But this is just a really easy way to do kind of complex masks with just one mask, which a lot of times is gonna be easier to keep track of. That about wraps it up for this lesson on masks and cropping, make sure to check out the next lesson on animating text. [MUSIC]

Back to the top