Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Don Williamson, posted on June 16, 2003




Image Description, by Don Williamson



This is an implementation of Spherical Harmonic Lighting to partially simulate Global Illumination for static models on a per-vertex level, in real-time. The executable itself contains a lot of SH-specific visualisations such as an Associated Legendre plot and 3D representations of the SH bases.

The simulation starts of by generating SH co-efficients for each vertex in 3 types of lighting model: diffuse unshadowed, diffuse shadowed, and diffuse inter-reflected; all lit by an HDR image light source. For each vertex, integration over the sphere is performed using a Monte-Carlo 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 back-rotating the HDR light source SH vector into the model object-space.

Both the source code and executable are available on my webpage for those interested in the technique: http://www.donw.co.uk .


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Archive Notice: This content is archived, and commenting is no longer active. It is here for reference purposes. This content was added on an older version of flipcode, before the site closed in 2005.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.