Join Chris Meyer for an in-depth discussion in this video Understanding track matter rendering order, part of After Effects Apprentice: 05 Creating Transparency.
- [Narrator] Track Mattes require the combination of two layers to create the final composite image. They require the layer that contributes the transparency, and they require the layer that contributes the fill, the color seen inside that transparency, and you need to set the track matte pop up for that fill layer telling it to borrow the transparency from the layer above it. And here's the result, the virtual insanity movie filling the transparency of the night vision layer. Well what if you want to add an effect to this, say, a drop shadow? Who do you add it to? Hmm. I don't know, so let's try.
I'll try effect, perspective, and drop shadow, applied to the fill movie. Hmm. Nothing happened. Increase opacity, increase distance, still nothing. Well why is that? Well here's why. This Virtual Insanity layer is normally a full frame piece of video. When you apply a drop shadow to it, it's applying a shadow to that full frame video, but after the effect is applied, then the Track Matte is coming along and cutting out the alpha channel, or the transparency of that layer, so we never get to see the drop shadow.
It's beyond the area being cut out by our Track Matte. I mean, if I was to get a little crazy here, and drag virtual insanity up here, you'd start to see the drop shadow inside there. Cut back on the darkness and increase the softness. But that's not at all what we want. Alright, so that didn't work. Let's try the other solution. I'm going to delete drop shadow from my fill, and instead apply Effect, Drop Shadow. The Effect menu always remembers my most recently applied effect. To the matte.
Well I've got a shadow. I'll increase the distance here. But the shadow's not black. It's colored. Why is that? Well, think what's going on here. The Night Vision layer has an alpha channel to it. The drop shadow is being projected from the edges of that alpha channel to create the shadow effect. However, it's that combination, the layer Night Vision, and the shadow applied to that layer Night Vision, which is being used together as an alpha channel for Virtual Insanity.
So what I'm actually seeing in here is the Virtual Insanity movie being revealed by the drop shadow, 'cause the drop shadow has, in essence, changed the transparency of the Track Matte on top. It's an interesting look, but if you're trying to get a black drop shadow, then this isn't working at all. Okay, so we know what doesn't work. Let's see what really does work. Well there's a few different potential solutions. One solution is to not use an effect. Instead use a layer style. Layer styles are calculated at a different point in the rendering pipeline than effects are.
Namely, they're calculated after Track Mattes have been applied. So I'll select Virtual Insanity, the layer that has been matted and has gained a transparency from Night Vision, and apply Layer, Layer Style, Drop Shadow. Now I've got a drop shadow. And again, that's because layer styles are happening after the matte has been calculated. So that's one solution. Another solution's something you saw earlier, is to go ahead and use this composition as if it was one layer in a brand new comp.
So let's go ahead and just create a quick composition. I'm going to grab any old piece of footage here, like my Wildflowers layer. Drag it to the New Comp button. There's that. Look for my comp, 08 starter 2, up in my comps. Drag that out here. There is my title, now as one layer. The alpha channel has been calculated back in that previous composition. Now I can get away with applying a drop shadow to this composite, to this composition.
And now I will see my shadow normally. So that's good as well. Couldn't apply it back in the composition where I made this Track Matte pair. Had to do it later, after I was treating this Track Matte pair as if it was a brand new piece of footage all on its own. The third solution is, instead of applying a drop shadow here, you could create a drop shadow back in this other composition, which we call a pre-comp for short. You could use the Layer Styles, or you can go ahead and do Layer, New, Adjustment Layer.
Put it on top of everybody, and then apply the drop shadow to the adjustment layer. Once I do that, I see my drop shadow here, and I'll see my drop shadow later on when I use that as one layer in another composition. However, I couldn't apply my background movie in this comp, 'cause the drop shadow on the adjustment layer would only be applied to my background as well, which would kind of negate the whole idea. I need to get these two by themselves, then apply shadow to their composite, not to one of them individually.
And that's the main secret. You have to combine them, then effect them. Now, stencils have similar issues with orders of effects, and if you go ahead and watch the movies and the chapters on stencils, you'll see I've discussed this a little bit in those movies as well. The main thing is, you have to know the rendering order, when things are being calculated. Effects are being calculated before Track Mattes are applied, so you need to use Layer Styles, which are calculated after Track Mattes. Or you need to apply an effect after the Track Matte's already happened.
The After Effects Apprentice series was created by Trish and Chris Meyer. The tutorials are designed to be used independently and as a companion to their book After Effects Apprentice.
- Creating masks using parametric shapes or freeform with the Pen tool
- Editing and animating masks
- Combining multiple masks
- Using one layer to define the transparency of others
- Explaining the interaction between effects, masks, and mattes
- Mastering mask animation
Skill Level Beginner
Q: This course was updated on 11/15/2012. What changed?
A: We added a movie that shows our premium subscribers how to use the exercise files, We have also added new sets of exercise files designed for After Effects CS5.5 and After Effects CS6.