Search
Start typing to search...

Keying

Author:
Please note that this is a BETA version of the document. All information presented is correct but we are working on improving the details.

Back to Prerequisites of a Good Keying

Introduction

Keying is the process of cutting out the background of an image/video. The cut-out region is marked with an alpha map so you can easily composite it with other backgrounds.
This document describes how you can achieve the best keying results within Aximmetry.

NOTE: Aximmetry can key out green or blue backgrounds because they are the most commonly used ones, as these colors are the farthest away from skin tones.

Preparing the background before the show is as important as setting up the Aximmetry keyer. If you want to have a satisfying keyed result, you have to prepare your background. If you would like to read about the prerequisites of a good keying, please refer to this document: Prerequisites of a Good Keying.

Example of keying process

Original footage:
advbkeyer image001.jpg

Cut-out version:
advbkeyer image003.jpg

Composite with a background:
advbkeyer image005.jpg
NOTE: In this example, the left and right sides will be manually cut out, so those regions can be (and must be) ignored during the keying setup. This can also be true for your videos.

Aximmetry's Own Keyer: the Advanced B Keyer

Aximmetry comes with several built-in chroma keyers, but the latest and most recommended is the Advanced B, therefore, in this document, we are going to describe how to set up keying using the Advanced B Keyer.

Usage

There are several ways of implementing this compound into your workflow, but here we will discuss the most frequently used and convenient way, and this is with the Tracked or Virtual Cam compounds. These compounds come with keyers built-in. If you are interested in how you can use the keyer compounds in the flowgraph, please refer to the end of the article or click here.

For easy use, you can reach the keyer functionality through the KEYER panel in the BILLBOARDS control board, if you have added any of these cam compounds to your project.

Select the ADVANCED B keyer in the KEYER TYPE.

General Information

This keyer was designed to achieve the best result with high-quality green (or blue) screen input.

Because of this, it is very sensitive to any kind of imperfection. Noise and compression artifacts degrade the quality heavily.  If you want to cut out shadows then strong shadows will also degrade the quality.

The parameters of the keyer have to be set very precisely, so we strongly suggest using a keyboard, but you can also hold the shift or 'CTRL + shift' keys while adjusting the parameters with your mouse for small step adjustments.

Also, setting up the keyer on a video being played or a moving talent (if there is a live input) is very difficult, so it is best to freeze the input.

Generally, semi-transparent parts need more attention, so, for example, try to freeze the video where the hair of the subject is more fluffy. Of course, the more frames you check the keying on, the better the overall result will be.

Cropping

Parts of the image – that are not covered with green screen and you don’t want them to be visible in the final composite - have to be manually cut. You can use the CROP panel to easily achieve the desired manual cut. Please note that this option is only available if you have used a VirtualCam compound.


If you use a TrackedCam compound, you will have to set up a mask using the STUDIO panel.

The reason for this is that you can easily crop a pre-recorded video or live input for a stationary camera, but we use a different method for cropping when the TrackedCam compounds are used.
For details on how to set this up, please refer to the Studio setup article.

Output Types

You have to select Keyed in the MONITOR control board to be able to precisely set up the keyer.

This is how the MONITOR panel looks like if you are using a VirtualCam compound:

and a TrackedCam compound:

The keyer comes with different integrated views which will provide help during the setup. You can change between these views with the MonitorMode property.

When changed, both the preview and the program output will show the selected Monitor Mode.

While you set up the keying, it is best if you watch the Monitor output and change the Monitor Mode type depending on what you are currently setting. We will provide suggestions for this.

However, keep in mind that the Final output is the one that ultimately should look good. So check that regularly as well.

Keying Setup

To reach all of these adjustments, please make sure that the KEYER control board is selected.

Selecting the Background

Background Color

The current version can handle only blue or green background types.
Once you set the background color or the background image, the system will automatically detect if you have a green or a blue screen.
Before selecting a Background Color, you have to change the Keyer's Monitor Mode to Input, so you can easily pick the proper background color from the preview monitor.

You can set a single color (Background Color) that represents your green or blue screen the most.
If you click the small colored rectangle in the Background Color pin value, the color picker tool will pop up.

 This provides all the necessary tools to properly select the background color. The most helpful might be the pick color tool.

