Nodes/MKRShift_Nodes/Lens Dirt Bloom
ComfyUI Node

Lens Dirt Bloom

Grungy, filmic glow that doesn't look like a plugin

By criskb·Created 7 months ago·Updated 5 months ago· 0
Lens Dirt Bloom
  • image
  • mask
  • image
  • mask
  • lens_dirt_bloom_info
settings_json{"threshold":0.72,"softness":0.1,"bloom_radius":18.0,"bloom_strength":0.75,"dirt_amount":0.65,"dirt_scale":72.0,"dirt_contrast":1.35,"tint_r":1.0,"tint_g":0.96,"tint_b":0.88,"seed":23,"mix":1.0,"mask_feather":10.0,"invert_mask":false}

Plain bloom is easy to fake and even easier to make look like a default After Effects filter - that smooth, clean glow is a dead giveaway. Lens Dirt Bloom is the MKRShift node that does bloom with character: the bright regions get a soft glow, but the glow is modulated by a procedural dirt/scratch pattern, so the highlights look like they're flaring through a slightly filthy lens. It's the difference between "glowy image" and "this was shot on real glass," and it's fully procedural - no texture downloads, no external plates, just a seed.

It's in MKRShift Nodes/VFX/Optics, and it's one of the pack's better "break the AI look" tools. The KB's photorealism doc is blunt that realism is a stack of optical truths; a dirty, blooming highlight is exactly the kind of small truth that makes a frame read as captured.

How it works

Two passes in one node:

Bloom - pixels above threshold (0.72) get selected with softness, blurred by bloom_radius (18) and added back scaled by bloom_strength (0.75). That's the glow.

Dirt - the node generates a dirt texture procedurally from seed (default 23): a base noise field layered with smudge blobs, fine grain, scratch lines, and a vignette darkening the edges. dirt_scale (72) sizes the pattern, dirt_contrast (1.35) makes it read clearly. That texture is then multiplied into the glow, so the bloom is dirtier where the pattern is dense and cleaner where it isn't. The tint_r/g/b (defaults 1.0/0.96/0.88 - a faint warm cast) color the whole effect so it flatters skin and skies instead of staying neutral-cold.

The seed is the fun control: change it and you get a whole new "lens" - different dirt, different scratch placement, same character. Same seed = same lens, every time, which matters when you want a look to match across a sequence.

Outputs and wiring

image is the finished glow, mask is the bloom/dirt region, and lens_dirt_bloom_info reports what it did. The optional mask input scopes the effect. Wire it into your preview or straight to save; it's cheap enough for per-frame video work.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

then restart, or search MKRShift_Nodes in ComfyUI Manager. No models, no pip requirements - the dirt texture is generated from the seed at runtime.

Practical tuning: if the dirt reads as visible blotches rather than atmosphere, raise dirt_scale (bigger, softer pattern) and lower dirt_amount. If the glow is too clean, crank dirt_amount and change the seed until you hit a lens you like. And keep bloom_strength moderate - the dirt pattern amplifies whatever you feed it, so a heavy bloom gets heavy. If it looks like a film filter poster, you've gone one setting too far; the sweet spot is when the dirt is felt rather than inspected.

CategoryMKRShift Nodes/VFX/Optics

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"threshold":0.72,"softness":0.1,"bloom_radius":18.0,"bloom_strength":0.75,"dirt_amount":0.65,"dirt_scale":72.0,"dirt_contrast":1.35,"tint_r":1.0,"tint_g":0.96,"tint_b":0.88,"seed":23,"mix":1.0,"mask_feather":10.0,"invert_mask":false}
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
lens_dirt_bloom_infoSTRING