From the course: After Effects CC 2023 Essential Training

Shape layers vs. masks

- [Instructor] The shape tools found in After Effects are used to create both shape layers and masks. And here, this movie, we'll see how we can create one of each. Let's switch over to our O2 Creation Composition. Now, because After Effects can use the same tool to create either shape, layers or masks. How do we tell After Effects which to do? Well, it all depends on what you have selected. If you have a layer selected, using the shape tools will create a mask. If you have nothing selected, those same tools will create a shape layer. So let's see this in action. I'm going to select this painted circle, and come up over to my Shape Creation Tool. You can see I have, from this dropdown, several different shapes available to me. I'll select the Ellipse Tool, and in my composition window, I'll just click and drag. And automatically, After Effects is creating a mask for us, obscuring portions of the image and revealing others. I can hold down the Spacebar before I let go of the mask, and I can reposition this mask in it's place. I'll do something like this, and since this mask is yellow, it's a little hard to see. I'll tap on that swatch there, and get something a little bit more contrasty like a blue. When we twirl down the mask, we have options for feathering, which allow us to soften the edges. We can also expand the mask further beyond the path. Or if we get into negative numbers, we can contract it. All of these are animatable, of course. So that same tool can be also used to create a shape layer. Make sure that nothing is selected in your timeline here, and come back in and reselect that Ellipse Tool. Over here we have options for the fill and stroke of our layer. If we tap on the word Fill, this brings up the color options. We can select none, a solid color, linear gradient or radial gradient. In this case, I'm going to select the radial gradient, and we'll say, "OK." I don't need anything for my stroke. Even though it has the same options, I can hold down the Alt or Option key, and just tap on this swatch to cycle through the various modes until I get to none. Now, I'll just click and drag as before, and automatically, you can see After Effects creating a brand new shape layer. I'll hold down Shift to constrain my movements to a perfect circle, something like so. And now what I'll do is make sure that this button is enabled so that you can see the mask, and shape path visibility. And I'll twirl this down. Under my gradient fill, let's select the endpoint, and I'll come back over here to my Selection Tool, and just move this endpoint over here towards the edge and move the start point somewhere down here. Now we have the beginnings of a moon. I'm going to move this shape layer just over here a little bit. And with it selected still, I'll come in and tell it to make a mask. We'll select our Ellipse Tool, and now, you'll see that we have two more options available to us. On the left, we're telling After Effects to use this tool to create a shape. On the right, we're telling After Effects to create a mask. Let's select this. And just as before, we can click and drag to hide, or obscure portions of our image. And now, before I let go, I can also hold down the Spacebar to reposition this mask. I'm going to select over here in this area. And now that I've committed, let's come over to our mask itself. Let's twirl some of this up. We'll get our mask. And instead of Add, let's switch this to Subtract. And now you can see it has the inverted effect, and now we have the beginnings of a crescent moon. So lastly, we can also use the Pen Tool to create shape layers and masks in shapes that aren't available to us using the regular shape tools. Let's make sure that we have nothing selected here. And I'll come up over to my Pen Tool. And instead of a fill, I'm going to go for all strokes here. Maybe for the stroke, we'll go something a little bit darker, maybe a dark blue, somewhere in there. And for the stroke itself, maybe we make it a little bit smaller, like five. And now what I can do is just tap here and click here. And if I click and drag, you can see I get this arcing motion. And now, click anywhere inside the timeline to lock in our path. And here's our path. Let's rename this, we'll call this Moon. And for this, we'll call this Star Streak. So now, you can kind of see where I'm going with this. Let's deselect this and add in our star. We'll come over here to our Star Tool. Let's make sure that we have a fill enabled, let's disable this stroke. And maybe for the fill, let's go for lighter color like that. And let's just click and drag this here. And we get the beginnings of a shooting star. Maybe the star is over here. Eh, we can put it over here, that's cool. Let's rename this to Star. And for our Star Streak, we can go in and dial in for our shape layer, we have the ability to change up our stroke. So maybe it's thicker on one end, and it tapers off in another. So we'll change up the stroke width to be thicker overall. But then down here towards the bottom, we have Taper. And if we come over here to our end length, we can change up the tapering of our star to look something like that. And that's a quick look at how to create shape layers, and masks using the same tool. Just be mindful that if you have nothing selected in the composition when you are using these tools, you'll create a shape layer. If you have a layer selected, those same tools will create a mask.

Contents