You can then pick the background color from (for example) the Preview window.
Generally, you can achieve better quality if the green that you pick is closer (but not too close) to parts of the subject that are semi-transparent (e.g. hair). Similarly, if you feel that the quality of some parts of the image is not that good you can try to pick the green (or blue) around that area. If you hold down the CTRL key while using the eyedropper tool, you can select the average of a bigger area, and if you hold down the Shift key, the average of a smaller area.

Clean Plate

If you want to achieve the best quality with a stationary (untracked) camera, then you should set a Clean Plate.
Clean Plate is an image that only contains the green screen, but not the subject(s). It can contain static objects as well (like a table for example).

Change the KEYER TYPE to CLEAN PLATE GENERATOR.

You can TRIGGER the image capture for the Clean Plate Generator to create the image. The talent should not be in the image at this point.

This will create a CleanPlate folder inside your current project folder and place the snapshot of the Clean Plate in this folder. If you turn On the Use Clean Plate option in the Advanced B keyer, the last captured image file will be used as the clean plate.

You can also select your own or other files.

An example of a clean plate:
advbkeyer image007.jpg

If your green studio contains static elements, like a table or fixed seats, Aximmetry can help you create a clean plate

For this, you have to turn Off the Pure option.

The Threshold and Erode pins will help you adjust the clean plate.

The green background should not change at all (or as little as possible), but the objects in the foreground should disappear.

A correct example of the clean plate should look like this:

As you can see in the picture (Marked in red), the chairs on the green screen almost completely disappeared.
While the details, like the creases (Marked blue) of the green background, as still intact.

Example of an incorrect clean plate:

In this image, you can notice the bottom middle is washed up and missing all the details of the green screen. This is incorrect.

Changing back to the Advanced B keyer, with the Use Clean Plate property, you can decide which one you want to use (solid background color or clean plate image).

3D Clean Plate

Using a Clean Plate with tracked camera(s) requires a different approach than stationary cameras. As the green screen can be viewed from any position, the clean plate must be in 3D.
You can read more about 3D Clean Plate generation here: Using the 3D Clean Plate Generator

Low Cut

If you have some artifact that remains in the scene, then you can try to eliminate that with this parameter. But be careful! Even the slightest increase in this value will severely degrade the quality of the soft shadows.

NOTE: If you check the result with a full white background (Monitor Mode White Comp) sometimes the shadows will look unnatural and often very noisy. This parameter can help you decrease these problems, but please check with your final composite, before you try to fix that.

