Keylight

Keylight is an industry-proven color difference keyer. Use the Screen Color selector to choose a color from the Source input to use as the blue/green screen color and the View dropdown menu to judge the key. To remove blue/green spill from the foreground object, use the Despill Bias control to pick skin tones from the source. Use the Screen Matte parameters to improve the matte.

Keylight’s core algorithm was developed by the Computer Film Company (now Framestore) and has been further developed by Foundry.

Copyright © 2023 Foundry & Framestore. All rights reserved.

Inputs and Controls

Connection Type

Connection Name

Function

Input

bg

The background image to replace the blue/green screen in the foreground.

OutM

The Outside Mask, or garbage matte, used to remove unwanted objects (lighting rigs, and so on) from the foreground.

InM

The Inside Mask, or holdout matte, used to confirm areas that are definitely foreground.

Source

The foreground image to key.

Control (UI)

Knob (Scripting)

Default Value

Function

Keylight Tab

View

show

Final Result

Select what you want to render into the output.

Source - view the blue/green screen foreground image.

Source Alpha - view the foreground image’s alpha channel.

Screen Matte - view the matte created from picking the Screen Color. It does not include any inside or outside masks.

Inside Mask - view the inside input. This is used to firm up the foreground matte to stop print through.

Outside Mask - view the outside input. The outside mask is used as a garbage mask to reveal the background.

Combined Matte - view the screen matte, inside mask, and outside masks added together.

Status - view an exaggerated view of the key so that minor problems are shown clearly.

Intermediate Result - view the intermediate result. Use this option on shots that can only be keyed using several different keys on different parts of the image (multipass keying). This renders the original source image with the Screen Matte generated in this Keylight node. In Keylight nodes down the tree, you should set the Source Alpha in the Inside Mask folder to Add To Inside Mask.

Final Result - this creates a premultiplied RGBA foreground that can be composited later. There’s an Unpremultiply Result checkbox you can use if you wish.

Composite - this renders the foreground composited over the background using all mattes, spill and color corrections.

Unpremultiply Result

unPreMultiply

enabled

When disabled, the key result is not unpremultiplied. If you’re using premultiplied images, you should leave this enabled.

Screen Color

screenColor

0, 0, 0

Sets the screen color to become transparent, usually blue or green background.

Screen Gain

screenGain

1

Adjusts how much of the screen color is removed to make the screen matte. Increasing this value keys more.

Screen Balance

screenBalance

0.5

Sets the balance point for the image to key. Generally speaking, blue screens tend to work best with a balance of around 0.95 and green screens with a balance of around 0.5. If the key is not working too well with these settings, try setting the balance to about 0.05, 0.5 and 0.95 and see what works best.

Alpha Bias

alphaBias

0.5, 0.5, 0.5

Adjusts the AlphaBias in case your screen color isn’t purely blue or green and is causing parts of the foreground image to become transparent. Pick the color from the part of the foreground that is affected.

Despill Bias

despillBias

0.5, 0.5, 0.5

Adjusts the DespillBias to remove any remaining spill from around the foreground image. The most useful colors to pick for Despill Bias are often hair colors and skin tones.

Note:  This control is disabled unless Use Alpha Bias for Despill is disabled.

Use Alpha Bias for Despill

gangBiases

enabled

When enabled, use the AlphaBias color as the DespillBias color.

When disabled, set the DespillBias color separately.

Screen PreBlur

preBlur

0

Adjusts how much you want to soften the foreground image used to generate the key. If you’re keying digital video or grainy footage, you might get better results if you adjust this control slightly.

Screen Matte

Clip Black

screenClipMin

0

Sets the cut off point below which alpha values in the Screen Matte are set to zero.

Note:  Adjusting this control too aggressively can cause hard edges between the foreground and background.

Clip White

screenClipMax

1

Sets the cut off point above which alpha values in the Screen Matte are set to the white point.

Note:  Adjusting this control too aggressively can cause hard edges between the foreground and background.

Clip Rollback

screenClipRollback

0

Allows edge detail to be restored after clipping the Screen Matte too aggressively using the ClipBlack and ClipWhite controls.

Screen Dilate

screenGrowShrink

0

Adjusts alpha values in the Screen Matte. Either grow (if greater than zero) or shrink (if less than zero) the alpha in the Screen Matte at a sub-pixel level.

Note:  This control should not normally be used as eroding edges can produce a very poor key.

Screen Softness

screenSoftness

0

Controls the amount of blur applied to the matte. For example, softness could be used on a very harsh matte pulled for use as an inside matte further down the tree.

Screen Despot Black

screenDespotBlack

0

