- In Adobe After Effects CC, select a layer, then choose a Shape tool.
- Click and drag over a portion of the comp to create a mask.
- Use the Selection tool to select the mask and reposition it.
- Click the Mask layer to adjust the path, feather, opacity and expansion values.
Use shape tools to make masks in After Effects CC
Learn how to use the shape tools to create masks that reveal, hide, or manipulate a specific area or portion of your composition.
You use masks to make parts of a layer visible and other parts transparent. There are two ways that you can make masks. You can use Shape tools to make masks or the Pen tool.
This project has one Comp, and the Comp has two still images inside it: this shot of the light-graphics, I call it, and also the shot of the tiffany-glass. We're going to use masks on the upper layer here, this light-graphics layer, and then we're going to reveal what's below it showing tiffany-glass while protecting some areas here that we're going to include inside the masks.
We're going to use the Shape tools to make those masks. The Shape tools are here, the Pen tools are next to them. They both can make masks. When you make a mask you need to make sure the layer is selected otherwise you'll create a new shape. Let me show you what happens if I don't have a layer selected.
Click on shapes, and notice all these things show up, the Fill and the Stroke. That means we're going to create a shape layer here like that. It'll be a separate shape layer like so. Well, we don't need that shape layer there. I'm going to go Control or Command C. The purpose here is to add a mask to an existing layer. So when I click on an existing layer, like this, these guys are going to go away as all we're doing is creating a shape with an outline, nothing inside it. No fill, no gradients, no strokes like that.
So now we're going to select the shape. Let's go get the Rounded Rectangle. And we're going to click here in a second. I just wanted you to know though in advance that when you click here in this layer with the Shape tool, this layer is going to disappear and that may be disconcerting at first, because what you're doing here is you're creating a mask, and only whatever is inside the mask will be visible on this layer.
So when you click the mask is just a point and so everything else is outside of the mask so that becomes transparent. But as we drag we create the mask and then stuff will show up inside there.
So I'm going to click here it. Away goes that layer. And I'm going to start dragging and things will appear here inside this mask. So only what's inside the mask will be visible on that top layer, the light-graphics layer. Everything else is transparent revealing the tiffany-glass behind it.
When you create a shape there's certain things you can do in terms of keyboard shortcuts. We'll go get the Ellipse tool for example. If I start clicking here that'll add another mask in the same layer. And if I hold down the spacebar then I can move it around. Hold down Control it'll center on wherever I started the process. If I use the spacebar by moving cell by cell then that will be the new center. Like that. Hold on the Shift key, that constrains it. So that'll be circular. If I were doing this with the rectangle it would be square. Those are the keyboard shortcuts that we used for shapes, and they also work when you're using the Shape tool to make a mask.
So now that I've got this guy I'll move around a little bit like that. And we've made this second mask. Like so. I let go of the mouse now. There you go. There's two different masks here.
Now that we've done this you might want to change where they reside. You might want to move them around or change their points, their vertices. And you can use the Pen tool to do that, but I find it more intuitive to use the Selection tool.
So I'm going to go get the Selection tool selected. Typically, when I make a mask, I immediately go back and get the Selection tool by pressing the keyboard shortcut V or just clicking on the Selection tool over there. Now that I've got that I want to show you something. With the layer selected, you'll notice you got little round dots here for the most part. Those little round dots indicate that you can change any one of these points. You could just change any one of the vertices individually.
If I click on a mask by itself, like that, then you get these big squares all filled in, like that. The squares mean that you're going to select the entire thing. If you grab an edge, like this or grab a corner, like this, you're going to move the entire thing around. So when you click on the word for that particular mask, Mask 1 or Mask 2, then these little squares appear. See? They came on there when I clicked on Mask 2. That means when you click on these guys you're going to move the entire mask around, not a point, like that. If you click on the inside nothing will happen. But if you double-click on one of these guys that'll put a bounding box around it. The bounding box behaves differently. It lets you move the whole thing around from clicking on the inside, like that. It also means that you can grab a corner and pull it up, like so, hold down the Shift key, that'll constrain the proportions to the original proportions, like that. And you can also rotate it.
Notice how you get the Rotation tools. You just hover around the outside of the bounding box. You can rotate it, like so. And these features are not available inside, let's say, the mask properties. You can't adjust these things this way inside the mask properties. The only way you can adjust these little points is to use this technique, where you create the bounding box and do something like that. Or you turn on the individual points.
I'm going to double-click now to turn that off. Just look up the square points there so it'll grab the whole thing like that. I'm going to just click on the layer name now, and go back to the little points that I can move around individually. Like so. It's good to know that you can move these around. So you can morph these masks if you want.
All right. Let's take a look at the properties for these masks. These masks have four properties. So I'll open up this top one here. This is Mask 1 here. That's four properties: Path, Feather Opacity and Expansion. It also has this drop-down list that tells how it's supposed to behave.
Now Add is default. If you do none then you won't see it at all, but just you'll see this little box around there. We'll go back to Add. But you can invert it. So if you invert it what's going to happen there? Well, when it's in this way, the mask is protecting this part of that layer and making the rest of it transparent.
If I invert it then it's going to make that area transparent, and protect the rest of the layer, and it sort of overrides this other shape as well. So that's what inverted means. I'll uncheck that, and go back to this sort of normal way of doing things.
The Mask Path as I mentioned you can morph this mask. If you keyframe it, we can morph from one to the other. Mask Feather is a nice feature, lets you soften the edges of this mask. And with these little yellow lines around it the softening doesn't look all that obvious. So if you want to turn off these yellow lines here, you click on this little switch here, the Toggle Mask and Shape Path Visibility switch. That'll turn off those guys. And now you really see how the mask is going to look.
So I'm going to feather this first one here. Like so. See how the edges get softer there as you feather it? Remember you can animate these guys. They're all keyframe-able. So if you want to make something, you know, soften up like that over time you can do that. Mask Opacity is kind of counterintuitive. Right now it's 100% opaque, meaning that it's protecting this thing at 100% opacity. This area here will be entirely opaque, because it's protected by the mask.
If I start dropping the opacity, what's going to happen is that it's going to make this part less visible. We'll make it transparent, and you see what's below it. So it does maybe seem a little counterintuitive. Here we're making that mask less obvious, and then showing what's below it, and the layer below it.
Mask Expansion is something you use frequently when you add Mask Feather, because sometimes when you put the feather on it, it looks like it's shrunk, looks like it's smaller. So you can expand it up if you want to, like so, or drop it down, like that.
Now sometimes some people want to adjust the mask over something inside the layer. As you make the mask you can't see it. I'm going to delete these two guys by clicking on one and pressing delete, and click on another and pressing delete.
I'm going to make a new mask. What I want to do is I want to highlight this little area right there. So I'm going to go get my Shape tool, get my Rounded Rectangle. I'm going to highlight that area, and I'm going to click right there. And now it's gone.
And so where is that darn area again? Then I got to get here press the Spacebar kind of move it around and that might be a way to do it. That's a way to highlight it. But another way to do this is to work inside the Layer panel.
So I'm going to Control or Command Z to undo that work there, and go to the Layer panel, double-click on this. You can also work with masks inside the Layer panel.
Notice that masks is here by default inside this drop down list. So if I click on a mask, I'm going to be able to work with it here. And I won't have to worry about this thing disappearing as I work with it.
I'll go get the Rectangle tool again, like that. Now I can draw here. And I can see exactly where it's going to go with the Spacebar down moving around that kind of stuff. This is happening, because this Render checkbox is unchecked. The default setting is that it's checked. And so if you have that checked, then you don't have the advantage of seeing what's going on when you make the mask. But if you want to see what's going on you make the mask, then you click this. The disadvantage of course is that as you make the mask you don't see how it relates to the layer below it.
If you want to do that, you need to see the Composition panel as you work with it. Sometimes you might want to pull the Composition out, like that, so you see them side-by-side as you work. So some people work in this way. They've got the Layer panel up in here, so they can see exactly where they're placing the mask. And they've got the Composition panel up and over here, so they can see how it's exactly working over the other layer. Just a way to work.
There's a couple of shortcuts I want to tell you about. If you want to be able to see any layer that has a mask in it you press the M key. So M makes it go away; and then M makes it come back. If you press M twice, then it shows all of the properties, like that.
So if any layers have masks inside them just press the M key, and you'll see those masks. And if you want to create a mask that fills the image then you can use a mouse shortcut to do that. Let me show you how to do that.
I'll go back to this Comp view, bringing it back inside here, like so, because I kind of like working in the Comp view for at least this demonstration purposes. I'm going to get rid of this mask by selecting and pressing delete. Now let's say I want to put an ellipse around this entire image. Just go click on the ellipse, like this, and make it active.
And if I double-click on this ellipse, it'll fill this as much as it can. Just double-click. And it masks now that as much as it can, kind of even going beyond the edges a little bit. So that's one way to fill the image, like that, if I have this mask selected. And get let's say the Star tool and double click on it, it's going to replace this mask. So just be aware if you use this double-click method and you've got a mask already selected inside of your layer.
When you double-click on the shape it's going to replace the existing mask. So I'll double-click on this star shape now. Let's just see what happens. There you go. And if the yellow lines don't seem to work for you, because, let's say, they're blending with other colors inside the image, you can change the color of this border. It doesn't have to be yellow. You can click on this little swatch there, and pick any color you want. So we want it to be blue or purple or something like that. There you go. You can make it that color as well. And if you have multiple masks in one layer, sometimes it's good to have different colors for each of those little borders.
So that's how I use the Shape tool to create masks.
* Nguồn: After Effects CC
Ý KIẾN THÀNH VIÊN