Spectral film simulations in ART

Hi all,
recently @arctic released agx-emulsion, a physics-based simulation of color film photography processing. I have been so impressed by the quality (and robustness) of the output of such pipeline that I have decided to extend ART to make it possible to integrate agx-emulsion as an additional type of 3dLUT, similarly in concept to what is already possible with CTL scripts.

Here, I want to show you how you can play with it, in case you are interested. The feature is implemented in the extclut branch, and although it has not been merged in master yet, I have prepared nighly builds for all major platforms. So, here are some quick instructions:

  1. Install agx-emulsion by following the instructions on its GitHub page. Make sure that you can run the gui from the terminal.

  2. Download the files agx_emulsion_mklut.py and ART_agx_film.json, and save both in the same directory.

  3. Open ART_agx_film.json with a text editor, and edit the "command" entry to point to the Python interpreter you used to install agx-emulsion. The exact procedure will depend on how you installed agx-emulsion:

    • If you used a virtualenv created e.g. in the /path/to/venv dir, then you want to use /path/to/venv/bin/python
    • if you used conda, see here how to locate the python executable.
    • if you used uv, well, I don’t know, but if you do just let me know :slight_smile:
  4. You can now load ART_agx_film.json as a LUT in the “Color/Tone Correction” tool:

  5. If you want a more permanent integration (and also a better positioning of the tool in the ART pipeline), you can copy both files above in the “CLUT directory” that you can specify in “Preferences → Image Processing”, to be able to select AgX in the “Film Simulation” tool of ART.

Hope this helps! And let me know if you find issues.

11 Likes

Works (at last)! Many thanks Alberto, AgX seems to be an impressive tool, need more time to get the hang of it.

One thing about your instructions, point 2, “Save both files in the same directory”. Please specify which one, where.

Regards, Paul.

1 Like

FYI it’s merged on master now, and I have updated the agx_emulsion_mklut.py script to make it (slightly) faster. I think it’s pretty usable now.

I’m not sure I understand your question. You can save the two files wherever you want, as long as they are in the same directory. If you want AgX to appear in the film simulation tool, you should put both files in the “clut directory” that you specify in “preferences → image processing”:

1 Like

Good work, very cool! But this does not include the grain, right? The fact we still don’t have color film grain simulation in just about any raw editor (commercial or FOSS) is a bit strange.

GIMP ->G’MIC ->degradation->grain

Zoom into the collars …

Hi,

“Smoothing → add noise → RGB channel” has been there for a while. Whether it’s credible enough I don’t know though

Hi Alberto, when I saw arctic’s work, I was expecting (hoping) you’d do something with it. And there it is! Thanks you so much!

On a sad note, I tried installing the nightly build you mentioned above, for MacOS, and I got the the “Application is damaged” error again, I can’t run it.

1 Like

This is great Alberto! :star_struck:
I don’t want to ruin this nice effort so I hope i will not change too much or too fast the code on agx-emulsion. I should probably make a version that is known to work, and state it in the release note, so it is clear.

I cannot download the file agx_emulsion_mklut.py. The link looks broken.
I was curious on how you did the comunication with ART :grinning:

Did you try this link?
The extlut containg the relevant files is here.

Great work, by the way!

1 Like

isnt that quite similar to what @CarVac did in filmulator?

:frowning:
I’ll try again later today, let’s see if I have better luck!

Hi, please don’t feel constrained! The “glue code” layer is very thin, if you feel that something needs to change don’t worry and just go ahead, I will catch up. As @sguyader said, the script is on the repo if you are curious: ART/tools/extlut at master · artpixls/ART · GitHub

1 Like

Was just about to write that, but was happy to see you write it instead. :smiley:

1 Like

Hi @sguyader, I’ve rebuilt the nightlies, can you try again?

Thanks!

Playing with the film emulsion module.

  1. Scan of a print, photo made with a disposable pano camera, New York. Adjusted in ART with tools in the Exposure and Colour modules to resemble more or less the print.

  1. Scan of the negative, processed in ART to a positive, tone equalizer + contrast, then AgX emulsion. I love the result. Many thanks @arctic and @agriggio !

2 Likes

Probably a reflection of a low relative demand for it. Maybe many of those who really want it are shooting film instead of digital?

Dunno.

1 Like

Again, ART has some. If you tried it and don’t like it, feel free to share your feedback, it might help improving it…

2 Likes

Hi Alberto,
The latest nightly works, the AgX film simulation works too.
Thanks again!

3 Likes

I was able to install UV from the instructions provided to install agx-emulsion under windows and using the command line suggested I was able to install it and the dependencies, run it and it opens in the GUI…so that part i have working… With ART I have the json file and the py file in both Luts and ctrlscript directory. When I try to run the script in ART it says invalid parameters in json file…so I am assuming that I need to modify the “command” line in there from its current setting. This is where I am stuck I tried a few things but it made no difference… UV is installed in C:\Users\myusername.local\bin and that is in my path too but I am not sure how to modify this further…any suggestion??

python seems to be located in C:\Users\myusername\AppData\Roaming\uv\python\cpython-3.11.11-windows-x86_64-none\

Is that the path that needs changed or the command statement in the json file???

I’ll try on windows when I have a chance and report back, thanks for the info!