Color Manipulation Building Blocks
Color correction is a somewhat intuitive process. Often compositors just try something until they get it right. Understanding the math behind color correction can help you pick the right tool for the job when you’re attempting to reach a specific result—which is better than trial and error. TABLE 4.1 explains most of these building blocks.
TABLE 4.1 Basic Color Correction Functions
Math Function |
Node |
Explanation |
Names in Nuke |
Other Known Names |
Add |
Add, Grade, ColorCorrect |
Adds a constant value to a channel. |
Add, offset |
|
Multiply |
Multiply, Grade,ColorCorrect |
Multiplies the channel by a constant value. |
Gain, Multiply |
Brightness, Contrast, Exposure, Input/Output White |
Gamma |
Gamma, Grade, ColorCorrect |
Applies a gamma curve to a channel. |
Gamma |
|
Contrast |
RolloffContrast, ColorCorrect |
Applies a contrast curve to a channel. This is also a form of multiplication. |
Contrast, RolloffContrast |
|
Lift |
Grade |
This function is similar to Multiply and Contrast. It’s a contrast curve with a center at white. More later in this chapter. |
Lift |
Pedestal, Input/Output Black |
Lookup |
ColorLookup |
Applies a user-defined curve to a channel. |
Colorlookup |
Curves |
Saturation |
|
Adjusts the color intensity by reducing the differences between the RGB channels. |
Saturation |
|
Dynamic range
When dealing with color correction, I usually talk about dynamic range and its parts. Dynamic range means all the colors that exist in your image, from the darkest to the brightest color. The dynamic range changes from image to image, but usually you are working with an image that has black and white and everything in between. The parts of the dynamic range, as mentioned, are split according to their brightness value as follows:
- The shadows or lowlights, meaning the darkest colors in the image
- The midtones, meaning the colors in the image that are neither dark nor bright
- The highlights, meaning the brightest colors
In Nuke, and in other applications that support colors beyond white and black (float), there are two more potential parts to the dynamic range: the super-whites and the sub-blacks.
Let’s look at these building blocks in several scenarios to really understand what they do and why you might choose one over another.
- Launch Nuke.
- Bring in a clip called car.png by pressing R and navigating to the chapter04 directory.
Click Read1, then press 1 on the keyboard to view it.
It’s an image of a car. Did that catch you by surprise?
With Read1 selected, go to the Color toolbox and click Add in the Math folder.
You have now inserted a basic color-correcting node after the car image. Let’s use it to change the color of the image and see its effect.
In Add1’s Properties panel, click the Color Picker button to display the In-panel Color Picker. Play with the R, G, and B colors to see the changes (FIGURE 4.1).
FIGURE 4.1 Using the In-panel Color Picker
You can see that everything changes when you’re playing with an Add node—the highlights, midtones, and even blacks (FIGURE 4.2). An Add operation adds color to everything uniformly—the whole dynamic range. Every part of the image gets brighter or darker.
FIGURE 4.2 The whole image is becoming brighter.
- When you’re finished, close the In-panel Color Picker.
- Select Read1 again and branch out by holding the Shift key and clicking a Multiply node from the Math folder in the Color toolbox.
- While Multiply1 is selected, press 1 on the keyboard to view it.
In Multiply1’s Properties panel, click the Color Picker button to display the In-panel Color Picker and experiment with the colors (FIGURE 4.3).
FIGURE 4.3 The changes affect the highlights more than the rest of the image.
You can see very different results here. The highlights get a strong boost very quickly whereas the blacks are virtually untouched.
Repeat the previous process for the Gamma node. Remember to branch from Read1 (FIGURE 4.4).
FIGURE 4.4 The midtones change the most when you’re changing gamma.
You can see that gamma deals mainly with midtones. The bright areas remain untouched and so do the dark areas.
You should now have three different, basic, math-based color correctors in your Node Graph that produce three very different results, as shown in FIGURE 4.5.
FIGURE 4.5 The results from changing Add, Multiply, and Gamma
Your DAG should look a little like FIGURE 4.6.
FIGURE 4.6 Branching three color correctors from a node
Let’s try some more color correction nodes.
- Select Read1 and then Shift-click RolloffContrast in the Color toolbox to create another branch.
While viewing RolloffContrast1, open its Properties panel and play with the Contrast value (FIGURE 4.7).
FIGURE 4.7 A high contrast value produces a high contrast image.
You can see how, when you increase the contrast above 1, the lowlights get pushed down and the highlights are pushed up.
Keep the Contrast property above 1 and bring the Center value down to 0.
The Center property changes what is considered to be the highlight or lowlight. Colors above the Center value are considered bright and are pushed up, and colors below the Center value are considered dark and are pushed down.
Now you can see that the result of the RolloffContrast operation is very similar to that of the Multiply node. In fact, they are virtually identical. When setting the center value at 0, you lock that value in place. The value 0 is locked in place when you’re multiplying as well.
- Bring the Center value up to 1.
You haven’t gone through an operation called Lift yet, but the RolloffContrast operation is virtually the same as that operation. With Lift, the value 1 is locked in place, and the further the values are away from 1, the bigger the effect. You will go through Lift when you learn about the Grade node later in this chapter.
To wrap up this part of the color introduction, here’s an overall explanation:
- When dealing with color, usually you need to control the lowlights, midtones, and highlights separately.
- The Add operation adds the same amount of color to every part of the dynamic range.
- The Multiply operation multiplies the dynamic range by a value. This means that a perfect black doesn’t change, lowlights are barely touched, midtones are affected by some degree, and highlights are affected the most. It is good to mention that a Multiply operation is virtually the same as changing the exposure in a camera or increasing light. It is the most commonly used color operation.
- The Gamma control is a specific curve designed to manipulate the part of the dynamic range between 0 and 1 (black and white, remember?), without touching 0 or 1.
- Contrast is actually very similar to a Multiply, but has a center control. If you place the center point at 0, you get a Multiply node.