Negative Out of Gamut Colors

Every color space we work with has a defined set of primary coordinates for pure red, pure green, and pure blue. Those are the corners of the gamut triangle shape. The larger this gamut is, the more values it can hold, and all of this works beautifully in DaVinci Resolve with color management, as long as there are no pixel values that fall outside of this gamut.

The problem is that sometimes we move from a larger triangle (gamut) to a smaller one and some pixels get left “outside” which is represented with a negative number. Or even more common is that camera noise places pixels, expecially in the blue channel outside of the gamut - EVEN BEFORE MOVING A COLOR FROM ONE COLOR SPACE TO ANOTHER!

In compositing, this can be caused by simply linearizing the image for compositing (removing the log transfer function), which happens in DaVinci Resolve Fusion as soon as project-wide color management is enabled.

Why is this a problem?

The reason out of gamut colors are an issue is because all of compositing and color grading is based on mathmematical operations. And a very common simple math operation is gain. Gain multiplies a value. If you multiply an out of gamut color, a negative value - the number gets MORE NEGATIVE. This is the opposite of the behavior you would expect for a gain/multiply operation. Increasing gain should increase values and give them greater intensity.

Pixel Analyzer

So how do we know with certainty if we have negative out of gamut colors? Emilio from Millolab Tuts created an invaluable tool for Fusion called the ml_PixelAnalyzer that makes use of the probe tool to scan the entire image and report the minimum value for the frame. The tool just needs an input and you’ll see if you have a negative out of gamut color issue that should be taken care of prior to compositing.

Pixel Analyzer is available from the Reactor toolkit for Blackmagic and Resolve Fusion.

The Fix - Brightness

The brightness contrast node has a slider for brightness. This is the equivalent of the offset control from printer lights, you might be familiar with from the color page. It is a simple add or subtract operation only. It will add to all values evenly to bring the image up, so you no longer have negative numbers. So increase the brightness at the start of the comp.

And then to restore the image back to the original brightness, copy and paste the brightness contrast (bc) node at the end of the node tree and click the direction “reverse” button, to invert the brightness correction. This restores the plate, but allows all compositing math inside that brightness sandwich to start with positive in gamut pixels on all channels.

Sven Hegen posted a great explanation on this topic in regards to color grading over on YouTube.

Next
Next

HDR iPhone Video in DaVinci Resolve 18.6