Nodes/ComfyUI-Image-Effects/๐Ÿ’ก Lens Flare
ComfyUI Node

๐Ÿ’ก Lens Flare

That Cinematic Lens Flare, With a Real Optics Menu (Anamorphic, Starburst, Hex)

By orion4dยทCreated about a year agoยทUpdated about a year agoยท 28
๐Ÿ’ก Lens Flare
  • image
  • IMAGE
โ—„flare_typeclassicโ–บ
โ—„intensity0.5โ–บ
โ—„size0.30โ–บ
โ—„position_x0.70โ–บ
โ—„position_y0.30โ–บ
โ—„color_temp5500โ–บ
โ—„rays6โ–บ

Lens Flare drops a lens-reflection glow onto your image - the cinematic glint you see when a light source hits the optics - and it comes with a choice of flare types that matter: classic, anamorphic, starburst, and hexagonal. That last one is the giveaway this node thinks about optics rather than just stamping a glow: hexagonal flares come from blades in real apertures, and anamorphic flares are the horizontal blue streaks you see in every JJ Abrams shot.

It's one of the pack's Light Effects, and it's the finishing move for anything you want to look shot rather than generated - a sun in the corner, a headlight, a neon sign. The flare is composited over your render, so it goes near the end of the graph.

How it works

The node renders the flare as a set of blurred, layered elements drawn around a source position. The flare type changes the geometry: classic is the round radial glow with concentric ghost circles, anamorphic stretches everything horizontally (the horizontal blur is a one-directional filter pass, which is why it looks like real anamorphic optics), starburst draws ray spikes radiating from the source, and hexagonal builds the six-bladed aperture shape. All of them get a heavy Gaussian blur so they read as light scatter, not shapes.

The color_temp input (2000โ€“10000K, default 5500 neutral) sets the flare's color via Kelvin-to-RGB - warm golden for a sunset, cool blue for night streetlights. rays only matters for the spiky types, controlling how many spikes the starburst gets.

The inputs that matter

  • flare_type - classic, anamorphic, starburst, hexagonal. Pick the look first.
  • intensity (0โ€“2, default 0.5) - flare brightness. Under 1 for taste; over 1.5 is a lens-flare-heavy look on purpose.
  • size (0.1โ€“1, default 0.3) - how big the flare gets.
  • position_x / position_y (default 0.7 / 0.3) - where the light source sits in the frame. The default is a classic "sun upper-right."
  • color_temp (2000โ€“10000K, default 5500) - flare color.
  • rays (4โ€“12, default 6) - spike count for starburst/hexagonal types.

Output is the composited IMAGE.

Installing it

Ships in ComfyUI-Image-Effects (Orion4D). ComfyUI Manager โ†’ search "Image Effects", or:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects
cd ComfyUI-Image-Effects
pip install -r requirements.txt

Restart, then it's under Add Node โ†’ Image Effects. No models - it's OpenCV drawing and blurring.

Gotchas

Pack-wide: only the first image of a batch is processed, CPU-bound. The aesthetic trap with lens flares is placement - the whole point is that a flare comes from a light source, so match position_x/position_y to the bright spot already in your image (or add one). A flare floating over flat darkness reads as a mistake instantly. And there's a fine line between "cinematic" and "every phone camera app from 2015": keep intensity at 0.5โ€“0.8 and size moderate, and let the flare type do the talking - anamorphic at low intensity is the one that most reliably looks like a real production still.

CategoryImage Effects

Inputs (8)

NameTypeDefaultDescription
imageIMAGEโ€”
flare_typeCOMBOclassic4 options: classic, anamorphic, starburst, hexagonal
intensityFLOAT0.50โ€“2โ€”
sizeFLOAT0.300.1โ€“1โ€”
position_xoptFLOAT0.700โ€“1โ€”
position_yoptFLOAT0.300โ€“1โ€”
color_tempoptFLOAT55002000โ€“10000โ€”
raysoptINT64โ€“12โ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEโ€”