Any implementation of physical lens flare / glare usable with Blender?

I know that lens flare as a highly visible effect gets a bad rap, and with good reason. However, I have come to appreciate the fact that glare and flare are simple facts of life in all images. Even the human eye is subject to these effects, so no image that fails to incorporate them (even if they are very subtle) can appear truly realistic.

There are a number of papers describing how to implement this stuff, but from what I can see it would be sample-prohibitive to try and path-trace such things with Cycles.

Still, maybe there are such tools usable with Blender and I never noticed? Maybe someone has done a special add-on or implementation? Anyone know how to get really proper glare and lens flare other than faking it or using the glare node?

my eye has lens flares ??.. i highly doubt it, but maybe you could use driver orconstraint of a semi transparant circle/hexagon, between camera and a sunlamp position

@RazorBlade Your eyes do have glare. try looking straight at the light from a streetlight or car headlight. you will see glare.

No, physical means it uses raytracing (of some sort) to simulate reflection and dispersion between parts of the lens. So a driver for a hexagon in the scene is nothing like what I am looking for.

As far as your eye - your eye is also a lens system and so also has these effects - light reflecting off parts of your eye before hitting the retina. That is why you see lines and stuff when looking at a bright light. The reason you don’t see all kinds of crazy ghosts like from cameras is that your eye doesn’t have a whole bunch of glass pieces, just the cornea, basically… but there is definitely still glare.

Basically, bright lights don’t look like simple geometric outlines to you. They appear to be “glowing”. That’s glare.

Have you done any tests mimicking the real stuff in 3D?
Will go through the paper to see what about…

For now…
I know Maxwell has Simulens (diffraction, scattering, vignette)…

& a bit of contemplating on the matter:
Started looking at the sun when i was a kid & my eyes are still top notch… even now looking at it shows as a perfect circle. I think human brain also helps to deglare vision in small amounts. Otherwise any obstacle/photon transition creates an effect to some extent (particles in tears, membrane, lens, different liquids - different IOR).


haven’t tried mimicking any of this in 3D, I think any of these effects would count as caustics, and when your entire frame is full of caustics I think stuff gets rather slow…

That said it would be worth a try, might give it a go to see what happens.

Thanks for the links, but I take it you are not aware of any comparable tool that works with cycles. Hmm. I think it would help to have better tools for glare. Notice how much more real the maxwell lightbulb example feels with that stuff added…

True, caustics are slow all over the unbiased tracing realm.
& Cycles being a simple uniPT has some advantages & also other disadvantages, on that note you should read this thread: Bidir Pathtracing for cycles?
With Cycles, composite in post is best solution for now.

There are only these options. Either you have an renderer which simulates a physical camera or you fake it, either in the 3d view or in Compositing.
But you could also film actual lensflares with a light and a camera in a dark room like JJ Abrahms did to fullfill his compulsive Lensflare addiction when filming Star Trek. Then comp it into your footage.

So, here’s my thought. If you have a Z-pass and the raw render, isn’t that enough to simulate lens effects? I know that Cycles itself is not practical for simulating lenses, but I feel that some purpose-built, specialized raytracer (like the one in the paper) could do lens effects after the fact? It seems like there could be an add-on that does that, if not a compositor node…

well, it looks like this died 2 years ago - and the issues seem to indicate that it was somehow conceived as a setting for lamps? Not sure if this is the same type of thing.