sRGB to AP1 matrices and ACEScc without the RRT/ODT

Hi there.

I’ve been intrigued by ACEScc and I’ve wanted to try it out in one of my own projects for color correction in-engine.

I have scene-referred data rendered with sRGB primaries and would need a matrix to rotate the primaries to AP1.

For that I’ve only really found 2 sources: Unity and a calculator on Harald Brendel’s website (not sure if I’m allowed to post links as a new member.) Both sources have the following matrix:

    0.61319, 0.33951, 0.04737,
    0.07021, 0.91634, 0.01345,
    0.02062, 0.10957, 0.86961

I’ve programmed my own tool, which calculates color gamut conversion matrices in double precision, the path being sRGB → XYZ → D65 to “D60” adaptation using bradford matrix → AP1. This is the result I get:

	0.6133049534566281,	0.3431982653313797,	0.0475773874566389,
	0.0697185251153489,	0.9081998319230778,	0.0131839498944447,
	0.0207388699634936,	0.1098548452439992,	0.8761036546367835,

As far as I can tell the other 2 implementations used bradford adaptation as well, though my results are slightly different, in a way that didn’t make me think it’s a rounding error.

The second part of my question is whether ACEScc will be worth using without the RRT / ODT:

I personally dislike the RRT intensely so I’d rather roll with my own tonemapping and display transform.

Do you reckon using a dedicated CC space in my case is worth the trouble (and minor performance hit from a couple rotations)?

Can I forgo all primary rotations and use the ACEScc transfer function by itself as a curve effectively? I’ve used a few camera log curves in the past to have a nicer application of contrast in the past but without much success aesthetically.

Hello,

The conversion matrix we compute it is as follows:

[[ 0.613132422390542  0.339538015799666  0.047416696048269]
 [ 0.070124380833917  0.916394011313573  0.013451523958235]
 [ 0.020587657528185  0.109574571610682  0.869785404035327]]

The App is here: Apps (Colour - Dash) | Colour Science and permalink: https://www.colour-science.org:8010/apps/rgb_colourspace_transformation_matrix?input-colourspace=sRGB&output-colourspace=ACEScg&chromatic-adaptation-transform=Bradford&formatter=str&decimals=15

ACEcc/cct would be appropriate for grading operations, you could do them in this space and go to another space of your choice after to apply your custom display rendering transform.

Cheers,

Thomas

So far it has worked pretty well. One thing I’ve not been able to find however is the official, if there is such, chromatic adaptation method for conversion from rec709 primaries.

The repository provides a bradford matrix buried somewhere in deep for d60 → d65 but didn’t find anything official, which was surprising, given that sRGB → ACEScg → sRGB is a common jump in renderers. I’ve seen a mix of methods so far for the different IDTs which all produce slightly different results.

I’ve finally managed to validate my results.

The calculator linked above has 2 different ways to calculate rec709 ↔ AP1 primaries:

  1. sRGB ↔ AP1
  2. rec709 ↔ AP1

These 2 produce different matrices, since sRGB uses the rounded matrix for r709 → XYZ from the ITU-R 709 document, while rec709 option calculates it at runtime in high precision.

For my OCD’s sake, here’s the sRGB ↔ AP1 matrices, calculated from double precision white point values, rounded to 9 digits which is the max theoretical capacity for floats:

	(0.613164477,	0.339466431,	0.047369092,
	0.070204699,	0.916347730,	0.013447572,
	0.020623075,	0.109585185,	0.869791740)

	(1.704856142,	-0.621619885,	-0.083236257,
	-0.130262802,	1.140806296,	-0.010543494,
	-0.024010924,	-0.128991516,	1.153002440)