IDTs/ODTs creation for dommies

I love ACES and use it every time. The huge frustration is the difficulty to create IDTs. There is no recourse for dummies.
Also DaVinci Resolve offers the possibility to add dctl files in the IDT/ODT folders. OCIO seem way more complex using python and not even sure I can add an IDT or ODT in there. And why Resolve do not offer OCIO V2 color management like all the other softwares?

I work with a GoPro Camera ProtuneLog/NativeGamut. Other people will use other type of camera profiles, D-Log/D-Gamut, F-Log/F-Gamut, Z-Log/Z-Gamut…
Unfortunately, if the manufacturer doesn’t publish a data sheet of their LogGamma/Gamut then I guess, we, as users, are completely screwed and let down.

Nick Shaw made a website with the NativeGamut RGBWxy coordinates and the Protune Log-Gamma Encoding/Decoding formula. I don’t know why, but his website is offline now. Got extremely lucky to have saved his amazing work. I kept the numbers and I’m fairly or naively optimistic that I can create an IDT. After all, this is what ACES should bring us, the ability to enter the manufacturer coordinates and linearize + GamutConvert with a matrix. No?

I think I will need a specialized math gamut and gamma software to make the most precise IDTs and ODTs.
I’ve looked at a lot of work and it seems that they use CAT02 transforms and Bradford transforms. Problem is I have heard a lot of criticisms on these transforms. Also a lot ctlds look like a list of characteristics…

Color science is really hard… I have so much to learn, but I would like to hear from you, why should I not try to make an IDT on my own (even with the manufacturer math)? Maybe the reason is because there is a lot of different formats, different language, code or quality of IDTs.

On github I found the Gopro ProtuneGamma/NativeGamut and ProtuneGamma/Rec709Gamut. I am so grateful for the people that work hard to give the community the Gopro IDTs ctdl for DaVinci Resolve. Thank you guys.

My problem is that I also have shot in Gopro Rec709Gamma/NativeGamut and I need a Protune/Native ODT to export my work back in camera color space.
This is the reason why I make this post, is to solve the IDT rec709/Native and Protune/Native ODT. But, if I succeed, I’ll make a step by step video tutorial on the topic for everyone to get it once for all (If the process is doable).

I have some pages on my website now with details of various colour spaces, although it does not currently include Protune.

You can get the matrix you need for an IDT using this tool. I am not sure what problems you are referring to with Bradford and CAT02, but as far as I am aware, all current IDTs use one of those two.

I believe that the publicly available information on Protune originates with the “experimental transform” in the ACES OCIO config originally made by @hpduiker, based on “conversations with David Newman of GoPro”. There is no official GoPro documentation on their colour encodings.

You might be better making a “black box camera IDT” for your GoPro, using the method which is in the process of being documented by the IDT Virtual Working Group.

1 Like

Thank you Nick for answering that message, it’s very nice to give your time and effort. Yes! I think I had an old version of your website. Thank you so much, these types of resources are very valuable. I appreciate these numbers are not exactly sure and GoPro didn’t publish data publicly. It’s a shame, I’m a cheap little filmmaker, but now that the Go Pro Hero 11 finally does 10bit420 (Yes 420 is a quarter resolution for the chroma pffffff, let’s not get started) well, I guess the industrial image makers might want crash cams with a log and a wide gamut. I will follow your advice on the black box camera IDT, I’ll need to handle the python software that you guys brilliantly provided to people to make IDTs. I will do this in due time because I have watched all the available working groups and the process is ongoing. It’s amazing the amount of information you guys know. I start to think that I really like colour-science.

I’m not making progress with my inverted IDT NativeProtune (i.e. ODT) to export back in the camera color space, yes, I can’t afford EXR ACES 2065-1 16bit float exports lol.
I tried my best to make a CTLD CSC CAT02 transform but you know, I think I need help for that. I think I was successful at finding the right gamut matrix with that website. Most of the website that offers you the opportunity to convert gamuts doesn’t have the options to customize both source and destination. This website lets you enter the gamut coordinates.

The down side is that the website doesn’t spit out a lot of decimals. But, this is what I did:

From
GoPro Native
x y
R 0.698448 0.193026
G 0.329555 1.024597
B 0.108443 -0.034679
W 0.3127 0.3290 (D65)
To
ACES 2065-1 (AP0)
x y
R 0.7347 0.2653
G 0.0000 1.0000
B 0.0001 -0.0770
W 0.32168 0.33767 (D60)

Resulting Matrix:
0.533455 0.324136 0.142410
-0.050720 1.075711 -0.024991
0.071446 -0.290519 1.219074

Swap: (swaping the source and destination for my ODT)
1.846396 -0.618034 -0.228362
0.085014 0.906337 0.008649
-0.087951 0.252211 0.835740

Now that I have these matrices, I can use them to create an IDT and an ODT.
(Adding “f” after each number for float I think).

The IDT works:

//GoPro Protune Native IDT for ACES workflow inside DaVinci Resolve Personal Use.
DEFINE_ACES_PARAM(IS_PARAMETRIC_ACES_TRANSFORM: 0)

//Protune Native to ACES using CAT02
CONSTANT float native[3][3] = { {0.533455f, 0.324136f, 0.142410f}, {-0.050720f, 1.075711f, -0.024991f}, {0.071446f, -0.290519f, 1.219074f} };

