Tip:
Highlight text to annotate it
X
In
this movie, we're going to take a look at why it's very important to convert
all incoming images to linear light space and we'll also take a look at the color
management workflow within Nuke. Earlier, we heard that images need to be in
linear light space for the mathematics to come out right of the image
processing. So, why do we have to convert all the images
that we load into Nuke into linear light space? Aren't they already linear?
Well, the answer is no. Most images are not truly linear. Most of
them have a baked in gamma correction and they're really a gamma-corrected linear
image. This illustration will show you what's going
on. Let's start here with picture number 1 and
let's say that this is the display intent here.
This is what the picture should look like on your monitor.
If you were to put that image data on a CRT, the gamma of the CRT is shown here
by this curve, the gamma is a darkening effect that the CRT has because it's
not a linear display device and it will darken the image down like you see here in image
2. So, what's done universally is a gamma correction
is applied to the image like this, which compensates for the monitor, making
the image brighter like this. So, the image is pre-brightened by a gamma
correction to exactly offset the darkening that the monitor's going to do.
The result is over here image 4, the monitor display, and we wind up with a
reasonably linear looking image. So, as you can see, so-called linear images
are really gamma-corrected linear images and have the gamma correction baked
into the pixel data. So, Nuke has to back that out to convert them
into a true linear light space. Now you might be thinking "why I work with
a flat panel display, so I don't have CRT gamma."
Well, the problem is that industry standards are all flat panel displays, even
though they don't really have a gamma problem like a CRT does,
this gamma is built into the display so that it will replicate the behavior of a CRT.
This is done so the images will look the same whether they're on a CRT or a
flat panel display. So, even though you're using a flat panel
display, your pictures are still being darkened by this gamma curve.
We can get an overview of the entire Nuke color management workflow with this flow graph.
Starting here on the left, the Read node linearizes the images, converting them
all to linear light space by applying a gamma correction LUT to it here.
Then all of the images being in linear light space, they're correctly composited,
the math is done right and everything is mathematically correct.
When the linear image is set up to the Viewer, there is a LUT applied to the
Viewer in order to make it look right on your monitor.
When you're done with the composite, the linear image is sent to the Write node
and the Write node applies a gamma correction to it just as it's written out to disk.
This is done so that the gamma corrected image will look right on the next
monitor or workstation. Now let's go back and take a close-up look
at this Read node action right here. Here are three Read nodes.
If I open up the Marcie.tiff file, this is an 8 bit tiff image.
Notice that Nuke has detected the color space as an 8 bit TIFF and has applied
an sRGB gamma correction to it to linearize it.
If I select this EXR image, Nuke has detected that and has applied a linear
color space correction to it. In other words, there's been no change to
that image. And if I select the Cineon image, Nuke has
detected that and applies the Cineon LUT in order to linearize that image.
So, the Read node detects what type of image it is and converts everything
to linear light space. Of course, you don't have to accept the default
LUT that Nuke assigns. You can use this pop-up and select any other
LUT you want. And we'll see shortly where LUTs are defined
in Nuke. Now let's take a look at the Viewer and the
Viewer LUT. I'm going to expand the Viewer to fill the
whole frame again and here's the Viewer LUT pop-up right here.
This is where you select which LUT will be used in the Viewer.
Keep in mind, this correction is applied only to the Viewer and the original
linear image is untouched. sRGB is the default, which is typical for
a workstation monitor, and you get a curve that looks like this.
If I turn it off, you can see we're looking at the linear image and it's way too dark.
So, you can see now what this Viewer LUT is doing to brighten the image up.
Remember, earlier we talked about brightening the image up with a gamma
correction so it look right on the monitor. There it is.
You could also choose the rec709 LUT, which would give you a rough approximation
of a broadcast monitor. If you want to connect a real broadcast monitor
to Nuke, it'll require a special video card.
Setting the Viewer back to its normal size, we'll take a look at the Write nodes.
To show you how the Write node works I'm going to clear the Properties bin first.
So, we start with the Marcie 8 bit tiff image. We do all of our compositing operations in
linear space, and now in the Write node we are getting ready to write it out to disk.
Nuke will decide what kind of color space LUT to use depending on the type of
file name that you use. So, let's say I'm going to write Marcie out
as a TIFF image, so I'll type marcie.tiff and I'll say save and look what
Nuke has done. Saiid file type is TIFF. It looked at this extension.
It said the file type is TIFF, the data type is 8 bit, so the color space gamma correction
it's going to use is the sRGB and of course, you can change that if you wish.
If I had said that this is going to be a Cineon image, it would say file type is
Cineon again, looking at the extension. It would say the file type is Cineon and the
color space correction LUT it would get is the Cineon.
If I said that this was going to be an EXR image and Nuke would detect that with
the file type and would use a linear LUT. So, Nuke looks at the file name extension
you apply to your files in order to determine what the output LUT should be.
So, to summarize Nukes' color management workflow, we'll expand the Viewer to
fill the frame, the Read node backs out all baked in gamma corrections to
restore the image to a true linear light space. Nuke performs all of its computations on the
linear light version, the linear version goes to the Viewer where it gets a
Viewer LUT to make it look nice and then the linear light version goes to the
Write node, which assigns a gamma correction just as it writes it out to disk.
In our next movie, we'll take a look at the LUTs that Nuke uses for all of
its color management.