Join Steve Wright for an in-depth discussion in this video Basic compositing, part of Nuke 6 New Features.
Keylight is a color difference keyer developed by the computer film company that is distributed and supported by the Foundry and is now available for Nuke. We'll start by setting up a basic composite. You can pull in these two elements from our Keylight media file. So, we'll select the green screen boy, come up to the Keyer tab, and select the Keylight node. Keylight hooks into the source input, which is where the green screen goes, and then we hookup the BG input to the background.
The first step in Keylight is to tell it what the backing color is, what they called the screen color, and here is the screen color here. First, we turn on the eyedropper, make sure that's turned on, and then in the Viewer, Command+Click to select the color. Now, Keylight is twitching, because it's actually sampling the output of Keylight, which is being changed based on my selection. So, we have to use the Nuke keys Alt+ Command in order to sample the incoming image that is directly off the source image right here, okay.
Of course, if we want to sample a box, we'll do Shift+Alt+Command like this. Of course, if you are using a Windows machine or a Linux machine you'll be using Ctrl instead of Command. When you select the screen color, you are selecting a single RGB value, even if you use the sample rectangle. It's simply taking the average of all the pixels inside the rectangle. Now, to make sure that you don't disturb your selection you can turn the eyedropper off and that way you won't accidentally change your screen color.
So, when you first start, the View is set to the Final Result and this is Keylight speak for the premultiplied output. If you want an Unpremultiplied Output, you would turn this on. Let's take a look at the View popup menu. There are a lot of different views here. The Source is the incoming green screen image. The Source Alpha means show me the alpha channel of the incoming green screen image. Now here there is an issue. That is not the alpha channel.
If we hook the viewer directly up to the green screen and then switch the viewer to the alpha channel, you can see this is a typical three channel green screen image with a black alpha, but yet somehow Keylight thinks that it is white. Okay? So, if the source input has no alpha. Keylight will tell you the alpha channel is white. However, if the incoming image is a four channel image, and I'll fake that here by putting this in line, I've now added a real alpha channel with some content.
Keylight sees that and passes it through correctly. But if it's a three-channel image, just remember Keylight will tell you it's white when it's not. The next view we'll take a look at is the Screen Matte. The Screen Matte is in fact the matte that is created by Keylight, and there are lots of other things to see in the viewer. For example, the Inside Mask and Outside Mask, these are the holdout and garbage masks which we'll take a look at later. The Status is a very interesting and important view.
The Status sorts all of the pixels of the matte into three categories: 100% solid or white, 100% transparent or black, and everything else, all the semitransparent pixels, are simply set to 50% gray. This is a diagnostic view that will help you later. We'll see how. The Final Result as we saw before is the premultiplied output. Don't forget about the Unpremultiply option, and then there is of course the Composite.
In the next video we'll learn about the Screen Controls.
Nuke 6 New Features was created and produced by Steve Wright. We are honored to host his material in the lynda.com Online Training Library®.
- Exploring NukeX
- Working with the new paint tools
- Using the Clone and Reveal tools
- Reviewing the Keylight matte controls
- Creating Keylight holdout and garbage mattes
- Performing multipass keying
- Working with mattes in Ultimatte
- Creating specialized keys
- Drawing and warping splines
- Exploring the MotionBlur2D and ZBlur nodes
- Navigating the Dope Sheet
- Making gizmos