Removes isolated spots of black in a white matte by simplifying the matte. Black specks in the white matte are absorbed by the surrounding white areas.

Screen Despot White

screenDespotWhite

0

Removes isolated spots of white in a black matte by simplifying the matte. White specks in the black matte are absorbed by the surrounding black areas.

Screen Replace

screenReplaceMethod

Soft Color

Sets the color method to use for pixels where the alpha of the Screen Matte has been modified:

None - the despilled image is left untouched if the alpha is modified.

Source - the image will have a corresponding amount of the original pixel (screen color and all) reintroduced/removed if the alpha is changed.

Hard Color - the despilled image has a corresponding amount of the Screen Replace Color added for any increase in alpha.

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 produces a more subtle result than the Hard Color option.

Screen Replace Color

screenReplaceColour

0.5, 0.5, 0.5

Sets the color to add where the alpha of the Screen Matte has been increased by the mask when Inside Mask > Inside Replace is set to HardColor or SoftColor.

Tuning

Midtones At

midPoint

0.5

Sets the base midtone level used by the Gain controls below.

Shadow Gain

lowGain

1

Adjusts the strength of the shadows in the Screen Matte.

Midtones Gain

midGain

1

Adjusts the strength of the midtones in the Screen Matte.

Highlights Gain

highGain

1

Adjusts the strength of the highlights in the Screen Matte.

Inside Mask

Source Alpha

sourceAlphaHandling

Ignore

This parameter determines what to do with any embedded alpha in the original source image. You will need this if you are doing multiple keys on different parts of the image with the View output set to Intermediate Result:

Ignore - this does not add any embedded alpha to the screen matte.

Add To Inside Mask - the embedded alpha is added to the inside mask. You should select this when multipass keying with View set to Intermediate Result.

Normal - the embedded alpha is used to composite the image.

Inside Replace

insideReplaceMethod

Soft Color

Sets the color method to use for pixels where the alpha of the Inside Matte has been modified:

None - the despilled image is left untouched if the alpha is modified.

Source - the image will have a corresponding amount of the original pixel (screen color and all) reintroduced/removed if the alpha is changed.

Hard Color - the despilled image has a corresponding amount of the Screen Replace Color added for any increase in alpha.

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 produces a more subtle result than the Hard Color option.

Inside Replace Color

insideReplaceColour

0.5, 0.5, 0.5

Sets the color to add where the alpha of the Inside Matte has been increased by the mask when Inside Mask > Inside Replace is set to HardColor or SoftColor.

Crops

X Method

SourceXMethod

Color

When the crop controls are in use, sets the fill method to use on the X axis at the edges of the clip:

Color - uses the Edge Color to fill the cropped area.

Repeat - the edge pixels are used to fill the cropped area.

Reflect - an equal number of pixels are reflected back from the image to fill the cropped area.

Wrap - an equal number of pixels are wrapped from the opposite edge to fill the cropped area.

Y Method

SourceYMethod

Color

When the crop controls are in use, sets the fill method to use on the Y axis at the edges of the clip:

Color - uses the Edge Color to fill the cropped area.

Repeat - the edge pixels are used to fill the cropped area.

Reflect - an equal number of pixels are reflected back from the image to fill the cropped area.

Wrap - an equal number of pixels are wrapped from the opposite edge to fill the cropped area.

Edge Color

SourceEdgeColour

0

When an XY Method is set to Color, sets the color used to fill the cropped area.

Left

SourceCropL

0

Sets the crop amount from the left edge.

Right

SourceCropR

1

Sets the crop amount from the right edge.

Bottom

SourceCropB

0

Sets the crop amount from the bottom edge.

Top

SourceCropT

1

Sets the crop amount from the top edge.

Keylight

InM Component

insideComponent

None

Sets the component to use from any Inside Mask attached to the InM input:

Luminance - the luminance of the image connected to the InM input is used.

Inverted Luminance - the luminance of the image connected to the InM input is inverted before use as the mask.

Alpha - the alpha of the image connected to the InM input is used.

Inverted Alpha - the alpha of the image connected to the InM input is inverted before use as the mask.

OutM Component

outsideComponent

None

Sets the component to use from any Outside Mask attached to the InM input:

Luminance - the luminance of the image connected to the OutM input is used.

InvertedLuminance - the luminance of the image connected to the OutM input is inverted before use as the mask.

Alpha - the alpha of the image connected to the OutM input is used.

InvertedAlpha - the alpha of the image connected to the OutM input is inverted before use as the mask.

About

about

N/A

Click to display a Keylight informational box.

Step-by-Step Guides

Keying with Keylight

Video Tutorials