
Submitted by , posted on 16 June 2003


Image Description, by
This is an implementation of Spherical Harmonic Lighting to partially simulate Global Illumination for static models on a pervertex level, in realtime. The executable itself contains a lot of SHspecific visualisations such as an Associated Legendre plot and 3D representations of the SH bases.
The simulation starts of by generating SH coefficients for each vertex in 3 types of lighting model: diffuse unshadowed, diffuse shadowed, and diffuse interreflected; all lit by an HDR image light source. For each vertex, integration over the sphere is performed using a MonteCarlo Estimator with 10,000 samples, and then projected onto 4 bands of Spherical Harmonics. For the first time the program starts this will take a while to generate, after which the SH coefficients will be cached to file for you to run again.
There is also an implementation of Ivanic/Ruedenberg's SH rotation algorithm, presented in verbose form that should be easily correlatable with their original paper. This manifests itself in the form of backrotating the HDR light source SH vector into the model objectspace.
Both the source code and executable are available on my webpage for
those interested in the technique: http://www.donw.co.uk .

