Lens flares are generated by tracing rays through lens systems based on real values. The lens and its parameters such as glass thickness and anti-reflective coating dictate the look.
Everything is written in python and opencl which allows the application to run on Windows and Linux and doesn't require a GPU... in theory.
With nearly all render parameters exposed, you can expect to be overwhelmed until the UI gets cleaned up. But for now, you have total control to adjust every tiny setting.
There are clear plans on integrating this application into Nuke. However, there are a lot of issues to solve before that process can even begin.
Realflare includes support for OCIO. Let's be real though, the viewers are locked to sRGB. But hopefully there's more support coming soon.
The theory and algorithm is based on the research paper Physically-Based Real-Time Lens Flare Rendering by Hullin, Eisemann, Seidel and Lee.
The created lens flares are built from two components, the ghosts (bokeh shaped artefacts) and the starburst (the glint at the center of the light source).
The ghosts are generated by tracing rays of light through a lens model. As the rays travel through the system, different shapes, glass materials and anti-reflective coatings dictate the path of these rays. When they hit the sensor, they produce a deformed image of the aperture opening.
Create stunning glares that are based on an aperture shape.
The starburst pattern is the light being diffracted into a far-field pattern as it passes through the aperture. This can be modeled using the Fraunhofer approximation equation.
The preset system is so bad right now, that it's not even working. It's basically a bunch of .json files, but they're all interlinked, and it's really convoluted. Essentially I have to redo all that but as soon as that's done, you can expect a revolutionary preset system with thumbnails.
This project was always more. It was supposed to be a way for me to learn about optics, about renderers, python, qt, c++ and whatever else came along. As I am working on this project I want to start documenting my journey and share what I learned from everyone else.
Without people who documented everything they did, I would have never been able to write my own renderer in OpenCL, I would have never been able to learn about the math required to generate these shapes. I think it's only fair to document all those articles and share it with everyone else.
This application does not really work yet and is currently being developed. There's a myriad of reasons why you shouldn't try to use this tool. However...