ACES Gamut Compression Implementation Guide


The purpose of this document is to detail and define standards for user interface and experience, workflow, tolerances, and tracking of the ACES Reference Gamut Compression (RGC) published in ACES 1.3. For detailed technical specifications, please refer to the ACES Gamut Mapping Architecture VWG - Technical Documentation.


The following standards, specifications, articles, presentations, and texts are referenced in this text:


The ACES Reference Gamut Compression was introduced to help solve ACES user issues with out of gamut (negative) pixels introduced either in the conversion from camera raw RGB via an Input Transform (IDT) into ACES AP0 or in the conversion from ACES AP0 into ACES AP1 (ACEScg and ACEScct). These out of gamut pixel values are problematic when their negative components cause issues in compositing, and may also produce visual artifacts when viewed through an ACES Output Transform.

Target Audience

This document is targeted at software developers and product managers looking to integrate the Reference Gamut Compression into their software package or library. It will focus on the “how” as opposed to the “why”, which is covered in the architecture documentation above. 

Workflow Recommendations

As visualized in the flowchart above, it is recommended (in the current absence of AMF for tracking) that most productions utilize the gamut compression in every area - from on set all the way to finishing.  This means that at this time, the RGC is “always on” by default in any viewing pipeline.  Following the general ACES workflow philosophy, the RGC is only baked into image data at the appropriate stage in the pipeline - which varies based on the needs of the production, as outlined in the flow chart above. For further workflow specifications, please refer to the User Guide.

Reference Implementation Specifications

Versioning and Naming
The Reference Gamut Compression published in ACES 1.3 uses the following ACES Transform ID and ACES User Name in the CTL:

<ACESuserName>ACES 1.3 Look - Reference Gamut Compress</ACESuserName>

Implementers should only make the RGC available in the UI when their application has the ACES version set to 1.3 or higher

Project and Clip Level Setting
When an application has the ACES version set to 1.3 or higher, a simple check-box (defaulting to on) should be exposed in the project settings which applies the RGC to all clips in the project.

An override should be provided at the clip level, so that the user can control the RGC setting for individual clips, if required.

Implementers may also choose to offer a parametric variation of the RGC (see Section X),

Export Settings
The user should be able to easily control whether rendered media will have the RGC baked in. Options should be available so that exports can either follow the global project setting, individual clip settings, or be forced to either on or off for all clips. If an application offers export templates, then templates should be provided which force the RGC off when rendering EXRs (following the recommended workflow for VFX pulls) and follow the clip settings when rendering deliverables with an Output Transform baked in.

Test Images and Tolerances

To aid with validation of implementations, a test image has been created which covers a wide dynamic range (including negatives) and contains values which exceed the AP1 gamut in every direction. It also includes ColorCheckers at varying exposures, to confirm that the gamut compression does not alter colors within the “zone of trust”.

The Python code to create the test image can be found in this Google Colab. The resulting test file can be downloaded from here, and the test image processed through the CTL implementation of the RGC can be downloaded from here (note: ctlrender adds an alpha channel to the result, which can be ignored).

For comparison of an implementation with the reference, a relative error metric has been defined (see Appendix A).
The command-line application oiiotool, which is installed as a component of OpenImageIO, can be used to compare pixels between two images and evaluate the metric specified above, using the following command line (with test_target.exr  replaced with the name of the file under test):

oiiotool gc_test_image_v007_gamut_compressed_ctlrender.exr --dup test_target.exr --absdiff --swap --abs --maxc 0.1 --div --rangecheck 0,0,0 .002,.002,.002 -o /tmp/tmp.exr

A match within tolerances will produce the following output: