Aces 1.2 log2 48 nits shaper unexpected results

Hi everyone,

I have been working on making a renderer ACES color-managed and had this working with ACES 1.0.3. I started with a simple case,
supporting only sRGB output, and validated the results using reference images, which achieved a really close match. I generated my transforms using ociobakelut with the log2 48 nits shaper, setting a resolution of 64 for the cube LUT and 4096 for the 1D shaper LUT.

ociobakelut --iconfig aces_1.0.3/config.ocio -v --inputspace "ACES - ACEScg" --outputspace "Output - sRGB" --description "ACES 1.0.3 Output - ACEScg to sRGB" --shaperspace "Utility - Log2 48 nits Shaper - AP1" --shapersize 4096 --cubesize 64 --format cinespace "ACEScg-to-sRGB-log2-48nits-v1.0.3.csp"

Since the cinespace file format specifies the input range and the values that map to it, I first ensured that the input range was linear so it could be sampled as a texture. To do this, I used a small Python script:

from scipy import interpolate
from scipy.interpolate import InterpolatedUnivariateSpline
import numpy as np

linSteps = np.linspace(smallestInput, largestInput, 4096)
spl = InterpolatedUnivariateSpline(inputSteps, outputSteps)
lutValues = spl(linSteps)

By dividing the ACEScg values that go into this shaper LUT by the maximum value, I can sample the LUT in a 0-1 range. The results were quite close (I didn’t expect a perfect match since I am using look-up-tables for the transformations).

reference image:


ours:

Then I wanted to support Display P3, a format with D65 as the reference illuminant that uses the same transfer function as sRGB. Some transforms for this were still missing in ACES 1.0.3, so I upgraded to ACES 1.2. From the knowledge base on this website, I found that the OCIO Configs for ACES version 1.2 should be obtained from the colour-science/OpenColorIO-Configs repository. I also read that in ACES 1.1, changes were made to the log2 48 nits shaper function to reduce the error in over-saturated images, including altering the range of the shaper from [-6.5, 6.5] stops (max 16.29174) to [-7.25, 10.27] stops (max 222.860992). However, when generating a LUT with this new shaper, the results looked completely off. To investigate this I tried validating sRGB output again using ACES 1.2 with the new shaper.

ociobakelut --iconfig aces_1.2/config.ocio -v --inputspace "ACES - ACEScg" --outputspace "Output - sRGB" --description "ACES 1.2 Output - ACEScg to sRGB" --shaperspace "Utility - Log2 48 nits Shaper - AP1" --shapersize 4096 --cubesize 64 --format cinespace "ACEScg-to-sRGB-log2-48nits-v1.2.csp"

I was surprised that the range increased so significantly; it’s even higher than Rec.2020 with a PQ 1000 nits shaper, since the latter reaches a maximum value of 184.320023. This implies that Rec.2020 with a PQ 1000 nits shaper clips colors more quickly than sRGB with a log2 48 nits shaper.

Are these results to be expected, could this be a bug, or is there anything I’m missing? I would be very grateful if someone could point me in the right direction with this issue.

References:

https://community.acescentral.com/t/aces-1-1-discussion-tell-us-what-you-think/

A couple of things were necessary to get this resolved.

  1. The specification I used for applying .csp files did not clarify how shapers should be applied. Upon reviewing OpenColorIO’s implementation, I realized my application was incorrect. This error was likely unnoticed because the dynamic range the shaper LUT needed to cover in ACES 1.0.3 for the log2 48 nit shaper was much smaller. To resolve this I switched to the .clf format, which is well-documented. CLF Specification - ACES Technical Documentation

  2. The ACES 1.2 .config file does not support Display P3, only P3D65, which has a different EOTF and peak neutral luminance. Therefore, I had to switch to ACES 1.3. Using ociobakelut with ACES 1.3, I only achieved satisfactory results when applying the .clf from the ACEScct color space. Additionally, applying transforms in ACEScct solved some color banding artifacts I encountered in darker areas with ACES 1.2 transforms, when transforming from ACEScg. Therefore, switching to ACEScct might be beneficial for addressing accuracy issues.
    ACES OCIO Config File - ACESCentral