You are here: User Guide > Nuke > Keying with Keylight > Color Replacement

Color Replacement

Remember that Keylight does two things - it removes the screen color to despill the image and generates an alpha (Screen Matte) to composite the foreground over the background layer.

If you then process the Screen Matte, for example, by eroding the alpha or changing the clip levels, Keylight would be removing the wrong amount of screen color from the pixels whose transparency has now changed. The Screen Replace instructs Keylight how to deal with such pixels. The Status displays which pixels use a replace method. Those pixels that use a replace method because the alpha processing tools modified the transparency are green, whilst those pixels whose transparency was modified by the inside matte are blue. See the Status View under View.

There are four options to the replace method. These are:

1.   None - the despilled image is left untouched if the alpha is modified.
2.   Source - the image has a corresponding amount of the original pixel (screen color and all) reintroduced/removed if the alpha is changed.
3.   Hard Color - the despilled image has a corresponding amount of the Screen Replace Color added for any increase in alpha.
4.   Soft Color - the despilled image has a corresponding amount of the Screen Replace Color added for any increase in alpha, however, it attempts to modulate the luminance of the resulting pixel so that it matches the original pixel. This gives a more subtle result than the Hard Color option.

Inside mask

If the changes to the screen matte are due to an inside mask, the Inside Replace and Inside Replace Color parameters can be used to modify the color in these areas just like the Screen Replace parameters described above.

Edges

Built-in crop tools are included to quickly remove parts of the foreground at the edges of the image. It can also be useful in tidying up a matte at the edges where luminance changes in the blue screen are proving difficult to key out.

With X Method and Y Method set to Color and Edge Color, set to pure blue (for a blue screen), set the Left to crop out the left-hand side of the image revealing the background. The figures below show the changes to the Combined Matte with cropping.

Left = 0. Left = 0.35.

InM component

The component (luminance or alpha channel) of the inside mask input that is used in the calculations. Typically, this is a garbage matte that covers the area you know to be 100% foreground.

A bluescreen image. An inside matte.

TIP:  To avoid having to roto the inside matte throughout the clip, you can connect another Keylight node to the InM input and use it to create a hard, dilated key (set Screen Dilate to a low value).

OutM component

The component (luminance or alpha channel) of the outside mask. Typically, this is a garbage matte that covers the area you know to be 100% background.

 

A bluescreen image. An outside matte.