Skip to content

Tools to compress out of gamut colors back into gamut.

Notifications You must be signed in to change notification settings

MazzeAderhold/gamut-compress

 
 

Repository files navigation

GamutCompress

is a tool to compress out of gamut rgb color values back into gamut.

Context

Out of gamut colors can ocurr with modern digital cinema cameras. If using the camera manufacturer's color pipeline there would be no issue. However with color management pipelines like the Academy Color Encoding System, there is a working colorspace into which all source imagery is transformed using an IDT or Input Device Transform.

In the case of ACES this working colorspace is ACEScg. The ACEScg gamut is smaller than most digital cinema camera gamuts. Because of this, when the IDT is applied, highly saturated colors can go out of gamut. Usually when this happens, one of the RGB components is a high value, and one or more of the other components are negative values.

If cameras were colorimetric devices that satisfied the Luther condition, there would be no problem. But, because this is not the case, most cameras will hapilly generate RGB tristimulus values that lie outside of the spectral locus. This is possible because the spectral locus represents the bounds of color perceivable by the spectral response curves of the human eye. A digital cinema camera's sensor has spectral response curves that are not the same!

These out of gamut colors most often ocurr with highly saturated light sources like police lights, neon lights, or lasers.

This tool was developed as part of the ACES Gamut Mapping Virtual Working Group. For more info check out the working group proposal.

Here is a contactsheet of sample images showing the visual appearance of out of gamut colors.

On the left are the original images with the ACES Rec.709 RRT display rendering transform applied. On the right are the same images, but with gamut compression applied.

If the display rendering transform does not elegantly handle out of gamut colors, artifacts such as those seen above can occur. The negative values in scene-linear of these out of gamut colors can pose issues for image processing as well.

Compressing these out of gamut colors back into gamut is useful for pleasing color reproduction, and for reducing issues in VFX compositing and DI.

Implementations

DCC Implementations for the following software packages are included. For specific installation instructions, check out the documentation links for each package below.

Download

You can grab the latest "stable" release from the Releases page, or you can clone the repo to get the latest work.

git clone [email protected]:jedypod/gamut-compress.git

Documentation

For more information about how the it works and how to use it, please check out the documentation.

About

Written by Jed Smith with tons of help from the ACES Gamut Mapping Virtual Working Group.

Also huge thanks to the contributions of @nick-shaw for the initial versions of the DCTL and Matchbox implementations, and to Jacob Danell for the first version of the Fuse implementation.

About

Tools to compress out of gamut colors back into gamut.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • GLSL 100.0%