Chroma Plug-in Documentation
Introduction
The Chroma Plugin is a chromakeyer that generates a foreground matte using images shot against either blue or green screen. There are a number of stages to getting a good result which are described below.
Installation and first steps
To install, download the plugin package, which is a zip file, and unzip it. Copy the "chroma" folder to a location within your Brainstorm install (typically the best place is "C:\Program Files\Brainstorm\share\plugins\chroma".
Within eStudio add the chroma.dll by double clicking it in the desktop.
Create a new item in the chroma plugin.

Now select the material on which you have the video-input texture (you can use any kind of texture in fact).
Mode
To make it easier to understand how the mattes are being generated the you can select one of the modes to get diagnostic views of different parts of the keying process. The various modes are:
The Normal mode is the default that produces a composite image
The Foreground mode shows the foreground keyed over a light and dark grey checkboard to help you see the keying against a neutral background.
The Despilled mode shows the foreground with the effects of despilling (see below).
The Matte mode shows the greyscale matte that will be used and the alpha channel in the final composite.
The Matte Colour mode is designed to highlight details that are hard to detect in a grayscale image. The colours are blue (for 0) and yellow (for 1) with the values between displayed as fade between red to green. The important aspect of these colours is that you can see when a value is exactly zero instead of almost zero.
The Split mode shows an image split diagonally between the origional foreground and the final composite image to help you check the integrety of the unkeyed foreground.
Matte

To set up the foreground matte, the first stage is to raise threshold until you get a blocky matte at roughly the right point. The threshold is a sharp cutoff between what is foreground and what is background.
Then soften the cutoff by raising softness until the edge is softer, but not so much as to drop the matte below 1 inside the object (see the matte colours to check).
The matte can then be eaten into more effectively by adjusting gain and bias. To eat into the object, decrease bias below zero. As well as the matte shrinking, it will also drop below one (see colours), so increase gain to restore it. Between these two variables, you can control the sharpness and position of the edge.
The matte is based on the difference between, for example, the green channel and a combination of red and blue. For most cases the red channel gives better results, but in some cases you may want to adjust the balance between red and blue. The colour balance variable lets you do this.
Despill

The next task is to remove the unwanted light that has spilled onto the object from the screen. This will improve the edges and remove the colour wash over the whole object.
This is done by adjusting the component (blue or green) of the screen in relation to the other two. It's important to realise that it is not theoretically possible to get an truly accurate solution to the spill problem, just acceptable approximations.
To adjust the despill, use diagnostic mode three. Adjust despill factor to one. Then adjust despill balance to select a look that seems closest to reality. Then back despill factor down from one if required.
There is one extra variable, despill edges, which controls the darkening of pixels around the matte edge. It's aim is to reduce bright edges over dark backgrounds. Generally eating a little further into the matte will produce better results.
Composite
Finally when you select the Normal mode everything is put together, the output of the shader is the despilled colour with a matte in the alpha channel.


















