Tutorial: Alex

Primatte Keyer 4 comes with a basic tutorial to guide you through the fundamentals of using the software.

Start with an clip that looks like this...

...and then use Primatte to create a Matte that looks like this...

...and end up with a composite like this...

"Alex" is a great tutorial to start with. It’s a very well-lit bluescreen, there’s a lot of fine hair detail that would be lost when keying with other keying methods, and there’s a noticeable amount of blue spill on her clothing, skin, and hair.

Create the Matte

The following steps will guide you through pulling the initial key, after which we’ll suppress the blue spill in the foreground. In the Tutorials folder open the file Alex.aep and open the composition Alex Comp. This composite contains a foreground and background image. Highlight the foreground layer in the Timeline window and apply Primatte from under the Effect menu.

Step 1

The first step is to sample the blue area of the background with a rectangular region. In Primatte, go to the Sampling Style menu and choose Rectangle. Sample a large area of the bluescreen. In most host applications, this means sampling on the Canvas, Composition, Project or other preview windows. In Final Cut Pro, you sample in the Filter Controls window.

Make sure that you do not include any of Alex’s hair or other detail. Primatte will take the value of each pixel in the sample range and make any pixels in that range transparent. As soon as the sample is made Primatte pulls a key and the foreground appears composited over the background.

Step 2

Go to the View pop-up and chose Matte to view the alpha channel being generated by Primatte. As you can see there is quite a bit of white noise in the background, especially in the corners of the image.

Step 3

To remove this noise, change the Sampling Style back to Point. Select the Clean BG tool and drag a line down the noisy right side of the image.

Primatte samples away almost all the noise. Repeat this sampling operation as many times as needed to remove all the noise from the background.

Don’t try and sample too much of the image at once. It should take you three to five samples to remove all the noise. Be careful of the fine wispy hair detail protruding from Alex’s head. If you happen to accidentally select this hair detail while sampling the background the hair will be keyed out, significantly reducing the quality of the matte.

The background areas of the Alex matte, even at their noisiest, are quite clean. You may occasionally need to pull a matte with fine detail in a very noisy setting. If this is the case, leave a little noise around the fine detail, as this can be cleaned up later using the Fine Tuning tool.

Step 4

The next step is to sample away any grayish areas in the foreground. Click the Clean FG button, and sample any areas inside the foreground that are not completely white.

Just like you did with the background, make as many samples as necessary to get the foreground completely white.

Suppress Spill in the Foreground

Now that you have a perfect matte, we’ll use Primatte Keyer’s spill suppression tools to clean up areas of blue tint in the foreground.

Step 1

Go back to the View pop-up and set it to view the Comp. Next look at Alex’s face and notice the light blue tint...

Also notice the light blue tint on her arm...

Much like we did with the matte, we’re simply going to sample these areas away.,

Step 2

Click the Spill Sponge, and sample the blue areas on the side of Alex’s arm.

The image above shows the spill area being sampled and the image below shows the result of the sample.

Notice that the blue is removed from all similar color regions over the entire image (such as the left side of her arm), not just in the area you sampled. When you sample an area, Primatte first calculates the color to be removed then applies that calculation to the entire image. Just as when sampling the foreground and background colors, spill suppression often requires more than one sample.

Occasionally a sample range of only one pixel, accomplished by clicking once with the mouse, can remove subtle spill areas. Clicking once in the blue spill area on Alex’s red shirt (see above) yields excellent results (see below).

If you find that there is still some blue spill along Alex’s cheek...

...simply sample it away.

If you find that you remove too much spill, undo your spill operation and sample a smaller area.

When sampling to suppress spill it is a good idea to sample both light and dark areas to ensure that you get all possible color tones. For example, to remove all the spill from Alex your samples should incorporate light and dark flesh areas, light and dark clothing areas, and (if needed) light and dark hair samples.

Fine Tuning

While literally all of the keying and spill suppression in Primatte Keyer is performed via sampling the image, occasionally you may want to manually fine tune the key for best results. A perfect example of a situation where you would want to do this is if you remove too much spill during a spill suppression operation.

In the image that you sample too much spill color the image will take on a tint. The color of this time depends on the original key color; generally speaking, for bluescreens the tint will be yellow and for greenscreens it will be magenta.

Consider the example below. Using the Spill Sponge we sample away spill from Alex’s hair.

However, this gives us a bright yellow color on the hair edge.

Essentially we want to “dial back” the amount of spill suppression to give this edge a more natural color. Here is how we do that...

Step 1

Click the Fine Tuning tool to activate it. Sample the yellow edge of the hair area.

Once you have completed the sample the Fine Tuning sliders will snap the current Spill, Transparency, and Detail values of the sampled pixels. (After Effects interface shown.)

