From the course: After Effects CC 2021 Essential Training: Editors and Post

Masks

Masks are a tool used to hide or reveal portions of our footage. After Effects has a few ways to create them onto your layer, and here we'll see what the tools offer us and how we can manipulate them. So here's the standard 2D Layer, and with my sunset layer selected, I can come up here to my mask creation tools, and you'll see I have these different shapes Rectangle, Rounded Rectangle, Ellipse, Polygon, and Star, and I can also create masks using the Pen Tool. Now, it's important to note that these very same tools will create shape layers if you have nothing selected in your timeline, and that's an important distinction because shape layers are something else entirely, which we'll cover in a later movie, but in order to create Masks, it's very important to have first, a layer selected. So, with that Sunset layer selected, let's come over here and take a look at our Rectangle Tool. Now as I click and drag inside my composition window, you'll see I can create a square, I can create a rectangle, I can go up here, there is a lot of different ways to do this and manipulate it on the Flyer as I'm creating it, and with the help of Modifier keys, you can actually constrain the proportions by holding down Shift, and this will make it a perfect square as you click and drag. If you hold down Shift and Command together, as you click and drag, the mask will be created from the center of the shape rather than the top left, so again, Shift and Command will create it from the center. So I'm going to to create this from the center, and I want to maneuver this around and reposition it, so let's switch over to our Selection Tool, let's double click, and we can come here in with our Transform Bounding Box enabled, we can click inside that box, maneuver it, we can rotate it, scale it up and down, can do whatever we like. So let's go ahead and select that layer again, we'll switch over to our Rounded Rectangle, and it's a little like the Rectangle Tool, except now we have rounded corners. and we still have the same modifier keys, but we also have two additional functions here. So using the Arrow keys on your keyboard, the Up and Down Arrows will alter the overall roundedness of this shape, so by hitting Up Arrow, we are increasing the roundedness by hitting the Down Arrow, we are creating more of a sharper corner. The Left Arrow will make it completely sharp whereas the Right Arrow will make it all the way rounded. So as I drag out here, I can hit the Right Arrow again and make it completely rounded until we get this pill shape thing. So let's go ahead and start it rounded here like this a little bit and we'll increase the roundedness just a tad. Alternately, you can also hold down the Spacebar before you let go with the mouse button, and what that's going to do is allow you to reposition your mask while you're still creating it inside our composition window. So let's go ahead and get that aligned nice and neat, and there we go, let's go ahead and switch over to the next tool, which is going to be our Ellipse tool. So we can make circles, we can make ellipses with this, this one is pretty straightforward, I'm going to hold down Shift and, get that into place we'll hold down Spacebar, and maneuver that kind of in the center. Okay, the next tool we have is the Polygon tool and this one is fun. Let's go ahead and click and drag and you'll see we have a three sided triangle, and with those same Arrow keys, we can increase the number of sides all the way up until it's rounded like a circle, or somewhere in between. So let's go ahead and keep it at three and with the left and Right Arrows, you'll notice that my edges are getting rounded out or being concave and more convex, so we have the ability to change up these shapes as we are creating them. So let's leave that at the triangle. We'll keep the Spacebar and position that there. And last on the list here, we have the Star tool. Let's go and click that and we can create a five pointed star. With the up and Down Arrows, we can increase the points decrease the points, and as we do, we can left and Right Arrow to increase the rounding of the star. And now we can get somewhere and more flowery shape or somewhere back into the sharp edged star shape. So we're not limited to just those shape primitives, we can certainly come in and with the pen tool, click and drag to create our own. So I'm just going to start clicking and dragging and create a zigzag of sorts, and these are all just hard corners here, so we can certainly alter those to be softer by using the Convert Vertex tool and if I click and drag that now I have Bezier handles, which I can then click and drag, and maneuver around much like in Photoshop or Illustrator. So another functionality about these masks, is that you can add and subtract them. Let's come over here to this second composition, and with my layer selected, I'm going to go ahead and create a straight circle, and from the center holding down Shift and Command again, I created one mask, and I'm going to duplicate that mask, and you'll notice over here we have Add Add, and so what this is doing is basically, taking everything that's outside of the mask and throwing it away we are not throwing it away just just temporarily discarding it, you can certainly this is all non destructive. You can certainly set this back to None and get back to your original image. But when we mask with add on, let's go ahead and take this first mask and see what that does, everything inside the circle or inside the mask is kept. If we wanted the inverse, we can certainly hit this inverted button and it'll do the same thing as if we were to use the subtract function. So, Add an Inverted essentially gets you the same effect as the Subtract. However, you can take more than one mask and use them together in conjunction with each other, so let's go ahead and move to our selection tool, and with our second mask selected, I'm going to double click and scale this down proportionally. So with that we get somewhere in there. And that first mask is revealing everything inside where now the second mask, I want to subtract, and take away everything that's inside of the second mask. So now we've essentially created this donut looking thing and that's all thanks to the use of two masks and these different modes here. Last thing I want to show you is the Pan Behind tool, and that's this icon over here, it actually serves a dual function, it also serves as the Anchor Point tool so if we click on it, and select our layer, you'll see that we have the bounding box, we have our anchor point here in the center, and if we were to take our Anchor Point, we can certainly move it aside and that's going to now scale from this point instead of the center, but the tool also has another function in that if we were to select our layer, and click and drag, notice now, our mask is staying in place, but we're basically moving the footage in the background behind there. So this sunset itself was being obscured it was cut out here, I'd really liked it to be on top so we can see the sunset and see the beach and all that jazz. So we can do that thanks to the Pan Behind tool and essentially reposition our image independent of our mask. Here this movie, we saw how After Effects offers flexible tools to create and manipulate masks to allow us the power to hide or reveal portions of our layers.

Contents