From the course: After Effects CC 2023 Essential Training

Limiting effects with mask references - After Effects Tutorial

From the course: After Effects CC 2023 Essential Training

Start my 1-month free trial

Limiting effects with mask references

- [Instructor] Masks allow us to hide or reveal parts of a layer. Likewise, we can use masks to hide or reveal parts of an effect using a feature called mask referencing. Often this can save us from unnecessary duplication of layers to achieve the same results. In this O two composition here is an animation that we saw previously in the course where we took a building animating up out of the ground. But in order to create that, we ended up using masks to split off into own layers the building itself and the shadows. But here I've got a similar animation using only one layer. So let's see how to make that happen. I'll turn off my layer one and let's switch over to layer two. You can see I have a mask for the building and one for the shadow. I'll tour this up and for now I'm going to disable these. I'll set that to none. And with our layer two selected let's come up to effect, distort, transform. Now this transform effect is not to be confused with the layer transform, you can see I have my layer transform here. And with the transform effect we actually get a second set of transformation properties. I can rotate this, I can scale it down, I can skew it, which is kind of interesting we don't have that on a regular layer transform. And the great thing about this is that this is non-destructive. I can turn this off and we're back to our original layer. The layer transforms obviously don't actually get touched. So I'll reset the transform effect, turn it back on and turn up open the effect. And here we have something called compositing options. With this plus sign, we add in a mask reference that then tells the effect to look at a particular mask. In this case, we're using the building mask. Now I need to turn on the mask itself. So I'll turn this on to add and now watch what happens when I take my position of the transform effect. I'm able to move the building separately from the shadow because I have the transform effect limited to the confines of the mask. And that's a great feature 'cause previously we had to build this with two layers and now we can make it a little bit more efficient and build it in one. I'll come down here to frame 12 and set a key frame for our end position. And here at frame zero we'll set this into the ground. And let's rename this transform, Transform Building, just so that we don't get confused. I'll tour this up and duplicate it. And with this one we're going to name this transform shadow. If I double click on the effect itself you can see we have this added icon next to our effect. In fact, we also have this icon here next to the mask to tell us that this mask is being used as a reference for an effect. We can double click on this icon and that will take us directly to the mask reference in our timeline. So here, instead of building, I'm going to say shadow. And just like that everything disappears because we need to do one more thing. We need to turn this back on to add for our shadow. And because we duplicated this effect we have the same animation as the building itself which is something we don't want. So for my transform shadow, I'll select that first key frame and delete it. And somewhere in here, right when the building starts to come out of the ground, this is where we're going to animate a new position for our transform shadow. And here in this case, I'm going to come over to this icon here and that brings up some crosshairs which allows me to click anywhere inside the composition window to reposition my shadow. In fact, I can pick it up again and drag it and kind of dial this in to right about there. There we go. We have our two transformation effects affecting the same layer but in different sections. Thanks to the mask referencing. So as we saw here, we can use mask referencing to limit the results of an effect. And by building up the small building blocks we can increase the complexity all inside of one layer.

Contents