Hi everyone. Over the past few months I’ve been developing Fotufilm, an open-source film simulation engine for photos and videos. It grew out of a personal curiosity and a hobby. Rather than approximating the “film look” through creative 3D LUTs or subjective colour grading, I was trying to see how much of a film’s true response can we recreate purely from manufacturer datasheets and physical sensitometry?
The engine currently models 40 film stocks which spans colour negative, b&w, slide, motion-picture and instant film. You can explore it directly in the browser editor here demo (uses WebGPU, WASM), or run it via the Mac app, and plugins for Davinci Resolve and Final Cut Pro.
How the simulation works
At its core, Fotufilm follows the physical path of light through emulsion exposure, chemical development, and optical printing:
- Spectral estimation: Input images (ideally scene-linear HDR or OpenEXR) are converted into estimated continuous spectral radiance. Because three RGB channels cannot uniquely reconstruct a full continuous spectrum, this initial step is inherently an approximation, but it allows the film’s published spectral sensitivity curves to calculate how each emulsion layer actually responds to scene light. High-dynamic-range inputs are especially important here, as clipped highlight values in 8-bit JPEGs lose the overexposure information that drives natural shoulder roll-off and halation.
- Emulsion density and layer interactions: The calculated exposures pass through the film’s characteristic curves (D-log H) to determine developed dye density. The model accounts for chemical adjacency effects and inter-layer interactions where development in one layer inhibits or enhances neighbouring dyes.
- Physical halation and grain: Light spreading within the film base causes characteristic highlight blooms (halation), while film grain is synthesized from simulated clump structures. Both grain appearance and halation spread are physically coupled to the selected film format (from Super 8 up to large-format sheet film).
- Print media and scanning: The developed negative density then exposes a simulated print medium, such as Kodak Ektacolor Edge, Endura, or Fuji Crystal Archive paper, or passes through a simulated lab scanner or light box. The choice of paper dramatically shapes the final image, as each print stock carries its own spectral sensitivities, dye absorption spectra, and contrast curves.
Exploring the profiles
The examples below were rendered from scene-linear EXRs in the OpenEXR sample collection on their github using standard profile defaults (unless noted). For reference, panels marked Collection preview show the collection’s own tone-mapped JPEGs, which use an entirely separate display rendering.
Film stocks and color character
Different emulsions reveal distinct personalities across the same scene:
MtTamWest, GoldenGate, and Kapaa across multiple stocks. The Vision3 250D example is printed onto Kodak Vision 2383 motion-picture release print stock.
Physical effects: halation and format-dependent grain
Halation occurs when intense light penetrates the emulsion and reflects off the backing layer:
CineStill 800T halation off and on
Because film grain consists of physical silver halide crystals and dye clouds, enlarging a smaller negative magnifies the texture:
Calibration and physical compromises
A comparison with spektrafilm
I first began building Fotufilm in isolation as a personal experiement to see if I can derive back the original light data from the image/sensor and then model the film chemistry on the basis of datasheets. I discovered spektrafilm only very recently while opening up to publicise my project.
Discovering spektrafilm and the active discussions around it on PIXLS.US was exciting, as it showed a shared community passion for physical, measurement-based simulation rather than empirical LUT fitting. Naturally, I was curious how the two engines’ outputs compare when fed identical scene-linear inputs.
ColorChecker response
To test color behavior, I ran an sRGB color patch target through both engines using Kodak Gold 200 printed on Kodak Ektacolor Edge. For spektrafilm, I generated a 129-cube LUT using its native tooling (spektrafilm profiles are CC BY-SA 4.0, by Andrea Volpato). For Fotufilm, stochastic and optical effects (grain, halation, flare, and local tone mapping) were disabled to isolate the base color transform.
Across the 512 patches, Fotufilm rendered slightly lighter overall, with an average lightness difference of 3.73 L* and a mean colour difference of ΔE₀₀ 6.55.
Samples below
Looking forward & call for scans
Several areas remain open for improvement, notably refining print illuminant spectra and resolving discrepancies in published ETERNA-CP dye and neutral curves.
If you have access to controlled film scans with documented film stock, exposure, development chemistry, and scanning conditions, or if you spot behavior that conflicts with published sensitometry, I would love to hear from you. Technical feedback, edge-case testing, and discussion are very welcome!
Technical details
- Core engine: Written in Swift with image-processing pipelines implemented in Halide with the help of Claude/Codex.
- Platform: MacOS, Web (there is a partly written linux port for the engine using vulkan and cuda). But it should be fairly straightforward as Swift and halide both work well with cross-platform code.
- Licensing: Code is licensed under Apache-2.0. Film profiles are licensed under CC BY-SA 4.0 (this applies solely to profile definitions, not your rendered photographs or videos).
- My background & disclosures: I am a software engineer at Google who has worked on image processing pipelines for the Pixel Camera, this project is not affliated with them. I did this mostly in my free time.
The figures in this post were generated using rendering code from Fotufilm
93eb85b.
Comparison figures use engine commit03e53c0and spektrafilm 0.3.4 at3bb2c2dSample images are copyright Industrial Light & Magic and contributors, used under the OpenEXR BSD licence.








