Sorry for the very late reply. I have been (re-)processing a few hundreds RAWs for HDR lately, using Darktable, the JPEG XL format, and Adobe’s Gain Map demo app (just used as an HDR viewer, without the actual gain map functionality). I haven’t worked with video, but I figured out a workflow that works decently well for stills.
I will try to write a long post detailing my workflow at some point, but I can already give a rough outline, in case it can be useful.
As a spoiler, here is my list of active modules for a fully-processed image (that was initially exposed “to the right”):
With the right settings, these modules work well-enough for HDR content.
I process each image as follows:
- I first apply all corrective modules (white balance, highlight reconstruction, lens correction, orientation, denoise, diffuse or sharpen, etc…).
- Then, I enable the “ISO 12646 color assessment conditions” (the light bulb icon) and adjust the exposure, paying attention only to the shadows and middle tones (I’ll deal with the highlights later). For bright scenes, the highlights will look badly clipped in the preview; this is expected.
- I optionally apply a RGB curve to the shadows only (adding a few control points on the diagonal to make sure that the upper part of the curve retains a unit slope, so that it will extrapolate fine to values > 1.0). This is especially useful to correct the contrast in the shadows if they are are a bit noisy.
- Then, the most important part: because I assume (like Adobe) an SDR brightness of 203 nits, and I will output to PQ with a theoretical peak brightness of 10000 nits (which I believe is encoded as 1.0 in the JXL file), I add a second exposure module with a correction of log2(203/10000) = -5.62 EV. I checked with Adobe’s viewer that the middle tones of the image match between a SDR JPEG (with clipped highlights) and a PQ JPEG XL with this correction, so I think this is the correct scaling to apply. After this step, it is expected that the preview will be very dim.
- I optionally use the tone equalizer module to dim some too-strong highlights that distract from the main subject. In principle, a second tone equalizer could be used for the shadows (by placing it before the exposure scaling module).
- Finally, I apply some base curve to smoothly clip the strongest highlights. My curve is not particularly precise, but what matters is that it is linear with unit slope in the shadows, constant above some predefined luminance target, and it smoothly interpolates between these two regimes. This limits the top luminance of the output image (or, equivalently, the HDR headroom). I have defined a few presets, corresponding to various top luminances.
- In the “export” module, I select JPEG XL (12 bit) as the file format with a PQ Rec2020 RGB profile and a perceptual intent.
In order to speed-up the above process, I created a style that I can use as a starting point. It enables the relevant modules in the correct order (with small non-zero values to prevent darktable from e.g. “merging” the two exposure modules). I then temporarily disable the exposure scaling and base curve, adjust the middle-tone exposure as needed (and optionally apply some RGB curve), then re-enable the two disabled modules and export the image.
My main issue with this workflow is that the Darktable preview is limited to SDR (even sRGB on macOS…). This makes it a bit tedious to make precise adjustments, because you need to export often and use an external viewer to assess the changes. But it technically works, and gave me some amazing results! I find that HDR pictures tend to be much more “true to life” than SDR ones. Interestingly, I even find that processing RAWs for HDR requires less work than for SDR, since I don’t need to torture their dynamic range until it fits an ~8 EV range.
I hope sharing this will be useful to some of you, and I would greatly appreciate any feedback/suggestions about this workflow, especially if there are any colorists reading this! One difficulty that I still haven’t fully overcome, is how to keep the luminance consistent across a series of scenes/pictures. I try to keep the lighting conditions consistent when working on my laptop, and I have a very rough zone system in my mind (to allow for a higher median luminance in bright daylight scenes, and a lower one in night scenes). But I am sure there must exist more principled ways to do this!