Skip to content

Film Stock 0.1.0: the picture shot on film and printed, its grain simulated grain by grain from the stock's granularity, with weave, halation, flicker, dirt, a 24 fps cadence and day for night - #30

Merged
kevinraymond merged 1 commit into
mainfrom
film-stock-0.1.0
Oct 29, 2026
Merged

kevinraymond merged 1 commit into
mainfrom
film-stock-0.1.0

Conversation

@kevinraymond

Copy link
Copy Markdown
Owner

The picture shot on film and printed, modeled from the film rather
than laid over it.

Grain is the Boolean model of stochastic geometry as Newson, Delon and
Galerne used it for film (CGF 2017), simulated rather than summarized:
for every pixel and layer the number of developed grains is drawn from
its Poisson law, and once the grains are big enough to see (0.4 px),
each is drawn where it falls with its own log-normal radius and the
pixel's coverage by it is the lens where it meets the pixel's disk.
Both give the model's mean exactly and its spread within about 15%
(dev/protos/film_stock/grain_check.py, against the model rasterized).
The grain's size on the film comes from Kodak's published rms
granularity by Nutting's formula, and on screen from the Gauge (35 mm,
16 mm or Super 8: micrometers of film under a pixel), so smaller film
is grainier, softer, weaves further and halates wider, as it does.

Six stocks (two modern color negatives, a 1970s one, a color reversal,
two black and whites), each a table: characteristic curve, grain
radii and spread, resolving power, halation, dye impurity, tints. The
negative is read a little soft (softer in color) and printed on a
steep print curve, or the reversal shown as it is. Halation exposes
the red layer around what is brighter than white; the gate weaves;
the lamp flickers (capped at 5%, under WCAG's 10%); dust, hairs and
scratches land on the print; frames hold at 24, 18 or 16 a second;
Day for Night after Thompson, Shirley and Ferwerda (JGT 2002), its
second blur a triangle. Beats kick the film in the gate and drops
splice the reel, through the flash gate; loudness pushes the grain;
sections show a cue mark.

Patents (private/patents/film_stock.md, board #4825): the task's paper
(Zhang, Wang, Tian and Pappas, TOG 2023) is Northwestern's US
12,705,810, granted 2026-08-11, which claims deriving the grain's
second-order statistics from constant-value portions and synthesizing
correlated signal-dependent noise from them; nothing here derives
statistics or scales noise. Netflix's AV1 grain (US 10,839,489) and
Autodesk's reference-image measurement (US 7,873,210) kept out too.

Measured on the M2 Pro at 1280 x 720: 2.3 ms GPU at the defaults, 60
fps; Super 8 at Grain 3 draws its grains one by one at 6 to 13 ms,
still 60 fps (an earlier loop enumerated five times the grains it
needed, dev/probes/film_stock_cost.py). Flashes: Off adds nothing on
the dancer, flowers or koi, Calm at most one a second, red 0
everywhere. Idle: 0 of 349 operators cook unused.

Showreel 0.1.28 with twenty-seven effects; README hero re-tiled.

…ulated grain by grain from the stock's granularity, with weave, halation, flicker, dirt, a 24 fps cadence and day for night

See the pull request description.
@kevinraymond
kevinraymond merged commit 2f08e24 into main Oct 29, 2026
1 check passed
@kevinraymond
kevinraymond deleted the film-stock-0.1.0 branch October 29, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant