Physically Based Lens Flare Phillip Ho CS348b Final Project Spring 2011
Final Image
What is lens flare? Various artifacts of optical systems Diffraction, internal reflection Simulated
But why simulate an artifact? Dramatic effect Emphasize brightness Camera imperfections add to realism Implies that an image is “un-edited”, original footage from the camera
Where is it used? Video games Animated feature films Live action films
Technical Aspects - Starburst Starburst pattern Caused by diffraction with aperture blades Light waves that hit small-scale geometry diffract according to Huygens-Fresnel principle Points of interference become sources of spherical waves Resulting pattern is the superposition of these waves http://www.cameratechnica.com/2011/02/24/how-to-create-and-avoid-starburst-highlights/
Technical Aspects - Starburst Represent aperture shape and imperfections as texture maps
Technical Aspects - Starburst Fraunhofer approximation of power spectrum FFT{ } =
Technical Aspects - Starburst FFT computed for average wavelength 575nm Different wavelengths create the same pattern at different scales Superimpose multiple scaled copies at each wavelength to get resulting starburst Largest starburst 330nm Smallest starburst 770nm
Technical Aspects - Starburst Post-processing technique to smooth/blur Superimpose multiple copies with random rotation and opacity
Technical Aspects - Ghost Ghost artifacts Caused by interreflections of light rays within lens system Fresnel equations determine reflectivity
Technical Aspects - Ghost Trace rays through camera system Interreflections between each pair of interfaces Weight by reflectivity Only consider second-order interreflections
Technical Aspects - Ghost Photon mapping-like implementation Interpolate between photons to reduce noise
Technical Aspects - Ghost Anti-reflective lens coating alters ghost coloration Well-kept manufacturer secrets Solution: user-defined coloration Lens 1: Lens 2: Lens 3: Lens 4: Lens 5: … Monochromatic lens flare Colored lens flare
Technical Aspects – Chromatic Aberration “Fringing” effect seen at the edges Light waves refract at different angles Refractive index varies for different wavelengths Wavelength determines the IOR to use for Snell’s law
Technical Aspects – Chromatic Aberration Split light rays into RGB components Cauchy’s equation where A and B are unique to the lens material
Putting It All Together Essentially more light on the sensor Linear Dodge (Add) in Photoshop!
Credits References Web pages Technical Papers How to Create (and Avoid) Starburst Highlights (http://www.cameratechnica.com/2011/02/24/how-to-create-and-avoid-starburst-highlights/) Understanding Lens Flare (http://www.cambridgeincolour.com/tutorials/lens-flare.htm) Flare (http://toothwalker.org/optics/flare.html) Spectral Rendering (http://www.baylee-online.net/Projects/Raytracing/Algorithms/Spectral-Rendering/Material-Properties#Dispersion) Raytracing Chromatic Aberration (http://senlinhou.wordpress.com/2010/12/07/raytracing-chromatic-aberration/) CS348b ‘03: Rendering Glare (http://graphics.stanford.edu/courses/cs348b-competition/cs348b-03/glare/) CS348b ’07: Realistic Camera Lens Flares (https://graphics.stanford.edu/wikis/cs348b-07/JulienChaumond/FinalProject) Technical Papers Matthias B. Hullin, Elmar Eisemann, Hans-Peter Seidel, Sungkil Lee. Physically-Based Real-Time Lens Flare Rendering. In: ACM Transactions on Graphics, Vol. 30 (4), 2011 (Proc. SIGGRAPH). Tobias Ritschel, Matthias Ihrke, Jeppe Revall Frisvad, Joris Coppens, Karol Myszkowski, Hans-Peter Seidel. Temporal Glare: Real-Time Dynamic Simulation of the Scattering in the Human Eye. Proceedings Eurographics 2009, Munich 30 March—3 April 2009. Spencer, G., Shirley, P., Zimmerman, K., and Greenberg, D.P. Physically-Based Glare Effects for Digital Images. In Proceedings of SIGGRAPH. 1995, 325-334. Kakimoto, M., Matsuoka, K., Nishita, T., Naemura, T., and Harashima, H. Glare Generation Based on Wave Optics. In Proceedings of Pacific Conference on Computer Graphics and Applications. 2004, 133-142.
Questions?