home | download | howto | module docs | git | beta

filmsim: artic's sophisticated spectral analog film simulation

this is based on agx emulsion. for a nice introduction see this post.

this module is best activated by applying the filmsim.pst preset. this will take care of wiring the required input look up table files (shipped with the vkdt installation). if you want to wire yourself, connect data/spectra-em.lut and data/filmsim.lut to the spectra and filmsim connectors, respectively.

TODO

for self contained documentation, i'm summarising from arctic's post here.

the true color of film negatives

when researching film, the key takeaway is that the final colors depend heavily on the second stage of the imaging process, whether it's the scanner's color processing or the analog RA4 color reversal printing process. analog printing seemed like the most authentic way to define the look, especially since companies (primarily Kodak) spent decades refining it.

there are nice book chapters on simulating the full analog pipeline of color photography [1,2,3]. film emulsions are quite sophisticated, relying on finely tuned chemistry with silver halides, several dye couplers, and a pinch of magic.

for anyone interested in film manufacturing, check out the series of videos by SmarterEveryDay on Kodak ( How Does Kodak Make Film? series of 3, The Chemistry of Kodak Film, Kodak's Film Quality Control Process).

goal and motivation

the goal is to simulate the entire analog photographic process, from film capture to the final print, using only the datasheets and basic knowledge. to capture the look of products from Kodak and Fujifilm starting from publicly available spectroscopic data. for example, Portra film and its matching paper are designed to deliver subtle hue shifts and perfect contrast for skin tones, while consumer films and paper are more saturated and versatile. how much of these characteristics can we recreate from scratch?

while film simulation LUTs share similar goals, they often lack the flexibility to be fine-tuned. in contrast, a fully physically based pipeline can better reproduce the real-world versatility of the negative plus RA4 printing process by offering adjustable parameters to tailor the final look. naturally, this approach also brings along the inherent limitations of analog photography, so you need to appreciate (or be nostalgic for) the analog process to embrace these constraints.

negative and print exposure

parameters: set process to expose and scan negative to output the negative, ev film and ev paper are the negative exposure and print exposure

here are some test-strips to introduce the capability of the simulation. the overall imaging process is split in two steps: negative and print. two different exposures can be controlled, and color filters in the enlarger can balance the colors of the print. here are virtual scans of Kodak Gold 200 at different exposure compensations of the negative.

the following strips are virtual prints on Fujifilm Crystal Archive Type II at different print exposures (and constant good negative exposure).

raw file taken from this Play Raw Two Taiwanese uncles playing chess, thank you @streetfighter.

grain

parameters: grain size uniform

the simulation builds three sub layers for each channel, imitating modern color negative films where each color layer is composed by 2-3 sublayers with different sensitivity to increase latitude. the stochastic properties of each layer and sublayers are imitated keeping into account that faster layers are more noisy, i.e. they have larger particles.

these above are a few strips of Kodak Portra 400 printed on Kodak Portra Endura with vertical size of 1 mm. The average particle areas of the virtual silver halide particles, then converted in dye clouds, is changed. in first approximation, the area of the particles should be roughly proportional to the ISO. in consumer films particles are in the range 0.2-2 micrometer diameter, i.e. 0.03-3.2 micrometer squared.

here is an example with higher magnification crops with Kodak Portra 400 and Kodak Portra Endura.

parameter: set enlarge to 2x or 4x for magnification. beware of 4x, it requires a looot of GPU memory!

print negative

saturation with DIR couplers

parameter: couplers

the level of saturation of the negatives is controlled via developer inhibitor release couplers (DIR couplers). when substantial density is formed in one layer, DIR couplers are released and can inhibit the formation of density in nearby regions, both in the same layer and nearby layers. the diffusion in nearby layers of DIR couplers produces increased saturation (loss of density on the other channels, i.e. purer colors), also referred as interlayer effects. here is an example using a signatureedits.com raw file, using Fujifilm C200 and Fujifilm Crystal Archive Type II.

the filmsim data

to run this module, you need the filmsim.lut data file. it is shipped with vkdt git and installed by default. the following steps are not necessary, but if you want to create it yourself (and maybe play with different data points), do this:

cd
git clone https://github.com/andreavolpato/agx-emulsion
python -m venv agx
source agx/bin/activate
cd agx-emulsion
pip install -r requirements.txt
pip install -e .
cd agx_emulsion/data/profiles
wget https://raw.githubusercontent.com/hanatos/vkdt/refs/heads/master/src/pipe/modules/filmsim/mklut-profiles.py
python ./mklut-profiles.py
mkdir -p ~/.config/vkdt/data
cp filmsim.lut ~/.config/vkdt/data

and in any case wire an i-lut module with filename data/filmsim.lut to the filmsim input connector.

connectors

parameters

this module has a lot of parameters. they are grouped into film options (first block) and print paper options (second block).

March 2025