Utah Sun & Sky Model (uthSnSkM)

key: uthSnSkM

type: fffffffC(C)*

  1. float: Turbidity, a measure of haze in the atmosphere, must >= 1.0  (e.g., 2.0 for a pretty clear day or 10.0 for an overcast day)
  2. float: x component of direction to the Sun
  3. float: y component of direction to the Sun
  4. float: z component of direction to the Sun  (direction an observer would look to see the sun)
  5. float: x component of up direction
  6. float: y component of up direction
  7. float: z component of up direction (direction an observer would look to see the top (zenith) of the sky)
  8. int: Mode (0 means include both the Sun & Sky, 1 is Sun only, 2 is Sky only)
  9. chunk: Color for ground reflectance (used to compute a ground color when looking below the horizon)
  10. optional additional chunks: none are currently used

Description

Includes a model of the Sun and Sky using the model published in "A Practical Analytic Model For Daylight" by Preetham et. al.,  SIGGRAPH 1999


Examples

% sun sky model

uthSnSkM
2.0 %turbidity
0.4 0.2 0.7 %sun vector
0.0 0.0 1.0 %up vector
0 %include both sun and sky
rgb 0.1 0.15 0.05 end %ground reflectance
end