DEVICE float protune_to_linear(float xV) {
return ((_powf(113.0f, xV) - 1.0f) / 112.0f);
}

DEVICE float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) {

p_R = protune_to_linear(p_R);
p_G = protune_to_linear(p_G);
p_B = protune_to_linear(p_B);

float rVal = native[0][0] * p_R + native[0][1] * p_G + native[0][2] * p_B;
float gVal = native[1][0] * p_R + native[1][1] * p_G + native[1][2] * p_B;
float bVal = native[2][0] * p_R + native[2][1] * p_G + native[2][2] * p_B;

return make_float3( rVal, gVal, bVal);

}

The ODT, I think the error is with the Protune Log Encoding. I can’t translate the equation into python or the code used in CTL files.

//GoPro Protune Native ODT for ACES workflow inside DaVinci Resolve Personal Use.
DEFINE_ACES_PARAM(IS_PARAMETRIC_ACES_TRANSFORM: 0)

//Protune native to ACES using CAT02
CONSTANT float rnativem[3][3] = { {1.846396f, -0.618034f, -0.228362f}, {0.085014f, 0.906337f, 0.008649f}, {-0.087951f, 0.252211f, 0.835740f} };

DEVICE float linear_to_protune(float xV) {
return ((_log((powf(113.0f, xV) - 1.0f) / 112.0f) * 112.0f + 1.0f) / log(113.0f));
}

DEVICE float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) {

float rVal = rnativem[0][0] * p_R + rnativem[0][1] * p_G + rnativem[0][2] * p_B;
float gVal = rnativem[1][0] * p_R + rnativem[1][1] * p_G + rnativem[1][2] * p_B;
float bVal = rnativem[2][0] * p_R + rnativem[2][1] * p_G + rnativem[2][2] * p_B;

rVal = linear_to_protune(rVal);
gVal = linear_to_protune(gVal);
bVal = linear_to_protune(bVal);

return make_float3( rVal, gVal, bVal);

}

If you guys see what is the problem with that ODT, I would really love it. It’s a shame that we don’t have an auto IDT inverter, but I guess this is really hard.
Also, I am going to make a test in writing LaTex equations in that forum for the next messages. It’s also handy because these are the protune Encoding/Decoding formulas.

Decoding Protune:
[math]L=(113^V-1)/112[/math]
Encoding Protune:
[math]V=ln⁡(L*112+1)/ln⁡(113)[/math]

I’m really learning a lot and I am deeply thankful for ACES to exist.

I already noticed an error.

The IDT has an (float xV) function:
DEVICE float protune_to_linear(float xV) {
return ((_powf(113.0f, xV) - 1.0f) / 112.0f);
}

I honestly don’t know what this is, why has the exponent V given much importance and it’s not even assigned with a number.
I know it comes from the equation L=(113^V-1)/112

Following this example, maybe in my inverted IDT (ODT) I can enter this equation: V=ln⁡(L*112+1)/ln⁡(113)
like this:

DEVICE float linear_to_protune(float xL) {
return ((_log(xL * 112.0f + 1.0f)) / _log(113.0f));
}

Maybe V or L letters are used in color transformed and the programs that execute them knows those functions. I’m sorry to be so far from good conclusions here. This is why I desperately need to improve. Thank you to all of you for any explanations.

Finally made a last test and tried to change my log with _logf
And it works like a charm…

It’s very all mysterious to me all of this coding, but basically here is the entire working ODT

//GoPro Protune Native ODT for ACES workflow inside DaVinci Resolve Personal Use.
DEFINE_ACES_PARAM(IS_PARAMETRIC_ACES_TRANSFORM: 0)

//Protune native to ACES using CAT02
CONSTANT float rnativem[3][3] = { {1.846396f, -0.618034f, -0.228362f}, {0.085014f, 0.906337f, 0.008649f}, {-0.087951f, 0.252211f, 0.835740f} };

DEVICE float linear_to_protune(float xL) {
return ((_logf(xL * 112.0f + 1.0f)) / _logf(113.0f));
}

DEVICE float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) {

float rVal = rnativem[0][0] * p_R + rnativem[0][1] * p_G + rnativem[0][2] * p_B;
float gVal = rnativem[1][0] * p_R + rnativem[1][1] * p_G + rnativem[1][2] * p_B;
float bVal = rnativem[2][0] * p_R + rnativem[2][1] * p_G + rnativem[2][2] * p_B;

rVal = linear_to_protune(rVal);
gVal = linear_to_protune(gVal);
bVal = linear_to_protune(bVal);

return make_float3( rVal, gVal, bVal);

}

Now, my last project is to build an Rec709Gamma NativeGamut IDT following the same CSC principle. I noticed that it is very hard to find a good rec709 IDT that corresponds to what Davinci has implemented by default in the ACES 1.3. I think I will test rec709 gamma IDTs out there, but it’s going to be hard since I don’t have access to Davinci ACES 1.3 files to copy the gammas.

If by chance I understand way more on the topic one day, I will make a video on the black box camera IDT/ODT. But it’s honestly very, very hard. I know that the academy should make ACES accessible by everyone to increase their use, and they should. But they are already doing so much. For the Macbeth chart and bracketing, they are building an app to give the footage made by the camera and spits back an IDT, it’s so wonderful what they are able to make. I feel ashamed to ask them a compiled program in excel. I basically need to learn python and install their app this way. I will do it and try to make a real IDT this time and can’t wait to learn much more. Thank you again everyone.