logC to log CCT conversion

I have a 3d Lut (LMT) file that goes from Alexa LogC to ACEScct and is D65 white point
Trying to emulate this transformation by using the ociocolorspace node in nuke. The In colorspace is: Alexa logC , out: ACEScct but I don’t get a match when I compare between the two. I’m using ociofileTransform node to read the LMT lut file

Is there anything else on top of the ociocolorspace transformation I need to add to get them to match?
Also is there a way to tell the transfer function(s) used to generate the lmt file with just that information given

What is the Working Space set to on the OCIOFileTransform? It should be the same as the working space that the program that generated the LUT was in.

Where did the LUT come from? If the LUT does not match an OCIOColorSpace transform, I would be suspicious of the LUT. The only real option in that transform is whether to include chromatic adaptation or not (an OCIO transform using the ACES config will include it). There is also the fact that the LogCv3 curve varies very slightly at different EIs, but the effect is minimal, and 99% of the time people just use the EI800 version.

If I make a LogCv3/AWG3 to ACEScct LUT in Python, the result exactly matches the OCIOColorSpace transform.

>>> import colour
>>> from colour.models import (RGB_COLOURSPACE_ALEXA_WIDE_GAMUT,
...     RGB_COLOURSPACE_ACESCCT)
>>> LUT = colour.LUT3D(name="LogC3 AWG3 to ACEScct")
>>> LUT.table = colour.RGB_to_RGB(LUT.table,
...     RGB_COLOURSPACE_ALEXA_WIDE_GAMUT,
...     RGB_COLOURSPACE_ACESCCT,
...     chromatic_adaptation_transform='CAT02',
...     apply_cctf_decoding=True,
...     apply_cctf_encoding=True)
>>> colour.write_LUT(LUT, 'LogCv3_to_ACEScct.cube')
1 Like

Thank you Nick!
The LMT was generated by the DI house using nuke (I’m assuming they used the Generate Lut node) . the EI is 800 indeed

Is it possible to use a 3x3 matrix instead of a cube file for this transformation? and is there a preference or a limitation to using a 3x3 matrix instead of a 3d lut

Similarly to your previous thread on converting to LogC, a 3x3 matrix needs to be applied to linear data. So you need to linearise the LogC, to produce linear AWG, then apply the 3x3 to that, producing linear AP1, and then apply the ACEScct curve to that.

That’s what the apply_cctf_decoding and apply_cctf_encoding arguments do in Colour’s RGB_to_RGB function.

So no, it can’t be done with only a 3x3 matrix.

1 Like

Thank you Nick . This is very helpful :)!!