Visualizing Color Operations Using the Sampler Node

From RMIT Visual Effects
Jump to: navigation, search

Having visualized the color ranges of the image and decide on what we should do with it (diagnosis), we should try to visualize the color calculation that will work upon it (prescription).

A good colorist will have a synaesthetic relationship to color adjustment: they will ‘see’ the adjustment that they make not just through its effect on the image but also in the shape of its mathematics. These are the shapes marked ‘thought forms’ in the table in the page on color operations and we can ‘summon’ them using the Sampler node in the following manner:

The Sampler node in action

First of all the Sampler node is placed below the image and click ‘Sample current frame’. It will present a set of three lines representing the R,G and B values that lay along a horizontal line with it's Y location determined by the little manipulation point marked ‘sampler’ in the Viewer window (the the sampler page for an example of this in action.

If we now place the Sampler node beneath a horizontal black to white Ramp (which is a grown up word for gradient) we then see in the Sampler node window a straight line with it's bottom point at zero and it's top point at one.

Familiar? This is pretty much what we see in the default view of the ColorLookup node and in Photoshop's Curves. This is because the value at the starting point of the sample is black (zero) and at the end is white (one) which gives us a straight line running up our graph. ColorLookup maps the change from black to white with the before values on the vertical axis and the after values on the horizontal axis. Its default is no change i.e. a straight line. So both nodes present the same shape but one is reflecting change and the other is effecting change.

Ramp values visualised by the Sampler node.

Now place a ColorLookup between the ramp and the Sampler node. Make a simple adjustment of any kind to the ColorLookup (command click on the curve to set a manipulation point). Press ‘Sample current frame’ in the Sampler tool again. Wa hay! Mirrored in the Sampler properties window is exactly the same shape that you drew in the ColorLookup! (below).

The Sampler node in action.

In the following sections, common color operations have been sampled using this method.

The color operations visualized

Add

This node affects all values within the image in the same way: literally adding to them. Positive values will brighten all parts of the image. As a stand alone color manipulation it is of limited use, though it is ideal for lightening the blacks of distant objects.

Below is visualized an add value of 0.25. It's effect upon a black to white Ramp can be seen: blowing the light grey values into white, and the blacks into dark grey.

An add operation visualised.

Multiply

Nuke's Multiply node performs a simple multiply operation. It can be used to brighten or darken an image, or to fix a color cast. In maths, Multiply has no effect upon zero (black). Hence, the Multiply node will have no effect upon the blacks of an image.

Below' is visualised a multiply value of 0.5. It's effect upon a black to white Ramp can be seen: lightening light values to the point where they blow out to white, and ignoring black.

A multiply operation visualised.

Lift

There is not an explicit lift node in Nuke’s tool set, but lift as a value is present in the Grade node and is a common color manipulation term. Lift is the opposite of Multiply as it leaves the whites alone and brightens the blacks.

A lift operation visualised.

Gamma

This raises or lowers the middle-ish point of the color curve. The default value is one, with smaller numbers darkening the lower registers and higher numbers lightening them. There is a Gamma node but I find that stand-alone gamma adjustments are best done using ColorLookup so as to give you flexibility over where the ‘grab point‘ of your curve is. Both ColorCorrect and Grade have built in Gamma value sliders.

Below left: a gamma value of 0.5 pushing the middle values darker. Below right: a Gamma value of 1.5 pushing the middle values lighter (as the difference on the ramp is difficult to see I have placed two copies of the original ramp on the bottom row for the purposes of comparison)

A Gamma operation visualised.

Contrast

There are many ways to define contrast (Wikipedia if you are interested) but broadly the narrative of contrast is: ‘darken the darks and lighten the lights’. Typical ‘caned’ contrast curve operations look like:

Contrast operations visualised.

The first one is pretty much useless as it flattens all your data at the white and black points. The second is better but it treats the upper and lower light value range in the same way and also clips them. The third is a better match for Nuke’s linear color space but still shoots to high values into orbit. In most instances I would recommend that you cook your own using the ColorLookup node. That way you can clearly identify which areas you need to darken and which lighten.

Contrast sliders are also a built in part of the ColorCorrect node.

Saturation

A color becomes a grey if its RGB values are all identical. The Saturation node desaturates an image by averaging its RGB channels. More localised control over saturation is offered by the HueCorrect node.

Left: The visualised color values of an image. Right: the same image after complete de-saturation.