White text over image of Rome in After Effects

Compositing is a normal part of the video post-production workflow, whether it’s crafting a title, placing a lower third or stunning the audience with a visual effect. One of the simplest, but most overlooked, ways to composite video is through the use of track mattes.

A track matte is simply an image, or a video clip, that is used to create variable transparency in another video clip.

A track matte is simply an image, or a video clip, that is used to create variable transparency in another video clip. It can be a still image, a video clip, a graphic, text or a generated shape. There are two basic kinds of track mattes, alpha mattes and luma mattes. Alpha mattes lend their own transparency, their alpha channel, to another clip for the composite, while luma mattes supply a luma channel, their brightness, to define the transparency in the composite.

Advertisement

How to Make a

DIY Green Screen

Free eBook

Free

How to Make a

DIY Green Screen

Free

Thanks! We will email your free eBook.


Alpha Mattes

Most video clips exist in an RGB color space without an alpha channel, meaning there is no transparency in the image. If the video clip was placed on top of another in a compositing program, such as After Effects, the underlying video clip would be entirely hidden. However, there are video clips, and other media files such as PNG images and vector graphics, which have an alpha channel. This means there are portions within the image which contain variable transparency, from opaque to fully transparent. It’s the alpha channel in the image that determines the amount of transparency. An alpha matte is a video clip, or image, with an alpha channel that is used to define the transparency in another video clip. For example, you might have a scenic video clip of a location. This base video clip possesses no transparency. You could use a piece of text generated in your compositing program as an alpha matte. The text itself contains an alpha channel, the body of the text is opaque while the negative space around the letters is transparent. When the text layer is selected as an alpha matte and applied to the base video clip, the base video clip uses the alpha channel of the alpha matte (the text) as its own. This results in a video clip of the original scene that is only visible in the portions of the text, the alpha matte layer.

Alpha Matte
Alpha Matte

Luma Mattes

Luma mattes work in the same way as alpha mattes, except instead of using the track matte layer’s alpha channel to determine the transparency in the composite, it uses the the luminance values of the luma matte is used to determine variable transparency. In this way, variable transparency can be created without using a source clip that contains any variable transparency. For example, you might have the same scenic clip you used for the alpha matte composite, but instead of a text clip, you have a black and white clip of flowing ink, spreading throughout the video clip. Your could take the ink clip and set it as a luma matte, applying it to the scenic clip. As a result the scenic clip would flow to life, becoming opaque, appearing only where the ink in the luma matte flows.

Track Mattes in Adobe After Effects

In some ways track mattes may sound complicated, but when put into practice, they’re rather simple. So simple in fact, that Adobe After Effects has track matte functionality built into the timeline window of its interface. Each layer in the After Effects’ timeline has a series of switches and modes. Under the modes of each layer, with the exception of the top layer and audio files, is a Track Matte pull down option. By default this option is set to “No Track Matte.” There are four other options under this menu; Alpha Matte, Alpha Inverted Matte, Luma Matte and Luma Inverted Matte. When a Track Matte mode is selected for a layer, that layer becomes the base layer and the layer above becomes the track matte, the layer that defines transparency in the base layer. When a track matte mode is selected, visibility is turned off for the layer above, the track matte. This is because the track matte is there to create transparency but not to be seen as a clip in the end composite.

Track Matte pull down menu; Alpha Matte, Alpha Inverted Matte, Luma Matte and Luma Inverted Matte.

Power in Numbers

A solitary track matte is easy to execute and is a great technique for filling text with video or punching a hole in a clip to reveal a second image underneath. The current trend of double exposure portraits can be easily pulled off in video by shooting overexposed footage of a subject on a white background and using the luminance of that image as a luma matte in another piece of video. But track mattes don’t have to be limited by a single composition. Multiple track mattes composited together can make for some dynamic imagery. For instance, you could create a double exposed portrait using the aforementioned technique but then take it a step further. The double exposed portrait can be pre-composed and then drift into the screen by using blowing smoke as a luma matte to transition it onto screen. That composite can then use a layer of text as an alpha matte. The chain of pre-composing clips and track mattes can continue as far as you want to travel.

Not Just a Mode

The principles of track mattes go beyond the mode options inside of the timeline window. There are many native effects and third-party effects which define their basic parameters using the same technique track mattes do to define transparency. If you understands track mattes, you  will be able to use effects that use “Map Layers.” For example, the “Displacement Map” effect in After Effects references another layer in the composition and uses one or more of the chroma, luminance and/or alpha channels in that image to determine the amount of distortion in an image, thus creating variable distortion.

Track mattes are one of the most useful resources in a video editor’s glovebox. They’re a great tool to navigate a myriad highway of composites and for creating variable transparency. Once the editor knows how they work, they’ll be able to read an image and know where it can take them.

SIDEBAR: Using Track Mattes in Adobe Premiere Pro

Creating and using a track matte in Adobe Premiere Pro takes a little bit more effort than it does in Adobe After Effects, but that effort can save the video editor a lot of time if they don’t have to jump over to After Effects to execute the composite. One thing to note is that a track matte composite created in Premiere Pro is best suited for simple composites, such as using text to punch out video, whereas After Effects is a better platform for more complex composites.

Adobe Premiere Pro’s video editing environment is different than After Effects’ for obvious reasons; it’s a video editing platform as opposed to a compositing one. For this reason, you don't have the option to set a track matte directly in the timeline. Still, Premiere Pro packs plenty of power to punch up promising composites.

The easiest way to create a track matte composite in Premiere Pro is to use the Track Matte Key effect. To use, first place the video layer that will serve as the base layer in the timeline. Next, place the clip which will serve as the track matte on a layer above the base layer. It’s important that the track matte sits above the base layer as the effect will ignore any clips below the base layer and not provide them as an option for the track matte. Third, drag the Track Matte Key effect onto the base layer and open the Effect Controls for that clip. With the Effect Controls open, go to the “Matte” option pulldown and select the layer that is to be used as a track matte. With the effect targeting the matte layer, you will then want to define the track matte with the “Composite Using” option and select Matte Alpha or Matte Luma. The “Reverse” checkbox in the effect allows the user to invert which channel is selected, alpha or luma. 

Chris “Ace” Gates is a four-time Emmy Award-winning writer and producer.

Chris "Ace" Gates is a four time Emmy Award-winning writer and producer. He is a big fan of animation and transmedia storytelling.