Howto use the new CLUT module

Thanks for the tutorial @dutch_wolf!

So I made a script (and some patches to darktable-chart) to automatically convert HaldCLUTs to dtstyles using the technique in the video. Repo here.

  • You need to build the patched darktable-chart because unfortunately darktable-chart isn’t very programmable at the moment, so I had to patch it so that it can accept all processing parameters from the command line.
  • The script is in tools/haldclut2dtstyle/haldclut2dtstyle.sh. Basically, you give it a valid HaldCLUT in PNG and it will output an .dtstyle with the same name: ./haldclut2dtstyle.sh example-haldclut.png produces example-haldclut.dtstyle.
  • You can optionally specify the number of boxes in the chart (--chartsize), which can be either 4 or 5 (meaning 4^6 or 5^6 boxes respectively). 4 (default) is the same as @dutch_wolf’s video, but it gives rather large dE (usually 2~4) on @patdavid’s film emulation pack.
    • You can try to use 5 if accuracy is important to you, but it is really slow (>10 minutes on an i7-2600, you’ve been warned) as it needs to match ((5^3)^2+32 = 15657) patches. The good news is that it only uses a single core, so it should be trivial to parallelize on a per-file basis.
  • You can also optionally specify the number of final patches in the output (--num_patches), defaults to 49.

I’m converting @patdavid’s film emulation pack in the background at the moment, which will take a while. I will let you know when it is done. :slight_smile:

3 Likes