Efficient Spherical Harmonics Lighting with the Preetham Skylight Model
Ralf Habel, Bogdan Mustata, Michael H. Wimmer · 2008
We present a fast and compact representation of a skylight model for spherical harmonics lighting, especially for outdoor scenes. This representation allows dynamically changing the sun position and weather conditions on a per frame basis. We chose the most used model in real-time graphics, the Preetham skylight model, because it can deliver both realistic colors and dynamic range and its extension into spherical harmonics can be used to realistically light a scene. We separate the parameters of the Preetham skylight models spherical harmonics extension and perform a polynomial two-dimensional non-linear least squares fit for the principal parameters to achieve both negligible memory and computation costs. Additionally, we execute a domain specific Gibbs phenomena suppression to remove ringing artifacts.