Sample

Key FOREGROUND Asset

The Precision Keyer can work on foreground assets (SCENE > Foreground) or on texture which are used within the scene.

Virtual Studio

Live input as FOREGROUND asset

Result with configured the Precision Keyer

Key Textures in Scene Tree

If used within the scene, use a container with a geometry and add a RenderSystemMaterialPrecisionKeyer. Drag the used media asset on the color widget of the material. The Keyer must be enabled on the asset (for example, Live1).

Additionally, the texture coordinates can be manipulated. See Texture Generation for more information.

image-20240909-132023.png

Virtual Studio

Live input added as texture in the scene

Result with configured the Precision Keyer

Prerequisites

The Precision Keyer works on live inputs (including streams and NDI) and clips. The asset must be used as a texture in the scene (either in the scene tree, or as "FOREGROUND" in the scene), and it requires a solid background color which is either green or blue.

As a first step, select the color mode which should be used by the Keyer, which is either Greenscreen (default) or Bluescreen. 

Then, you need to adjust the base parameters of the Keyer. This can be done either by using the Auto Adjust functionality or manually.

NDI

If you want to use the Precision Keyer with active NDI output in a VS setup, please be aware that Viz Engine puts the matte of the Keyer on the key signal. Depending on the device which is used to read the NDI signal, this key might be already applied and thus Virtual Studio elements are not visible on the NDI output. To fix this, you need a fullscreen key or a device that shows fill (RGB) independently from the key (Alpha). To enforce Viz Engine to send a fullscreen key, set NdiOut1.ContainsAlpha = 0 in the configuration file.

Automatic Adjustment of Base Parameters

Use the auto adjust functionality of Viz Engine. The result looks like this:

The auto adjustment uses the current input signal to calculate:

  • Hue Adjust

  • White Point (Transparency)

  • Processed FG / RGB

Furthermore, it sets the following values based on some well-proven defaults:

  • Black Point (Opacity)

  • CMY Gain

  • BG Lightwrap

  • Radius/Sharpen of Matte Denoise

However, there still might be the need to slightly adapt the parameters, depending on your input signal.

Manual Setup of Base Parameters

Hue Adjust

The Keyer works best if the background is perfect green (RGB(0, 255, 0)) or perfect blue (RGB(0, 0, 255)). As this is not what we have in most real-world setups, you need to color-shift the input signal until you get perfect green or perfect blue.

Enable the Matte view and adjust the hue shift until you have the maximum of contrast you can get. In perfect scenarios, this would mean that you get a full white background, and a opaque black foreground. Depending on your lighting situation, you will not get perfect white and black on the matte view, this is handled in the next steps. Try to find the hue shift which is the best you can get now, and use 100% for the white point (Transparency) and 0% for the black point (Opacity) to see the unscaled values while adjusting the hue shift.

Input Signal

Matte Before Hue Adjust

Matte After Hue Adjust

White Point (Transparency) and Black Point (Opacity)

After the hue adjustment, we should adjust the white point. This scales the input values so that the background is fully keyed (full white on the Matte view). Start from 100% and reduce it until the background is fully white, Do not reduce it more as necessary, as it would start remove details at the border of the foreground.

Now we need to find the black point, which scales and shifts the input values so that the foreground is fully opaque. Start from 0% and increase it, until your foreground is fully opaque. Have a look on details and borders and do not increase it more as necessary.

Matte Before White Point Adjustment

Matte After White Point Adjustment

Matte After Black Point Adjustment

Processed Foreground / RGB 

After the base adjustment of the hue and the white point and black point, you should adjust the RGB values of the processed foreground. These values are subtracted from the input signal and then are used in a linear keying mechanism, so the goal would be that these RGB values match the color of the background. Try to adapt the values so that they match the dominant color of the unprocessed input, but make sure that you do not use higher RGB values as needed. Incorrect or too high values decrease the quality of the linear keying and get noticeable with false colors around the edge between foreground and background.

  • BlackPoint: Scales the key value used when processing the foreground. Only affects areas where matte is > 0.0 and < 1.0. Can be used to enlarge the talent in semi-transparent regions, increases lightness around edges.

  • WhitePoint: Scales the key value used when processing the foreground. Only affects areas where matte is > 0.0 and < 1.0. Can be used to shrink the talent in semi-transparent regions, decreases lightness around edges.

If "Processed Foreground" is disabled, the keyer uses linear alpha blending to compose foreground and background.

