Realistic Camera - Lens Flares and Bokehs

My idea is to extend the realistic camera model in order to simulate some of the lens-internals related phenomenas in real cameras: lens flares and bokehs.


A neat final rendered image could feature the Hoover Tower:

Other examples of nice flares are:


Examples of bokehs are:


Proposed Implementation

To do that, I would add the following to our lens model:

  1. reflection on the lens surfaces
  2. scattering on the lens surfaces (in particular on the front lens, which causes light sources outside the angle of view to contribute to the image)

  3. reflection/scattering off the inside of the barrel of the lenses
  4. wavelength-dependency of these optical laws (lens flares often have colourful components so there's clearly a wavelength-dependency)

Other minor extensions to the realistic camera model would include simulating the shape of the diaphragm (aperture blades) which can cause artifacts of the same shape on the picture (often hexagonal).

The final goal would be to obtain "physically-realistic" pictures of lens flares and bokehs.

In addition to the aesthetic objective, it would be interesting to compare the obtained images to the "empirical" lens flares that have been used in videogames and other mainstream applications like Photoshop for a long time.

An example of an "empirical" lens flare effect as seen in videogames.

A very cheap-looking lens flare off my cs248 videogame. :)

  1. A Realistic Camera Model for Computer Graphics - http://www.graphics.stanford.edu/papers/camera/

  2. Understanding Lens Flare in Photography - http://www.cambridgeincolour.com/tutorials/lens-flare.htm

  3. http://en.wikipedia.org/wiki/Lens_flare

  4. http://en.wikipedia.org/wiki/Bokeh