Lens Flare System (WIP)

So, I got a little bored a couple of nights ago, and someone (@Jim Morren, I name thee) made comment about a lens flare in one of my shots. One thing led to another, and now I’ve gone and built an entire modular lens flare construction system inside Blender’s compositor.

It’s still very much a work in progress, with some issues to iron out, but here are some tests I set up:

They are all procedurally generated inside Blender’s compositor, using a large variety of elements like these that I made:

The hard part has really just been working out the math operations required to put the various elements in their respective locations, along with the order of operations to get everything moving, rotating, scaling, squashing and stretching properly.

I am planning on throwing the system up here for free when it’s done, so stay tuned for that. I also plan to rebuild the system in Nuke once I’m happy with how it works in Blender, so that I can use it both for work and personal projects, as well as making it available for a variety of software. It shouldn’t be hard to do that, as I’ve already worked out how it all works.

So far the limitations with it are:

  • It requires manual input of 2D X and Y co-ordinates of the flare source. This can be done using a 2D track, but it is an extra step compared to ones done within the 3D viewport

  • Blender’s compositor is a little bit slow when calculating this many things at once, so it really would require rendering out the flare once it’s been animated. New versions of Blender look like they are making some dramatic changes to the compositor’s speed, so this will hopefully be less of a problem soon


The upsides outweigh the downsides though, I think, because this system allows the following:

  • Full customisation of the flare (down to individual element)

  • Intensity can be manually animated / adjusted, so there aren’t any issues with flickering from rendering issues

  • Disabling and adjustment of flare post-render

  • Can be used for real footage, not just 3D renders, along with integration of 3D with real footage

  • No issues with depth of field or fiddly setup procedures


Anyhoo, just thought I’d share what I was up to 🙂 Hopefully it’s as interesting for you as it’s been for me!