ChromaKeyer

ChromaKeyer is a green and bluescreen keyer that can take advantage of the local GPU. Use the screen color selector to choose a color from the Source input to use as the blue/green screen color. To remove blue/green spill from the foreground object, use the despill bias control to pick skin tones from the source. Use the matte parameters to improve the matte.

Inputs and Controls

Connection Type

Connection Name

Function

Input

Source

The foreground image to key.

Control (UI)

Knob (Scripting)

Default Value

Function

ChromaKeyer Tab

Local GPU

gpuName

N/A

Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when:

Use CPU is selected as the default blink device in the Preferences.

no suitable GPU was found on your system.

it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU.

You can select a different GPU, if available, by navigating to the Preferences and selecting an alternative from the default blink device dropdown.

Note:   Selecting a different GPU requires you to restart Nuke before the change takes effect.

Use GPU if available

useGPUIfAvailable

enabled

When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU.

Note:  Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine that does have a GPU available.
You should also select this if you wish to render from the command line with the --gpu option.

See Nuke 15 Release Notes for more information on the GPUs Nuke supports.

view

_view

final result

Select what you want to render into the output.

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 matte generated in this node. In ChromaKeyer nodes down the tree, you should set the inside mask control to source alpha.

final result - this creates a premultiplied RGBA foreground that can be composited later. You can produce unpremultiplied output by disabling the premultiply control.

screen color

_screenColor

0, 0, 0

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

Click the color swatch next to screen color to activate the eye dropper and then Ctrl/Cmd+Shift+click and drag a rectangular area over the green pixels in the Viewer. This averages the pixels in the area selected to produce a better key.

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. If the key is not working too well with the default setting, try setting the balance to about 0.05, 0.5 and 0.95 and see what works best.

matte

chroma gain

_chromaGain

0

Controls how much of the chroma difference between the source image and the screen color is used to correct the matte.

Increasing chroma gain generates a matte that has less transparent areas in the foreground, but can produce harder edges.

white point

_whitePoint

1

Sets the error threshold used for correcting the foreground. All alpha values above this point are set to 1.

black point

_blackPoint

0

Sets the error threshold used for correcting the background. All alpha values below this point are set to 0.

alpha bias

_alphaBias

0.5, 0.5, 0.5

Adjusts the alpha bias 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.

inside mask

_insideMask

ignore

If you're using multiple ChromaKeyer nodes to pull several different keys on different parts of the image (multipass keying), set inside mask to source alpha to add up the results of previous ChromaKeyer nodes.

When set to ignore, any upstream keys are not taken into account.

despill

Use custom despill bias

_overrideDespillBias

disabled

Enables the use of the despill bias control.

despill bias

despillBias

0.5, 0.5, 0.5

Adjusts the despill bias 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 custom despill bias is enabled.

replace mode

_replace

ignore

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

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

edge hard color - the despilled image has a corresponding amount of the replace color added for any increase in alpha.

edge linear color - the image has a corresponding amount of the original pixel (screen color and all) reintroduced/removed if the alpha is changed.

edge soft color - the despilled image has a corresponding amount of the 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 edge hard color option.

add-in matte fix

_replaceAlphaDiff

disabled

When enabled, add the replace color into areas corrected using the matte black point and white point controls to enhance the despill effect.

replace color

_replaceColor

1, 1, 1

When replace mode is set to edge hard color or edge soft color, sets the color to add where the alpha of the matte has been increased by the mask.

replace amount

_replaceAmount

1

Controls the amount of replace color to add in the final result.

premultiply

_preMultiply

enabled

When enabled, premultiply the matte generated by ChromaKeyer with the foreground.

Premultiplying the matte can remove noise from the background, but it can also be too aggressive in some areas, such as hair.

Step-by-Step Guides

Keying with ChromaKeyer