Another weekend excursion had me wondering if I can generate a sky using the mist
material. Maybe… Here are some notes for now.
Earth atmosphere is continuous, with its density decreasing exponentially as altitude increases. mist
however, is a single-scattering homogenous volume, so we’d have to approximate using ‘slabs’ of mist
volumes, with the thickness of each slab increase exponentially to save computation (so that we don’t trace 100 layers of mist
). Similar concept can be found from the Nishita paper:
Modeling atmosphere scattering can be simplified down to Rayleigh and Mie scattering. Rayleigh scattering part takes care of particles smaller than wavelength, whereas Mie scattering takes care of particles that are larger than wavelength, at least for the part we care about 300-800nm. So naturally, Rayleigh scattering models air molecules and Mie models aerosol particles.
Starting with Rayleigh scattering, the equation for the scattering coefficient is simple: (air density x Rayleigh cross-section). Rayleigh cross-section is wavelength dependent, and we can search for measured values from the internet, e.g. here. Using 680nm, 550nm, and 440nm for blue green and red channel, we arrive at 4.75e-06, 1.27e-05, 2.81e-05 m-1 for our Rayleigh scattering at sea level. Similarly, we can get scattering coefficient at different altitudes (for each of our mist
slab) using different air density number, which we can find from the internet, e.g. libradtran uses Air Force Geophysics Lab data. Parameter to the mist
materials are extinction coefficients, albedo, and asymmetry factor. For Rayleigh scattering, we can assume there is no absorption with air molecules, and isotropic scattering. This means that we can use scattering coefficients as extinction coefficients for the mist
. Once all parameters are set for each ‘slab’ of mist, we can trace rays starting from the lower bound of each ‘slab’, starting from the earth surface. After combining at results from each slab, here is sky with only Rayleigh scattering:
We can do similar things with Mie scattering. With aerosol, we’d have non-zero absorption, and a strong forward scattering (instead of isotropic scattering with Rayleigh). I got all the coefficients from libradtran continental_average aerosol profile here. Here is one with Aerosol scattering only:
Similar combine the two would give us a nice clear sky image:
But I am not sure simply combine the two is the correct way. Any ideas?