Nodes/AfterDark Film AR Selector/AfterDark Film Optics & Artifacts
ComfyUI Node

AfterDark Film Optics & Artifacts

Light leaks, sprocket flares, and vignetting — procedural, no texture packs

By hackafterdark·Created 9 months ago·Updated 4 days ago· 4
AfterDark Film Optics & Artifacts
  • image
  • image
light_leak_styleC-41 Fiery Core Flare
leak_locationRandom / Scattered
leak_intensity0.35
vignette_amount0.00
vignette_falloff1.5
gate_border0.00
seed0

Half of what makes old photos read as "film" is pure accident - light leaking past the film gate, a lens that darkens the corners, sprocket holes bleeding through the frame edge. AfterDark Film Optics & Artifacts synthesizes all of it with tensor math, which means no overlay textures to hunt down and blend. You pick a leak style and a location, and the node builds the whole thing procedurally per run. It's the pack's chaos node, and it's genuinely fun.

It's in the HackAfterDark category. Think of it as the "texture of the physical camera" layer: the pack's grain node handles the emulsion, this one handles everything the camera itself did wrong.

How it works

The leak engine is the star. Ten light-leak styles (C-41 Fiery Core Flare, Crimson Red Base Burn, Tungsten Blue Burn, Vintage Magenta Leak, Sunburst Golden Flare, and more) get painted onto one of 17 named location templates - corner burns, edge strips, the Triple-Chamber Solarized Burn, the Anamorphic Lens Flare Streak. Each location is a distance-to-geometry mask multiplied by a seeded bicubic "noise cloud" so the shapes look organic instead of geometric, then tinted with a white-hot core / colored outer gradient and blended with a screen blend. That's the classic 1 - (1-img)*(1-leak), so leaks add light without crushing blacks.

On top: vignette_amount / vignette_falloff darken the corners with a radial falloff whose exponent you control (the README cites the cos⁴ optical law; the code implements a normalized-radius power), and gate_border fades the frame edges like the film gate was slightly blocking the image. The 35mm Sprocket Hole Flares location is the hidden gem - eight rectangular perforation tabs confined to the outer margins, modeled on shooting unmasked 35mm.

Inputs that matter

  • light_leak_style - None plus 10 styles; Random Organic Multi-Layer picks a random color every run.
  • leak_location - Random / Scattered or one of 17 named templates.
  • leak_intensity (0–1, default 0.35) - how strong the leak is.
  • seed (optional) - drives the spatial jitter, scaling, and location choice.

Output is a single image (IMAGE), after VAE decode and before save.

Installing it

Same one-time setup as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/hackafterdark/ComfyUI-HackAfterDark-Nodes

Restart ComfyUI, or install via ComfyUI Manager by searching "HackAfterDark" (pack title AfterDark Film AR Selector). No model downloads, no API keys, no external assets - everything is generated from PyTorch.

Where people get tripped up

The one gotcha worth knowing: with seed left at 0 and leak_location set to Random / Scattered, the node deterministically picks the Wide Gate Leak every single run. The "random" label is aspirational unless you actually seed it - set a non-zero seed (or wire in a random seed widget) to roll the dice across all 17 templates. Otherwise the results are repeatable, which is fine when you've found a look you like. And a friendly warning from experience: subtle is the way. A 0.35 leak at one corner reads as "shot on film"; a full-intensity random multi-layer across the whole frame reads as "your camera was on fire."

CategoryHackAfterDark

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
light_leak_styleCOMBOC-41 Fiery Core Flare11 options: None, C-41 Fiery Core Flare, Crimson Red Base Burn, Tungsten Blue Burn, Vintage Magenta Leak, Sunburst Golden Flare, +5
leak_locationCOMBORandom / Scattered18 options: Random / Scattered, Dual-Border Holga Leak, Triple-Chamber Solarized Burn, Wide Gate Leak (Asymmetric Bar), Vertical Curtain Gap, First Frame Load Leak (Full Wash), +12
leak_intensityFLOAT0.350–1
vignette_amountFLOAT0.000–1
vignette_falloffFLOAT1.50.5–3
gate_borderFLOAT0.000–0.15
seedoptINT00–18446744073709550000

Outputs (1)

NameTypeDescription
imageIMAGE