A few people on Pixls have had significant success doing what you describe (in my case using the JPEG XL format and BT.2020 + PQ) however there is still a bit of tinkering involved. AVIF output also works, but on my Darktable build it takes a lot of time to produce the file (~1 minute/picture).
Using some “PQ” preset, I have set up a workflow that allows me to get good-looking HDR stills while spending around a minute per picture.
Earlier versions of my workflow are described in these two threads:
- Processing RAWs for HDR displays in Darktable
- Exporting images for use in HDR TV production - #25 by JLTastet
Although I have linked to specific posts, the two threads contain lots of relevant information, and they are must-reads if you are interested in making HDR stills using Darktable.
Note, however, that due to some changes in Darktable, some of the instructions are outdated. For instance, you will need to apply an exposure compensation of log2(203 nits /10000 nits) ≈ -5.622 EV at the end of the pipeline if you use the PQ curve (this will make the preview very dark, as you observed). My preset automatically sets an “exposure 1” module with this correction around the end of the pipeline, but I temporarily disable it while performing the other adjustments (I focus on the midtones to set the exposure, letting the highlights clip in the preview). This is suboptimal, but until we get a proper HDR preview, this will have to do the job.
Here is a (non-exhaustive) list on known-working modules:
And the export settings for AVIF (I haven’t tuned the quality here because I usually export to JXL instead):
Expand export settings
Finally, I use Adobe’s Gain Map demo app to view the HDR files on a M1 MacBook Pro. In my experience, this is currently the best HDR image viewer for this platform.
I should probably update the tutorial at some point, or maybe turn it into a short video. A few rainy weekends could come in handy…