Darktable - Notes, workarounds, learning, etc

Or is it just darktable without the capitals? Whatever.

Adobe is abusive and I’m looking to leave Lightroom. But I need a good, high quality and useable photo processing workflow for that to work for me. And it is different enough that the learning curve feels steep and the editing process feels slow in comparison.

So this is about learning, and getting up that curve and past the slowness through understanding and knowledge.

Version 5.0 released 2024-12-31

Darktable’s user manual, while not super detailed, is very useful.

Darktable’s Basic Processing Approach

This is probably the place I struggled with most in coming to grips with how to effectively use the software compared to Lightroom. RawTherapee is more similar to lightroom, while darktable seems to come at things from more of a “set of building blocks” approach than an integrated suite, if that makes sense.

Module Order

This is the thing I struggled with most, but is started to make sense. Darktable documentation calls this the pixelpipe.

Fundamentally, the order of modules in the processing toolbox represents the order they are applied to the RAW file. In what seems backwards in some ways but makes sense conceptually (when you bend your mind to it) each module builds in a stack on top of the previous.

What this means is the bottom most module or tool is applied first, and each successive tool is applied on top of the previous tool, using the output of the previous as its input. Mathematically this is likely how most software of this type works, but Lightroom presents things more holistically as a “set of adjustments”, which is easier to come to grips with.

In use, Lightroom is more of a “make the changes you need, don’t worry too much about the implementation” approach while darktable is more “understand how you are adjusting each parameter of the photograph and in what order you are doing so to achieve the result.”

What this means in practice is fundamental base modules like demosaicing, cropping, and so on are at the bottom, while tone mapping and final color adjustments are typically near the top. Darktable has a recommended module order and they recommend you don’t change it.

Color Spaces

Related to module order, darktable uses what they refer to as a scene-referred workflow, which does as much as it can within a linear RGB color space. While linear RGB is not how we see things, it is how the data are represented in the photo files, so it makes sense to preserve this until final perceptual curves are applied.

At some stage of processing a tone mapping curve is applied to bring the photo from linear space to a representation that reflects what we see, but this is intended to happen late in the process (perceptual color space). The base curve or filmic rgb modules are typically where this happens. The filmic rgb module is the default tone mapping module for the newer processing pipeline, while base curve was default in the older pipeline that converted to perceptual space sooner in the process. Filmic rgb tries to reproduce tone and color response of film, while base curve tries more to match camera jpeg curves.

Module Groups and Lists

This is a place I need to spend some time. The default set of modules exposed in the interface may not be exactly what I’m looking for. For example, I’m pretty sure the 3d LUT module isn’t shown by default, and the “best” way to do color grading is still a mystery to me. What I need to do is review the available modules, how they work, what is recommended, and build a module group or workflow that has the modules I want to use shown by default and ready to go. Because I find that while I can get very good results each photo edit takes a long time compared to Lightroom (because of familiarity, presents, and so on). I would like it to not take so long.

Library

Sorting Film Rolls

There does not appear to be any way to manually arrange film rolls, but there are two sorting options that can be found in preferences for that tool: order of import or filename. Sort by filename works for me since I name folders by date. I’d prefer a manual ordering option if it was possible.

Library Concepts

This is unclear, whether it can work like Lightroom, with a massive library, or if it’s more of a “recently used locations” thing. I’ve never used the “copy to library” import, just “add to library” since I’ve been working with my existing Lightroom photo library.

Presets

This is another place where I really need to spend time. I need to work through well known/representative photographs and start building a set of presents I can apply quickly to do 90% of the adjustments I need or want. This includes exposure, contrast, film simulations, color grades, and so on. Similar to how I have presets set in my cameras for certain looks.

Call this a TODO.

Auto-apply Presets

It should be possible to auto-apply certain presets on import based on data in the photograph EXIF data. Primarily I would want this for a few cases, such as applying lens corrections or film simulation presets including LUTs based on film simulation settings in the camera (to perceptually match or come close to matching camera jpegs on import).

It may not be possible to detect and apply presets based on extended exif data without additional scripting. See https://github.com/bastibe/Fujifilm-Auto-Settings-for-Darktable for a lua script which uses exiftool to do this. I may be able to extend this for my own use.

Creating and editing presets has more information I should review.

Module Notes

Filmic RGB

This one took me a little bit to get to grips with. It’s about tone mapping a linear representation of the photograph (the underlying demosaiced and adjusted data in linear rgb space) to a film-based perceptual representation.

Basic Use

Work though lower level modules, setting demosaicing options, white balance, making general exposure adjustments, etc first. For exposure they recommend shooting ETTR in the field, and then adjusting the exposure module for mid-tone levels. You can use gray cards for this but that’s a type of photography I don’t really do. This can be easier if you turn off modules higher in the stack and turn on highlight and black clipping indicators. More important than highlight clipping is avoiding crushing blacks in linear space.

After settings general exposure then can use the tools on the scene tab to set the basic tone mapping curve. The pickers enable auto-setting. White relative exposure sets the number of stops between middle gray and peak whites. Black relative exposure sets the same between middle gray and black.

Other Tabs

The reconstruct tool is meant to mostly blend transitions between clipped and unclipped areas and recover colors based on adjacent pixels. It is not meant for large scale reconstruction of clipped data or inpainting.

LUT support

Darktable supports 3d LUTs in several formats. For some reason I thought it was only HaldCLUT format, which RawTherapee also supports, but it supports several 3D LUT formats through the LUT 3d module, including .cube, .3dl, .png (HaldCLUT), and .gmz.

My HaldCLUT library is therefore compatible and works fine, so my converted version of LEIGH:chrome Type. 007 works, as does the direct download .cube file [[Alex Leigh|Alex]] provides.

LUT sources

Links go here.

When to Apply LUTs

By default LUT 3D is intended to be applied to the adjusted perceptual image after filmic rgb for color grading, such as film simulation.

OpenCL on Fedora with AMD Graphics

On Fedora by default AMD and OpenCL isn’t working. The libraries and compiler and development headers are all not installed. This doesn’t keep the system from working, but is annoying.

Based on the error messages received from testing OpenCL, I installed the following packages to get the libraries, development headers, and compiler needed: sudo dnf install mesa-libOpenCL rocm-opencl mesa-libOpenCL-devel rocm-opencl-devel clang18

Test with darktable-cltest -d verbose

Clang 18 was chosen based on the directory it appeared to be looking for during testing.