After Effects Sidebars: Learn Track Matte Rendering Order

show more Understanding track matte rendering order provides you with in-depth training on Video. Taught by Chris Meyer and Trish Meyer as part of the After Effects Apprentice 05: Creating Transparency show less
please wait ...

Understanding track matte rendering order

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 popup 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 Vosion 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. Why is that? Well here is why. This Virtual Insanity layer is normally a full frame piece of video. When you apply 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 is beyond the area being cut up by our track matte. If I was to get a little crazy here and drag Virtual Insanity up here, I'd start to see the drop shadow inside there. I will cut back on the Darkness and increase the Softness and that's not at all we want. All right, so that didn't work. Let's try the other solution. I am 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 and I'll increase the Distance here, but shadows are 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 that layer Night Vision, which is being used together as an alpha channel for Virtual Insanity.

So what I'm actually seeing here is a Virtual Insanity movie being revealed by the drop shadow, because the drop shadow has in essence changed the transparency of the track matte on top. It is 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 it doesn't work. Let's see what really does work. Well, there is 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 are calculated after track mattes have been applied. So I'll select Virtual Insanity, the layer that has been matted and has gained a transparency for Night Vision, then 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 is 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 am going to grab any old piece of footage here, like my Wildflowers layer, drag it to the New Comp button, there is that, look for my Comp 08_starter2, open 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'll 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 it was 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 it pre-com for short. You can use the layer styles or you can go ahead and do Layer > New > Adjustment Layer, put on top of everybody, 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, because the drop shadow on the adjustment layer will only be applied to my background as well. Which kind of negates the whole idea. I need to get these two by themselves, then apply a shadow to their composite, not to one of them individually, and that's the main secret. You have to combine them, then affect them.

Now stencils have similar issues with orders of effects. If you go ahead and watch the movies in the chapters on stencils, you'll see I 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'll need use layer styles, which are calculated after track mattes, or you need to apply an effect after the track matte has already happened.

Understanding track matte rendering order
Video duration: 5m 48s 2h 36m Beginner Updated Nov 15, 2012


Understanding track matte rendering order provides you with in-depth training on Video. Taught by Chris Meyer and Trish Meyer as part of the After Effects Apprentice 05: Creating Transparency

After Effects
please wait ...