If a clean plate is used or the green has very good quality then this value typically is around 0.1. For a not-very-good green (when a clean plate can't be used) it can be as high as 0.3, but in this case, soft features (like hair) will be compromised a little bit. If you have to change it to higher than 0.3 then we recommend considering adjusting or changing either the studio lights or the green screen.

High Cut

If you change to the Matte Monitor Mode then you will see the final alpha.

For example:

advbkeyer image013.jpg

In most cases, the subject will not be perfectly opaque.

With the High Cut property, you can fix this.

Start to decrease it with 0.01 steps until you see something like this:

advbkeyer image015.jpg

In the above case, the value is set to 0.9.

It is still not perfectly opaque, but in most cases, it will not be noticeable in the final composite. (In fact, it is possible that even with the default value some will not notice the imperfection)

What happens if we set this value too low?
Semi-transparent objects (like hair or glass) become opaque with a weird color and the subject will start to look like somebody cut him or her out with scissors from a newspaper.

For most cases, a value between 0.8-0.9 gives the best result. If you have to set it to less than 0.8 it means your talent reflects too much green. For example, he/she wears white clothes, metal accessories, etc. (If you are looking at the raw input, you won't realize this, since the human brain is compensating because of the green surrounding.) Please consider changing his/her wardrobe in this case. Alternatively, if you have a big green, you can move the talent further from the back wall, this can also help decrease the green spill.

Despill

Even if the aforementioned wardrobe changes are not necessary, the spill effect can be still present, and you would easily notice it on the talent on the keyed-out image if it wouldn't be handled. 

The keyer however automatically tries to fix any green or blue color spilling.

With this parameter, you can fine-tune it, but in most cases, you don’t have to change this value.

In a few cases, however, this property can increase the quality of the colors, especially if your talent is wearing orange or yellow.

Despill Red/Yellow

Default value: 0.5.

If the skin of your talent seems a little bit green, increase this value. (0.6 is a typical value if there is a lot of bouncing green light in the studio)

If your talent is wearing orange, but on the keyed image it appears yellow, increase the value. This will add some red to your colors, making it appear more orange.

If your talent is wearing yellow, but on the keyed image it appears orange, decrease this value. (This can however make the talent look more green that you can try to fix with the help of the adjuster panel).

What happens if you set this too high?
The subject starts to become pink.

Despill Blue/Cyan

Default value: 0.5.

If your talent is wearing cyan, but on the keyed image it appears light blue, increase the value. This will add some cyan to your colors, making it appear more like cyan.

If your talent is wearing light blue, but on the keyed image it appears cyan, decrease the value.

What happens if you set this too high?
The subject starts to become purple.

Another Usage of Despill

The color of a fast-moving (motion-blurred) object sometimes becomes distorted. It becomes green or blue. You can try to increase one or both values slightly in order to decrease this discoloration. Unfortunately (in the case of motion blur) this parameter can’t always fix this issue in fact it can create so many artifacts that the overall quality of the picture becomes worse.

We suggest using the Gray Comp MonitorMode for this setup.

Typical values are between 0.5-0.6.

Here is an example of where the Red/Yellow property could help.

With the value 0.5:
advbkeyer image017.jpg

With the value 0.55:
advbkeyer image019.jpg

Here is an example where it couldn’t help:

With the value 0.5:
advbkeyer image021.jpg

With the value 0.55 (the green was removed but an unnatural edge appeared):
advbkeyer image023.jpg

Edge Color Corr Width

In some cases, an edge with unnatural color appears around the subject.

With this property, you can try to eliminate this problem.

Start to increase the value step by step until the edge disappears. Be careful though this can cause heavy artifacts to appear in some cases, so try to set the absolute minimum here. You often have to make some compromises with this setting.

What happens if you set it too high?
The edge (or even the inner part) of the subject becomes extremely distorted. Watch the parts carefully, where the color of the border of the subject changes.

Sometimes the edge is dark. This is more visible with a bright background. Sometimes the edge is bright. This is more visible with a dark background. We suggest using White Comp, Grey Comp, or Black Comp Monitor Mode for this setup, depending on the brightness of your final composite.

Typical values: 0-0.4 In some circumstances, even 1.0 can work (and will not generate noticeable artifacts).

Here is an example:

NOTE: The edge distortion on this example is much less prominent with a brighter background (even with a gray background).

With the value 0:
advbkeyer image025.jpg

With the value 1:
advbkeyer image026.jpg

Threshold

The Threshold is used for scenarios where there are more shades of greens used in your green setup.

But be careful! Even the slightest increase in this value can degrade the quality of the soft shadows.

The default value of the Threshold is zero and you can increase it with 0.01 steps.

What happens if you set the value too high?
First, the semi-transparent part of the subject will disappear. Later the whole subject will disappear.

Typical values: 0.01-0.07. In extreme cases, it can go up to 0.2-0.3.

In this example, you can see the difference between the shades of greens:

With the value 0.08, we were able to create this look:

Only use the Threshold setting if it is absolutely necessary.

NOTE: You can only use Threshold for this case if the value of Shadow Zone is 0.

Filter

You don’t have to change it.

Keying with shadows

It is also possible to keep the original shadows when keying, but you will need a good green screen setup. Using a clean plate will also improve the overall quality.
If you would like to read about the prerequisites of a good green screen setup, please refer to the document below:

Shadow Zone

NOTE: In order for Shadow Zone to take effect, you have to specify a value higher than 0 for the Threshold.

Using the Shadow Zone property you can define an area where you want to keep the shadows. This area is applied to the 'cropped' video input. You can set this by increasing the value of the Shadow Zone. 0.01 means the bottom 1% of the video, and 1 means the whole video.

When the Shadow Zone is applied Threshold changes the way it works.

Threshold

If the Shadow Zones value is higher than 0, you can use the Threshold to apply correction to the shadows you kept in the keyed video. The shadow's color is brownish by default, by increasing the Threshold value, you can turn the shadows to black.

For setting up keyed shadow we suggest using the White Comp Monitor Mode since you can see the shadows clearly. When setting up the keying it is easiest if the talent raises his or her leg, while monitoring the shadows closely.

In this example, we would like to keep the shadows next to the talent:

How it looks like using white comp:

Using Shadow Zone and Threshold together:

As you can see we were able to get a perfect keying, even when keeping the shadows. Aximmetry even blends the real shadows with the Ambient occlusion.

Possible Problems

There is Color Distortion Around the Border of the Character

Try to use as much color information in your video as you can. 4:2:0 chroma subsampling is not ideal. Use at least 4:2:2, but the best would be 4:4:4.
NOTE: In the current version of Aximmtery, we can’t process 4:4:4 SDI input (only 4:2:2), but this might change in the future.

Flickering Around the Border of the Subject

It is most probably caused by the noise of the input. In the keyer, the only thing you can do is use the filter options. This will, however, degrade the overall quality so try to avoid using it. You can try to pre-filter the input with a denoiser, but in most cases, denoisers are trying to reserve edges, so it will rarely help with issues around the edges (border). The best thing you can do is reshoot the video. Adding more light to the scene usually decreases the noise radically.

The Fluffy Parts of the Hair are Flickering

In many cases, it is caused by some compression artifact. The video compressors are designed to eliminate parts of the images that are less visible to human eyes. These “less visible” parts however still contain very important information if the image is processed via a computer. Without this information, it is not possible to do a good keying.

You can try to use less compressed video or a different compressor. Video compression artifact removal tools can sometimes help too.

A Sharp Cut in the Hair

Probably the Threshold value is too high and it cuts out one part of the hair. Unfortunately, you can’t always decrease the Threshold, because it is possible that this will introduce unwanted artifacts.

The only thing that you can do is you increase the Low Cut. The cut will remain, but it will be less sharp.

The Border of the Subject is too Sharp

The closer the Low Cut and High Cut values are to each other, the sharper will be the border of the subject. This will create an unnatural look on the hair. Unfortunately not much can be done about this other than changing the light settings. High Cut has to be set too low if there is too much green (or blue) color spilling overall on the subject. Try to use less reflective clothes or use more fill light. The Low Cut has to be set too high if either a very dark shadow has to be removed or the green screen contains darker regions and no clean plate was used. In the former case, try to use more diffuse light sources. In the latter, try to use a clean plate.

The Border of the Subject Became Very Jagged

If the Low Cut and High Cut values are extremely close to each other, then the border will be jagged.

However, sometimes the jaggedness became so bad as if somebody cut the resolution of the video in half. This happens because the chroma information was not correctly interpolated. The best option you have is to use a different codec if it is pre-recorded footage. If it is a live input, then check the camera settings and make sure that the chroma subsampling is higher than 4:0:0.

Keyer Uses too Much GPU Time

As you Crop the image the calculation becomes faster, so try to Crop the image until only the necessary parts are left. If cropping the image is not enough, then you can try to adjust the Threshold value. After you set the Low Cut you can often increase the Threshold without decreasing the quality (until a certain point). Try to increase the Threshold. When you see some quality degradation, try dialing it back a little bit.

Too Much of the Hair is Cut Out

Using a clean plate can help with this. If you use a solid color for the background, try picking a color around the hair (just be careful to not pick too close). Also, more hair detail can remain if you don’t cut out the shadows.

Using the keyer compounds in the flowgraph

Keying is possible independently from the Tracked or Virtual Cam compounds, by using the keyer (and their auxiliary) compounds, found in [Common_Studio]:Compounds\Keyers\.

The Tracked and Virtual Cam compounds incorporate the Keyer__All compound, therefore, by dropping it into the flowgraph and selecting it, you'll have the same keyer options as the Tracked and Virtual Cam compounds have.

When a video is connected to its Video pin, the Out pin will produce a keyed video with those settings set on its Pin Values.

On its Monitor pin, you can see the image corresponding to the Monitor Mode set on its Pin Values. E.g. when you set the Monitor Mode to Matte, you will see the Matte on the Monitor pin.

If you specifically want to use the Advanced B keyer, you can use the Keyer_Advanced_B compound instead, which works the same way.

Continue to the Next Step

Once you finished keying your video input, you can move on to the next step.

Please continue here if you are following the Virtual Camera Workflow: Setting Up Billboards in Virtual Camera Compounds

Please continue here if you are following the Tracked Camera Workflow: Studio Control Panel

Article content

Loading
Close
Loading spinner icon
1/10