Step 2

To decrease the amount of spill suppression in this area simply move the Spill slider to the left. This reduces the amount of suppression, which puts back some of the blue that was originally removed.

Note that it doesn’t take a lot of adjustment to get to the right amount of spill suppression. In the example above we went from a value of .44 to .39. This slight adjustment gives the hair a far more natural look. (After Effects interface shown.)

To adjust the Transparency or Detail values you follow exactly the same sampling process.

Color Matching

In the previous steps we created a perfect matte and easily removed the blue spill from the foreground. In terms of getting a completed composite, however, this is just the first step.

In the image below we see our original Alex bluescreen...

...and the keyed, spill-corrected foreground below.

However, unless the project calls for your foreground to be composited over a black background we need to color correct it to integrate it with the composite environment.

Consider the image above. Even though we have removed the blue spill the colors in Alex remain largely unchanged. The composite environment, however, is comprised of greens and browns (see below).

Imagine if Alex was actually standing on this grassy area. The light from the sun would hit the grass, and green light would bounce up and off her body, giving it a slight green tint. Normally you would have to apply numerous After Effects color correction filters. Primatte Keyer 3 gives you a couple of excellent tools to mimic this type of environmental lighting.

Step 1

Scroll down to the bottom of the Primatte Keyer interface. Expand the Color Matcher section to reveal the Composite Matcher toolset.

Step 2

We need to designate which layer we wish to use to color the foreground. This can be a single background layer (as we see in this project) or it can be a precomped After Effects composite comprised of many layers. Locate the Background Layer pop-up and choose “alex_background.tif” as our background layer.

Step 3

Click the Enable checkbox to turn on Color Matcher.

Your image will go from the image above to the image below.

You will see an immediate change as Primatte samples the tonal range of the background and remaps the foreground colors accordingly.

Step 4

The next step is to adjust the automatic color remap. The easiest way to do this is to adjust the Strength slider. By default this is set to 50%. A value of 0 means that no colors in the foreground are remapped, and a value of 100 means that all of the colors are remapped.

In the steps below there is really no “correct” procedure to follow. Every compositor has to make their own judgment calls as to whether an element needs more or less color correction. These steps may or may not be the ones that you would choose, and are included here simply to provide an overview of the toolset.

We will start by reducing the amount of the automatic correction from 50% to 26%.

This restores more of a natural flesh tone to Alex’s skin while retaining some of the bounced light qualities of the composite.

Step 5

The next step is to fine tune the individual aspects of the remapping process. To do so you are given three sets of RGB sliders, which enable you to individually color correct the Highlight, Midtone, and Shadow areas of the image. For example, the highlight areas of Alex’s hair in the top right part of the image have become a little too green.

Expand the Highlight sliders and set the Green value to -30. This will knock out some of the green tint and leave you with a more natural hair color.

Step 6

As you can see, Primatte Keyer 3 gives you a great deal of color correction control. Using the sliders, color correct the foreground as desired.

Light Wrap

In the previous example we saw how Color Matcher could color correct a foreground to match the background. But what if the composite environment contains rather extreme lighting? Let’s take a look at another example.

Step 1

Open the composite “AlexLW.”

This composite has been pre-keyed and color corrected, and shows the Alex foreground over a sunset background with extreme colors and backlighting.

While the foreground colors match the composite environment, the edges don’t contain the appropriate amount of backlighting. When an object stands in front of a bright light the strength of the light causes it to bleed around the edges of the foreground. To simulate this effect we will use Light Wrap.

Step 2

Expand the controls for Light Wrap and click the Enable checkbox.

You will notice that unlike with Color Matcher there is no immediate change. This is because we have not yet chosen a composite mode for the wrap effect.

Choose Add from the Comp Mode pop-up. You will immediately see the edges of the foreground appear to have light from the background wrapping around them.

(The most common mode you will use is Add, so it’s good to start with this one first. Screen is often a good mode to use to cover up bad edges on your foreground element. With a little experimentation you’ll soon learn which modes work best for your common compositing situations.)

Step 3

The wrap effect should be thicker and more pronounced to better represent the amount of light given off by the blazing sun in the background, and for this we have the Width value. The default width is 4.

Increase the Width value to 25 and you will see a marked difference.

As you can see the higher Wrap value contributes significantly to the believability of the shot.

Conclusion

In this tutorial we’ve covered the basics of pulling a key, then color correcting the foreground to match the background. If you look at the before...

...and after images the effect is quite remarkable.

For More Information

We will be adding more tips, tricks, and tutorials, which will be available for download from our website.

http://www.redgiantsoftware.com