Spektrafilm (dev branch) analog film simulation module - #21534
Spektrafilm (dev branch) analog film simulation module#21534piratenpanda wants to merge 73 commits into
Conversation
Uses spektrafilm's dev branch (git+https://github.com/andreavolpato/spektrafilm@dev) to generate pack.json, spectra_lut.f32, and profiles/*.json for the native darktable module (PR darktable-org/darktable#21534). Run: uv run --python 3.13 --with 'spektrafilm@git+https://github.com/andreavolpato/spektrafilm@dev' python3 export_pack.py -o ~/.config/darktable/spektrafilm
|
This is just amazing, love this |
|
Right now there is a problem where, if I load up an already existant photo + XMP settings from my database, the module won't show up and I will get this in the CLI: I have to edit a new image from a clean slate in order for the spektrafilm module to show up. Other than that, working awesome. This is the scariest, closest film simulation look and feel I've ever got from any photo editing pipeline, in any software. And oh god did I spent a crazy amount of time on it. Main reason I fell in love with Darktable was because I could get really close to it with the existent modules. AGX, Diffuse and Sharpen, LUTs... Until I came across spektrafilm, and now this module... it is a game changer. There's currently no way to achieve these visuals otherwise. Props to @andreavolpato! |
|
@Arecsu should be fixed with the latest commit |
|
@piratenpanda Thank you! You may be interested in Arecsu@f2ce151, which I made on top of your PR I've created this pre-compression boost as I find myself reaching out the tone curve module very often to push the histogram to the right when I use spektrafilm, because it tends to aggressively limit the highlights ceiling in some cases. This slider should preserve the characteristics of the module, gently pushing or pulling the histogram. Feel free to test it and incorporate it into your PR in any case! |
|
Hey, I found another reference: this Davinci Resolve OFX based on spektrafilm and exposing far more options, in a nice workflow as well: I think the UI/UX and the options exposed by it are more appealing here in darktable for this module, as well as the logic behind them. Here at 5:45 you can see it being used. It does seem comprehensible and with many interesting sliders and selectors as well. |
|
Thanks for the input. I'd like to move design/implementation discussions to the pixls thread to make it easier to follow :) |
|
@piratenpanda : I would edit the first message to give a high level description of what this does, what is the goal and maybe some screenshots with before/after to illustrate the points. |
|
@TurboGit initial update done. Thanks! |
The C port of spektrafilm (PR darktable-org/darktable#21534) needs a data pack — pack.json, spectra_lut.f32, and profiles/*.json — at ~/.config/darktable/spektrafilm/. This script extracts the data from the Python package using colour-science and numpy.
Uses spektrafilm's dev branch (git+https://github.com/andreavolpato/spektrafilm@dev) to generate pack.json, spectra_lut.f32, and profiles/*.json for the native darktable module (PR darktable-org/darktable#21534). Run: uv run --python 3.13 --with 'spektrafilm@git+https://github.com/andreavolpato/spektrafilm@dev' python3 export_pack.py -o ~/.config/darktable/spektrafilm
TurboGit
left a comment
There was a problem hiding this comment.
Another pass... some more questions.
75d0f83 to
e227574
Compare
|
Regarding the discussion about including the spektrafilm data pack: IMHO, we don't currently have any other module that depends on an active internet connection to work out of the box. Especially for opening older edits offline. (Yes, the AI features require a download, but they don't affect existing edits.) Given how actively spektrafilm is being developed, I also think it would make sense to include a version switcher for the filmic-style presets as already discussed. |
e227574 to
cd3fa55
Compare
|
Nice module, thank you for taking on the task to bring spektrafilm to darktable! |
37ac235 to
b3a04bf
Compare
I ported the unit tests. Currently no pack data is in this PR but as darktable will ship the most recent one the tests are already in place currently looking at /data/spektrafilm. Will update once we know which version will be shipped with darktable or at all. |
…d missing glare stage and scanner feature set
…n film and print for the respective part, reset to default value
… proper bauhaus widget, add blank lines between routined, use GList where necessary, use dt_hash(), add underscore prefex to static routines
…ffusion filters and clarify scatter
The new module was missing from the `all` modules group listing.
… and avoid oversharpening
The reference's multiplicative USM (_finalize_grain in grain.py) runs on the absolute density -- the grain sampler's floor is still present and only removed afterwards (add_micro_structure -> blur -> USM -> -= density_min). The delta-model combine already took the floor back out, so pass it back in as an offset -- added to both operands before the D/blur(D) ratio and subtracted from the result, on both CPU and GPU: without the floor the ratio is ill-conditioned in the deepest shadows and the USM amplifies shadow noise the reference never does.
…eflash range to 0.5
…Also show paper name on auto mode
8acc69e to
3e33e89
Compare
This module brings the spektrafilm project (https://github.com/andreavolpato/spektrafilm) to darktable. Spektrafilm simulates analog film processes and applies them to digital images.
This module has been derived from the spektrafilm project and tries to stay as close or exact to the algorithms used there.
Currently it looks like this:

Film and print stocks can easily be selected via drop downs. Further settings are then handled inside the respective tabs (currently untranslated).
Default settings are Portra 400 and Portra Endura which transform your image from

to

Currently almost every film/paper combination from the spektrafilm dev branch is working except for Kodak 2302. Grain, Halation and Diffusion models are working as well.
Discussion thread and the python script needed to create the necessary spektrafilm data for darktable can be found here: https://discuss.pixls.us/t/spektrafilm-darktable-module-sort-of/58744/
Current dtdocs PR darktable-org/dtdocs#993