Spectral film simulations from scratch

In case you haven’t come across it yet, this German version of the Xtol Datasheet has Xtol curves for a whole bunch of films, including Ilford, Agfa, and Fuji in addition to Kodak: https://125px.com/docs/techpubs/kodak/xtolEntwickler.pdf

4 Likes

Could it be enlarger/scanner lens diffusion? Or, depending on the scanner, digital processing to increase clarity or tame dynamic range (a la fuji frontier)?

Also, I really need to know… what the heck IS that??? gnawed sweet potato? lumpy hairy nipple? :sweat_smile:

chrr since you insist: it’s the skipper diving under the boat to cut a line out of the ship’s propeller which got caught in there and unfortunately, since it’s made of plastic, melted into a neat big clump…

@hanatos, I wonder if you have any image to show from the direct conversion of negative scans. Anything cool to share? Just very curious :grinning:

In the meanwhile I added the full Vision3 family to the data.
Here is the updated test table with skin tones:

The Vision3 family is consistently more neutral than specialized photography film.

I am still thinking a bit about the profile making. I wanna make the the unmixing of the sensitivity a bit more rigorous. Apparently in the measurements of sensitivity of print paper the light source is filtered with something that emulates a neutrally exposed film. I should add this and see if things improve, especially later for the neutral fitting of filters.

Another small investigation done in the weekend is about the 3DLUTs, encoding what is happening in the enlarger and in the scanner. Apparently they are very smooth and thus I reduced the default size of the LUTs to 17x17x17x3, accelerating a little more the calculation.

This is an example of the enlarger 3DLUT for Kodak Gold 200 and Kodak Endura Premier. The color of the curves encodes the amount of input density in the other channels (thus not the x axis).

The crosstalk is not much because of the masking couplers added in the making of the profiles.

Anyone knows a neat way to visualize/represents these 3D LUTs? I just plotted a few sections taken in every dimension.

7 Likes

wow really nice! i’ll need to rebuild my film stock lut then! at some point maybe the precomputed 3d luts will be interesting for me too to speed up computation a bit. might be interesting for real time raw video.

anyways, i put together a short video processing this playraw:

i’m first processing the digital raw → filmsim + print and then the scanned negative → virtual print. as you can see i needed some of the non-physical paper gamma to make the contrast match better. also since i don’t know the film stock i have to play with the filters quite a bit to arrive at an approximately neutral render (no precomputed data from the fitter).

8 Likes

Cool, the film is Kodak Gold 200. Also for reference I added the SOOC jpeg in my post, it’s an early morning shot so the light is blueish.

3 Likes

Ah, yes, I’m all too familiar with digging line out of a prop, except in my case it’s usually just a trolling motor and no diving is necessary :sweat_smile:

ah thanks that makes sense. it seems the kodak gold 200 can explain some of the fog/min density i’m seeing. unfortunately the calibration is apparently not absolute. not sure what happens during scanning and whether that might throw off the white point too. if i leave the fitted values for kodak gold and one particular printing paper combination it becomes very blue indeed (sets cyan filter to 0.3 instead of 0.7…0.8 like i did above).

Hello, first of all Thank you so much for the effort of making the project!

However, I’m struggling with the installation, could you help me with the installation?


this is the command that I received.

It seems you downloaded the 0.1.0-alpha release ZIP from February, right? If so then try to use git clone the project to get the latest updates.

1 Like

Hi thanks for helping out, I’ve managed to download the latest package using UV, and it automatically opens the GUI. If I want to open the GUI again should I use the same command that download the file, or can I just run the downloaded ones?

Thanks!

Hi! I wonder where requirements.txt has gone in the later versions? I’ve git cloned the repo but I can’t find a requirements.txt in there and I get error: File not found: requirements.txt.

Hi, just download the emulsion using UV method by CMD just like on the github. When it’s done it’ll automatically opens the GUI for you to edit the photos in. *Don’t forget to install UV first

However, next time you want to launch the emulsion, you have to run the “main.py” using CMD which command is “uv run main.py”

Which located in “agx_emulsion\gui” but to locate where the full downloaded files is, simply look at the CMD during or after the agx emulsion downloading process.

You can now simply use

uvx --from git+https://github.com/andreavolpato/agx-emulsion.git agx-emulsion

to run the latest version (see README).

The requirements.txt has been removed as it’s not needed anymore when using uv or pip.

3 Likes

The requirements were embedded in the setup.py and will be resolved automatically. We updated the installation guide in the repo, too. :wink:

Thanks! Eventually noticed the guide was updated. :slight_smile: Seems installation automatically goes to ~/.cache/uv/ now?

Yes, when you use uvx, it installs to the cache directory, so it will automatically download stuff the first time and then use the cached version (unless there is an update on the repo).

But you can also pip-install to a manually created virtual environment if you prefer that.

This is brilliant! I was thinking of doing something similar to invert my color negative scans, so you just saved me a ton ow work :joy:.

Hi,
I’ve been so busy I have had very little time to spend on this. I’m having time off now for health reasons so have some time to play again. :slight_smile:
When trying to run on Windows using uv as per the readme I get this error:

(base) PS C:\Users\SG3> uvx --from git+https://github.com/andreavolpato/agx-emulsion.git agx-emulsion
   Updating https://github.com/andreavolpato/agx-emulsion.git (HEAD)                                                      x Failed to resolve `--with` requirement
  `-> Git operation failed
(base) PS C:\Users\SG3>

Am I doing something daft? The bit about failed to resolve --with requirement (scroll to see it) is puzzling me.
I had previously installed via pip and conda but wanted try the uv route. I’m a bit clueless on package managers as is probably obvious…

Which uv version are you using?