The modelling stage turned out to be one of the most difficult parts of the implementation. Designing a realistic atmosphere is more complex than one would imagine. Volume modelling of such complex processes is definitely going to be an important issue as we strive towards filling in the gaps between the surfaces of our current illumination models.
Rayleigh scattering (equation 7)
is the dominant scattering by particles of roughly the same size as the wavelength of light and is inversely proportional to the the fourth power of the wavelength. The scattering is equal in the forward and backward directions, but less to the sides.
Mie scattering is a more complex theory that describes the scattering by larger spherical particles and is usually approximated by the Henyey-Greenstein phase function:
where expresses the asymmetry in the scattering.
Figure 2: Hazy Day
The atmosphere in figure 2 is lit from above, has a low haze layer (Mie scattering), a cloud layer (Mie scattering) and the rest is air (Rayleigh scattering). The shape of the clouds was generated using the fourier filtering method described in . The air density function is a polynomial approximation to the U.S. Standard Atmosphere 1976 from . was discretized to 128x64x32 in 6 directions with grid size of a kilometre/cell. The time for 150 scattering steps was 630 seconds on 8k processors of CM2. The ray traced, view dependant, step took roughly 40 seconds on the 128 cell Fujitsu AP1000 for a 400x300 image (with 8450 polygons in a 20x20x3 uniform spatial subdivided bounding structure). The ground is not lit correctly via the solution in these pictures as the code was still under development.