Cinematography Mailing List - CML

LUT Inversion

I am asking this question for a colorist friend of mine. They need to 'subs tract' a known LUT. It looks like a 3D input LUT was accidentally enabled during a grading session, and they would now like to apply an inverse or negative LUT to the grade to get (closely) to what the grade should really be.

Is loading the values of a 3d LUT in excel and then substract the individual numbers from 1 will result in such a LUT? Math tells me it does but I am not exactly sure in this case.

Any help appreciated.

Balazs Rozgonyi DIT/ rental manager Video Assist Hungary


I think if only the RGB values were on curves what you are trying to do is possible, but if the 3D-LUT contains a chroma matrix then there is an order of operations needed to untangle the results in making of the inverse 3D-LUT and in some cases if two colors end up with the same result color its impossible to reverse because the original color is ambiguous. Lost colors can happen because of tone reduction due to limited bits in the result, so although you may have millions of colors on the input you may have only thousands of colors on the 3D-LUT output, so obviously you cannot restore the original image without many gaps in the gambit.

You would then need to know the order of operations used to make the 3D-LUT since the values of RGB are cross multiplied.

If you have the original images that were processed through the 3D-LUT you may be able to find the error between those and the result.

But applying an inverse 3D-LUT and then a 3D-LUT again can get more histogram gaps into your image and the results of that may be de-graded if you are not saving 48bpp results to apply the inverse 3D-LUT to.

Dan Hudgins tempnulbox (at) yahoo (dot) com San Francisco, CA USA


There are two system for such LUT manipulation - LightSpace CMS or MatchLight IMS - which one depending on the LUT in question.

The best results are often from MatchLight IMS.

The LUT can also be inverted as a service from us...

(So yes, I do have an interest in this reply as both above products are of our development and we sell them ;o)



As Dan already pointed out, the process is not necessarily reversable. It may work to a certain degree and the "boarder colors" will be potentially distorted.

I also wonder what is the benefit of applying an inverse LUT, as you need to export again anyway, right? So the if I were you I'd choose to rerender the output correctly if possibly, directly from the grading. If that is impossible (due to its no longer on that machine, is an expensive outside service etc.) I wonder why you would not be able to blame this to the service point? Its their job...

If you had secondaries on the grading, then I doubt inversing a LUT can work anyway. Its not the right way to solve the problem.

Mit freundlichen Grüßen, Best regards,

Axel Mertes


as some pointed out this depends on many things. When you have a LUT that serves for example to "squeeze" 12bit LogC into a 8bit sRGB Format - you are destroying data, and are not able to inverse this process without making up numbers that were not there before.

In terms of a LUT applied in some unwanted grading accident I would suggest to go the following way: 1) Linearize the image (CIE XYZ) with the knowlegde of the original shot image and the wrong LUT that was applied 2) From that linearized image go to the actually wanted look/space with a new LUT.

(Well something slightly inspired by the ACES workflow you could say)

Cheers Jatha

Jathavan Sriram Co-Founder, CTO nablavfx R&D|3D|VFX


Copyright © CML. All rights reserved.