Lens Dirt
Smudge the lens like you've actually been shooting
- image
- dirt_texture
- IMAGE
Real photos are shot through dirty lenses - a smudge in the corner, a streak of dust across the glass - and it's one of those imperfections that makes a frame feel captured rather than rendered. This node layers a dirt texture over your image with a screen blend, reshade-style, and lets you point it at any texture you like. The pack even ships a folder of ready-to-use dirt textures under assets/textures/dirt/, so you can get the effect going without sourcing your own grunge.
How it works
You give it a dirt texture either by path (dirt_path) or by wiring an IMAGE into the optional dirt_texture input - the path is the convenient one, the input is the flexible one (you could generate a procedural grunge mask anywhere in the graph and feed it in). The texture gets scaled to your image and, with crop_to_aspect on (default), rotated and cropped to match your frame's aspect ratio so a portrait-format photo doesn't get a landscape-stretched smudge.
Then the blend: the dirt is multiplied by intensity, and applied with a screen blend - 1 - (1 - image) * (1 - dirt). That's the reshade move: screen blending only lightens, so dark dirt texture brightens the image where the "dirt" is, which is how lens grime (backscatter, haze, smudges catching light) actually reads on camera. Black texture = no dirt, bright texture = smudge. The author says it plainly: "get some dust or dirt texture where black is not where dirt is." opacity is the final Photoshop-style blend of the whole effect.
Inputs that matter
- dirt_path - path to a dirt texture file (or leave it and use the input)
- dirt_texture - optional IMAGE input; overrides the path when wired
- intensity - how strong the dirt reads
- crop_to_aspect - match the texture to your frame's aspect ratio (on by default)
- opacity - final blend, 0–100
One IMAGE in, one IMAGE out.
Install
Part of Photography Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/TrophiHunter/ComfyUI_Photography_Nodes
Restart, find it under TrophiHunter/Photography (ComfyUI Manager: "Photography Nodes"). The "dependency" is the bundled texture assets, which clone with the repo.
Where people get burned
The screen-blend direction trips people up: a dark dirt image barely does anything, because dark = no effect. Your texture should be mostly dark with bright smudge areas - that's where the haze lands. Second, on very clean, high-key images even a faint dirt texture can look like a dirty monitor instead of a dirty lens; keep intensity low and let it hide in shadows. And don't confuse this with the pack's Physically Accurate Lens Dirt sibling (which is a heavier, threshold-driven effect) - this one is the light-touch everyday grunge.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| dirt_path | STRING | — | |
| crop_to_aspect | BOOLEAN | true | — |
| intensity | FLOAT | 0.5000–1 | — |
| opacity | INT | 1000–100 | — |
| dirt_textureopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |