Cube to CLUT, possible?

I have a collection of LUTs in the .cube and .3dl format. I want to use them with Rawtherapee. Is there a simple way to convert them to CLUTs for use in Rawtherapee? I have seen software for converting the other way, but not 3D Luts or Cube to (Hald) CLUTs.

you just need the base CLUT image and a way of applying the cube LUT to that, which you could do in darktable, but there’s probably a simpler tool out there if that’s all you want to do.

1 Like

With G’MIC, you can generate a 512\times 512 Hald-CLUT (corresponding to a 64^3 CLUT), with the following command:

$ gmic input.cube r 64,64,64,3,3 r 512,512,1,3,-1 o output.png

Hey, awesome. Thanks!

While @David_Tschumperle 's answer worked for me, I had issues with differently dimensioned cube files (total count uneven power of 2 for example).

Because of that I tried python so apply the cube file to the haldCLUT identity which worked fine. Several scripts from Github only produced errors, hence I’m uploading my own script incase anyone is searching too:

1 Like