Wednesday, August 1, 2012

Spherical Harmonics for Diffuse Objects Lighting

I found my ray tracer code is in a mess and redesigned it. I want to write an unbiased path tracer this time and it is not finished yet. 

For a relax, I turn to play with OpenGL and GLSL again. Anyway, it is a much easier way to implement graphics techniques with help of them.

Spherical harmonics approximation is similar with approximating a function in terms of Fourier series but the function is defined over sphere now. When reading about its history, you will meet great mathematicians such as  Pierre Simon de Laplace and Adrien-Marie Legendre again. It also reminds me of discrete cosine transform for image compression. Both the techniques only pick low frequency ( most significant ) parts of data. 

Here are some of my results,

Diffuse teapot lighting by Uffizi Gallery Probe.

 Diffuse*0.8+Mirror Reflectance*0.2 lighting by Uffizi Gallery Probe.

 Diffuse teapot lighting by Grace Cathedral Probe.

  Another diffuse teapot lighting by Grace Cathedral Probe.

References


An Efficient Representation for Irradiance Environment Maps,Siggraph 01, pages 497-500, 
project site:

http://www.cs.berkeley.edu/~ravir/papers/envmap/

A good reading about Spherical Harmonics is at Appendix B of
http://zurich.disneyresearch.com/~wjarosz/publications/dissertation/

and The Orange Book.

No comments:

Post a Comment