Advertisment

Matte Creation in After Effects

author-image
PCQ Bureau
New Update

If you work with video, you would have come across the need to layer (superimpose) one sequence over another, much like a TV studio super imposes an anchor over a live news coverage. In movies, an action shot may need to be shot on a stage and subsequently be placed over a different background: the actual location where that action is supposed to have taken place.

Advertisment

The technique for doing this is called compositing. The action sequence in the movie example above is shot on a stage, in front of a blue or green screen. The screen is subsequently replaced by the original background. The screen is identified for replacement by creating a matte or a transparency.

Creating a matte (transparency) out of blue/green screen footage in a composition has been cumbersome till date. Most of the quality of final matte and composite is established at the time of the shooting itself. Usually, you are not going to be able to produce a decent composition by applying a single key filter/effect. 

Direct

Hit!
Applies

to:
Video/special effects professionals
USP:

Compositing of two video clips for special effects
Links:

www.adobe.com/products/tips 



/aftereffects.html, www.borisfx.com/products/FX/
Advertisment

You would need to carefully look at the video before picking a particular key effect or a series of effects. This depends on how well the background (blue/green) has been shot. Some things that need to be kept in mind include: is the background lit properly without any gradient shades of same colors? If shades are present, how much color spill is there on the edges of a character/object over the blue/green background? Is the background still or moving in the footage? These same questions have to be asked about the object or characters in front also.

STEP BY STEP

Use Matte Corrected to get a strong B/W effect towards the edges

Use the Picker tool to remove the garbage from the main

subject

We will create two compositions in After Effects 6: Output and Matte.

Advertisment

Import footage provided to you on the CD as a series of tgas. (TGA is the format used in production houses. Though the detailed reasons of using this are out of scope of this tutorial, the basic reason for using it is to get high-quality digital data for accurate correction.)

Original  Background  Composition

Make two compositions named as Output and Matte. In the matte composition we will create a black and white matte, which will later be transferred to the output composition for creating the final composite.

Advertisment

Drag the footage to the output composition and copy it to the matte composition and name it 'edge matte'. Copying is important as updation in matte composite is synchronized with the output.

In the matte composition, select the layer and apply 'Color Difference' key (effects/keying). In the effects panel, choose matte corrected, which results in a black and white effect, strong towards the edges and weak around the central portions. This effect is very helpful in creating solid matte edges. See screenshot 1.

To cover the weaker portions of the matte, duplicate the layer and remove the blue portions using Color Range key. At this point, you will see that a lot of the blue area is still left all over the screen. To completely clear the blue background, use Picker with a + sign and click over the blue shades left on the screen until you have cleared the garbage except the main subject (the girl in this case). We played with the Picker tool a little and got fuzziness around 26. You can achieve satisfactory results with the same or slightly different settings. Do this to a layer below and set the layer mode of the upper layer as screen, so that it can be mixed well with the lower one. Now matte is fully saturated with the white. See screenshot 2.

Advertisment

We want our matte composition to be completely black and white, so we need to apply Levels (Effects/Adjust) and set the black pointer in the output to 255. Now you will see that the matte composition is fully black and white, but the edges are quite hard. We will improve this in the next step. See screenshot 3.

To soften the edges, apply the Matte Choker (Effects/Matte tools) and set the value to as little as possible. You can always play with it later, after it has been copied in the output composition for minor tweaks to correct the artifacts caused by the DV. See screenshot 4.

Create a new solid in black and set it in the background for possible interference of alpha channel.

Advertisment

Now we are ready with the matte to be used for the final output. Drag the matte composition from the project window into the output composition, just below the main footage layer. Be careful about frame zero for both the layers (for synchronization, otherwise it can cause problems if the base composition in the matte is changed).

Select the main footage inside the output timeline and apply Set Matte (Effects/Channel) effect. In the Take Matte settings, choose the Matte Layer (composition created from the matte composition). You can hide the layer if you want to, as this layer is not going to be visible in the final output. See screenshot 5.

Now, drag the background footage from the project window and set it below the matte layer. This layer is going to be the last layer in the composition (output).

Advertisment

To make this effect convincing, there are a couple of important things to consider. First, the colors and brightness and contrast of the foreground have to match the background. You can adjust these by applying Levels or Color Balance effects to the background or foreground, or both.

There are possibilities of removing something called as the green or blue 'spill'. Green spill is the tiny green or blue edges around the foreground. The most basic way to remove these is to use ‘After Effects Own Spill Suppressor', found in the Keying effects. This filter will let you choose a color, which will then be removed from the layer it's applied to. You tend to lose a lot of color in the whole layer though, while you actually only want to remove the spill from the edges.

STEP BY STEP

Use levels to make the mattecomposition totally B/W

Use the Matte Choker to soften the edges

There are some third-party filters that successfully blend in the colors of a specified background layer around the edges of the foreground layer. They make it look as if some of the color or light from the background is reflecting around the edges of the foreground object. My personal preference is to use the Light Wrap filter for this. This filter is included in Puffin Designs' Composite Wizard, but there are others. These filters also successfully mask any residual screen that comes through.

STEP BY STEP

Apply the Set Matte effect in the main footage 

Creating the matte this way gives a lot of control over the combined matte. Sometimes it is impossible to get a satisfactory matte by just using keying filters. I have on occasion animated small circles on top of these layers to fill certain holes that I couldn't fix with the Core Matte. 

Another possibility is the addition of what is called a Garbage Matte. If, for instance, the camera is static, and there are static objects in the foreground, you could create a black and white image in Photoshop to mask these objects. This would give you more room to fiddle with the other layers, since you wouldn't have to worry about those objects.

Finally, a warning is in order. Especially with Choked Mattes, a 'fluttering' of the edges can occur, so it's wise to test-render or RAM-preview some sequences instead of only relying on just the still.

Tajinder Jeet Singh Technical Core Committee Maya Academy of Advanced

Cinematics

Advertisment