Input Signal

Processed FG before RGB Adjustment

Processed FG after RGB Adjustment (0.345, 0.713, 0.078)

Cyan / Magenta / Yellow Gain (CMY Gain)

Due to the despilling process, which removes greenish/blueish parts of the skin, it can happen that the color tone is modified too much. Use the CMY gain adjustment to bring Cyan, Magenta or Yellow back as necessary.

There are two versions of lightness restoration available. DARK slightly darkens values in despilled areas, while LIGHT preserves the lightness and leads to more bright edges.

Before CMY Adjustment

After CMY Adjustment

Final Result

Now add a background or your Virtual Studio and check the result:

Other Parameters

Background Lightwrap and Color Lightwrap

Color Lightwrap

Adds a specific color either around the edge (Edge Gain) or in the spill areas (Spill Gain).

Background Lightwrap

Blends with the background, either around the edge (Edge Gain) or in the spill areas (Spill Gain). This can be used to improve edge quality and to apply the color tone of the background onto despilled areas.

No Lightwrapping

Color Lightwrap, Edge Gain = 0.5, Color = RGB(255, 0, 0)

Color Lightwrap, Spill Gain = 0.4, Color = RGB(0, 0, 255)

Background wrapping, Edge Gain = 0.3

Background wrapping, Spill Gain = 1.0

The background used for lightwrapping can be blurred, and there are multiple parameters available:

  • Edge Blur: If this value is greater than zero, edge detection is performed and edges found are blurred by the amount set in this field. The blurred edges serve as input to brighten up the edges to overcome overshooting when going from a dark color to the Cyclorama. These edges are used for lightwrapping.

  • Edge Blur Factor: Determines how much of the background blur is used for the edge lightwrapping. 1.0 = same blur as for spill lightwrapping, 0.0 = use unblurred background.

  • Kernel: Choose between LAPLACE and SOBEL. LAPLACE is more fine-grained and keeps more details.

  • Blur: The blurred background is used for lightwrapping onto the foreground together with the spill matte or the edge matte. See also Edge Blur Factor.

The background which is used to do the lightwrapping around edges is blurred by using Blur * EdgeBlurFactor, the background used to do the lightwrapping for spill areas is blurred using Blur only. This allows to reduce the used blur on the edge lightwrapping, while using more blur on the spill lightwrapping areas, which should be used to prevent transparency effects.

Aux Output 

Important: The Parallel Outputs license is necessary to use this feature. 

The Precision Keyer generates and consumes multiple internal textures, which can be viewed for monitoring reasons:

  • Primary Matte (Normal, Inverted, Advanced): Shows the calculated primary matte (0.0 is black, 1.0 is white). Can be shown Inverted or Advanced, where 0.0 is green and 1.0 is red, but the range in between still goes from black to white. This helps to distinguish black/white from near-to-black and near-to-white on monitors.

  • Processed Foreground (Normal, Advanced): Shows the processed foreground. Advanced mode shows RGB (0.0, 0.0, 0.0) as red, while all other values are shown as normal. This helps to distinguish real black (fully removed foreground) from near-to-black (not fully removed) on monitors.

  • Spill Matte: Shows the spill that has been detected and removed. Used while despilling and to apply Lightwrapping for Spill areas.

  • Edge Matte: Shows the edges that have been detected.

  • Highlights: Shows the highlights which are added by the Keyer.

Since Viz Engine version 5.3, these textures can be shown in parallel on a separate SDI outputs. To enable this feature, map one of the video connectors to the config channel Keyer AUX-Channel.

If one of the connectors is mapped to Keyer Aux-Channel, the Aux Output of the Keyer is sent to this output by default (instead of the Program output). This can be overwritten with commands:

# Enable AUX output
MAIN_SCENE*VIDEO*VIDEOIN*1*AUX_OUTPUT SET OFF|KEY|KEY_ADVANCED|INVERSE_KEY|...
 
# Overwrite AUX output target (AUTO: Use dedicated connector if configured, INTERNAL: use Program output always, AUXCHANNEL: use dedicated output always, BOTH: use both)
MAIN_SCENE*VIDEO*VIDEOIN*1*AUX_OUTPUT*TARGET SET AUTO|INTERNAL|AUXCHANNEL|BOTH

In addition, the matte scene can be sent to a second dedicated output by mapping another connector:

See Also

  • Texture Generation