The IBK keyer differs from many other keyers in that, instead of using a single color picker, it uses an input image (a clean plate with just the color variations of the background) to drive the key. This generally gives you good results when working with uneven blue- or greenscreens.
The IBK keyer consists of two nodes: IBKColor and IBKGizmo. IBKColor creates the clean plate from the blue- or greenscreen image, and IBKGizmo pulls the key.
NOTE: The output from IBKGizmo is a premultiplied image with an alpha channel - it does not composite the foreground over the background. To perform the composite, connect IBKGizmo to a compositing node, such as Merge.
NOTE: Pre-rendering output from IBKColor to some formats can result in loss of color information and incorrect results when the image is used as input to IBKGizmo. We recommended that the .exr format is used for pre-rendered images as it supports full float data, reducing loss of information.
Connection Type |
Connection Name |
Function |
Input |
bg |
The background image. This is used in calculating fine edge detail. |
c |
Either: • An IBKColor node. This creates the clean plate (that is, takes the color that is keyed out and creates a smoother representation of that). • A clean plate that was shot on location. This is more accurate than using an IBKColor node, but in most cases a clean plate isn’t available. If you have set screen type to pick, you do not need this input. |
|
fg |
The blue- or greenscreen image. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
IBK Tab |
|||
screen type |
st |
C-blue |
Set this according to the screen type in your foreground image: • C-blue - select this if your foreground image is a bluescreen image and you want to use the c input (a clean plate) to drive the key. • C-green - select this if your foreground image is a greenscreen image and you want to use the c input (a clean plate) to drive the key. • pick - use the color picker below to replace the c input with a single color. This way, the IBK acts more like a traditional keyer, such as Primatte. |
color |
color |
0, 0, 1 |
If you’ve set screen type to pick, use this control to pick a color that best represents the area you are trying to key. |
red weight |
red_weight |
0.5 |
Sets how the red channel is weighted in the keying calculation. This affects the hardness of the matte in primarily red areas. If you check screen subtraction and view the output, you often see discolored edges because the background hasn’t been fully removed from the original plate. This is not spill but the result of the matte being too strong. Lowering one of the weights will correct the edge of the foreground object in that color. For example, if a red foreground object has an edge problem, you should lower the red weight. This may affect other edges, so it’s often a good idea to use multiple IBKGizmos with different weights split with Keymix nodes (Merge > Keymix). |
blue/green weight |
blue_green_weight |
0.5 |
Sets how the blue or green channel is weighted in the keying calculation. This affects the hardness of the matte in primarily blue or green areas. If you’re using a bluescreen, this controls the green weight. If you’re using a greenscreen, this controls the blue weight. If your foreground and background are opposite extremes in color (for example, yellow on saturated blue), you need to take the weight all the way down, making everything transparent. |
luminance match |
lm_enable |
disabled |
Adds a luminance factor to the keying and helps to capture transparent foreground areas that are brighter than the background. You can also use luminance match to lessen some of the screen area noise if you lower the screen range. However, pushing this control too far will eat into your foreground blacks. You can use this to firm up the alpha channel in the lighter areas. |
screen range |
level |
1 |
Lower this until it stops changing the background. If there’s too much noise left in the backing region, you may want to degrain the footage before pulling the key. This may clear the noise from the backing region, but you may also end up hardening the edges of the matte. |
luminance level |
luma |
0 |
Allows you to control the strength of the overall effect. This is usually only effective in a small number of cases, generally you don’t have to adjust this. |
enable |
ll_enable |
disabled |
Check this to activate the luminance level control. |
autolevels |
autolevels |
disabled |
Can be used to reduce any hard edges from a foreground object with saturated colors. The same can be achieved with the weights, but the autolevels control affects only the saturated colors whereas the weights affect the entire image. When using this control, it’s best to have this as a separate node that you can then split with other IBKGizmos as the weights controls will no longer work as expected. If you actually have foreground colors you want to keep, you can check the equivalent color box to keep them. For example, you may have a saturated red subject against a bluescreen, which results in a magenta transition area. Autolevels eliminates this. However, if you have a magenta foreground object, autolevels makes the magenta more red. To keep the magenta, you need to check the magenta box. This control is especially useful for when you have supersaturated colors in your image. |
yellow |
yellow |
disabled |
Check this to prevent autolevels from changing saturated yellow in your foreground elements. |
cyan |
cyan |
disabled |
Check this to prevent autolevels from changing saturated cyan in your foreground elements. |
magenta |
magenta |
disabled |
Check this to prevent autolevels from changing saturated magenta in your foreground elements. |
screen subtraction |
ss |
enabled |
To have the keyer subtract the foreground from the RGB, check this control. To premultiply the original foreground with the generated matte, uncheck this control. |
use bkg luminnance |
ublu |
disabled |
To have the bg input affect the brightness of the edge, check use bkg luminance. These controls are best used with the luminance match enable slider. They can also help with screens that exhibit some form of fringing artifact - usually a darkening or lightening of an edge on one of the color channels on the screen. To offset the effect, grade the bg input up or down with a Grade node (Color > Grade) just before input. If it’s just an area that needs help, draw a Bezier shape (Draw > RotoPaint) around the area and grade the bg input up or down locally to remove the artifact. |
use bkg chroma |
ubcr |
disabled |
To have the bg input affect the color of the edge, check use bkg chroma. These controls are best used with the luminance match enable slider. They can also help with screens that exhibit some form of fringing artifact - usually a darkening or lightening of an edge on one of the color channels on the screen. To offset the effect, grade the bg input up or down with a Grade node (Color > Grade) just before input. If it’s just an area that needs help, draw a Bezier shape (Draw > RotoPaint) around the area and grade the bg input up or down locally to remove the artifact. |
Keying - Step Up to Nuke Tutorial 8 from The Foundry on Vimeo.
One important task of compositing is the removal of bluescreen or greenscreen. Nuke provides a wide variety of keyers for this task. I am going to go through several of these very briefly just so you have an introduction. I have brought in two pieces of footage to try this on. There is a greenscreen of the man that we used previously and there is also a still image of a house. It just has a bright sky and, even though there is no green or blue in this particular photo, you can still use keyer tools to attack the sky and remove it. You can reach the keyer tools through the Keyer menu.
I am going to start with the simplest one, which is called Keyer. Now, even though it doesn’t have a lot of options, it is great for certain circumstances like this. I am going to drop down the A pipe between the Merge and the Read node. The Keyer has several operations, one of which is luminance key, which is default. You can also target certain colors like green, or certain properties like saturation. We will leave it at luminance for now. There is also a graph here, which represents the operation values. For example, this graph represents luminance, as it runs from 0 towards 1, or the maximum. There are also four yellow bars here: A, B, C, and D. You can click-and-drag those interactively. Now B and C are overlapping at the start, but you can separate them. As soon as I move these, the alpha matte will start to be formed. Let’s go take a look at that. I am going to go into the Viewer and press the A key; there’s the alpha channel. What this signifies is any pixel with a luminance value between B and C becomes opaque. Any pixel value that had a luminance between C and D, or B and A, has a tapering value somewhere between opaque and transparent. So, in this situation, what I can do is move B and A towards the far-left, and then adjust C and D to make the sky mostly transparent. For example, what this means is any pixel with a luminance value over 0.9 becomes 100% transparent, or if a pixel has a luminance value between 0.8 and 0.9 has tapering transparency.
Let’s go back to rgb. Press the A key again, and there we go. Now, it doesn’t look like anything is happening right now. What you have to do with the Keyer is premultiply the alpha. So, I will select the Keyer node, right-mouse-button-click, Merge > Premult. Premult multiplies the alpha values by the rgb values. Once I add this, the sky is removed. Now I can test this further. I can hook something up to the B pipe of the Merge. For example, I can right-mouse-button-click, and go to Image > Constant. Constant will produce a solid color - I will hook that up to the B pipe. Then go to the color wheel for that node and pick a color, like light blue. The sky is gone and now the Constant appears in the sky area.
Let’s move on to some other keyers. I am going to go back to the greenscreen footage. Now, in fact, you can have more than one Viewer in any project. You can make a new Viewer at any time by going to the Viewer > Create New Viewer (Ctrl/Cmd+I). If you have more than one Viewer, you can switch between them by clicking the tabs. So now, we are going to work on this greenscreen. The first keyer we will try here is Keylight, so Keyer > Keylight. The Foundry writes Keylight and, in fact, it is available in other compositing packages like After Effects, the functionality is the same. It looks a little intimidating at the start because of all the inputs. What you have to do is plug the Source into the greenscreen, in this case, the A pipe into the output. Now there are many options you can adjust. I am going to adjust the basic ones you need to remove the greenscreen. The first thing to do is select the Screen Colour. You can click the swatch here, get the eyedropper, and go back to the Viewer. There are several ways to sample pixels with the eyedropper. You can Ctrl/Cmd+click or Ctrl/Cmd+drag your mouse. I will try the drag, so click+drag, let go - the screen color is sampled and you will see it right here in the swatch, and also beside the Screen Colour property. Let’s take a look at the alpha. Now, Keylight offers this View menu, which you can change from Final Result to Combined Matte. That’s what the alpha channel looks like, so right now there is some gray in the transparent area. What you can do is raise the Clip Black to erode that. What the Clip Black does is it looks for any pixel less than the slider and it makes it 100% transparent. There is also some gray in the white area. You can lower Clip White to make them more opaque, and now the matte looks pretty good. Once the matte looks good, you can return the View to Final Result. Now, to test that, I will disconnect the Constant over here, and plug it into the B pipe here. There we go, that’s pretty successful. Let’s try another keyer. I am going to disconnect Keylight, disconnect constant, and move that aside.
Now we will try Primatte. Primatte has been updated for Nuke 7, so now it’s even more powerful. In this case, I need to hook the fg or foreground to the greenscreen and then the output to the A pipe. Primatte has a very powerful button called Auto-Compute. If you click that, it will attempt to identify the screen color and remove it. In fact, it does a really good job right off the bat. Let’s see what the alpha looks like. I will press the A key again, and there it is. Again, there is some noise around the edges. Fortunately, Primatte offers a long list of operations you can use to clean up the matte. For example, I can switch this menu to Clean BG Noise. Now I will zoom in, and now, I can sample those pixels that are too gray. Another way to sample is to Ctrl/Cmd+Shift and draw a marquee box around the problem area that samples a whole bunch of pixels at once.
So now the edges are looking better, but there is still some gray on his jacket. We can then switch the menu to Clean FG Noise and then sample those pixels. Now that becomes more opaque. Let’s take a look at the rgb again. Press the A key - there it is. It looks pretty clean, however, there is a lot of green spill from the greenscreen in his clothing. In that case, I can go to Spill Sponge and sample those pixels to pull the green back out. There it goes. Now it’s not perfect yet, but you can see how quickly you can move the green. Let’s go ahead and plug in the Constant though and see what that looks like. Alright, let's move on to one more keyer. I will disconnect this one, move it aside.
Now we are going to try the IBKGizmo and IBKColor: two nodes that are designed to work together to tackle greenscreen or bluescreen. So Keyer > IBKColour and Keyer > IBKGizmo. Now, the connections here are a little bit more complicated. Basically, the 1 input for the IBKColor goes into the greenscreen, as does the fg for the IBKGizmo. Then the c, or color input pipe for the IBKGizmo, goes to the IBKColor node. Then the A pipe for the Merge goes to the output of the IBKGizmo. Let’s take a look at the options. The first thing to change is the screen type for the IBKColor node. It is set to blue by default, but you can change it to green. That looks a little funny here in the Viewer, but what I can do to see what the IBKColor node is doing is plug the Viewer into that node. Here, it’s targeting the color green; whatever color is not green it’s removing. Now the aggressiveness of the removal is controlled by the size slider. If I increase that, there is more averaging and there is fewer and fewer non-green colors. Let’s plug the Viewer back into the IBKGizmo. The color information is passed from the IBKColor node to the IBKGizmo node, which the IBKGizmo node turns into a matte. Now the first thing you need to do with the IBKGizmo is make sure the screen type is set to the same color, in this case, green. Let’s plug the Constant into the B pipe and put the Viewer back to the Merge node, and there we go - successful greenscreen removal.
Now, I know all of these keyers have numerous options, which we didn't talk about. This is just to give you a brief introduction and to show you there is a wide range of keyers to tackle pretty much any type of footage.
“Tears of Steel” footage courtesy (CC) Blender Foundation - mango.blender.org