POV-Ray : Newsgroups : povray.binaries.tutorials : TerraPOV - Sky system - Atmosphere - Part 1, General Server Time
21 Dec 2024 11:56:31 EST (-0500)
  TerraPOV - Sky system - Atmosphere - Part 1, General (Message 1 to 1 of 1)  
From: Bruno Cabasson
Subject: TerraPOV - Sky system - Atmosphere - Part 1, General
Date: 4 May 2009 08:11:36
Message: <op.utemtmhsm1sclq@pignouf>
After some experiments in POV, after seeing some POV artits' artwork, it  
appeared to me soooo clear that the only way to get realistic behaviour  
and colors for atmosphere is to follow ... reality. IOW follow physics and  
nature, as much as possible. Having a physically-realistic atmosphere will  
produce correct colors, and correct lighting for scenes, and also correct  
illumination for clouds and radiosity.

So, the main question is: what makes the atmosphere have such colors in  
such circumstances? That is:

     -) Why is the sky blue?
     -) Why is blue deeper at high altitudes?
     -) What makes the atmosphere become reddish at low elevations of the  
sun?
     -) What makes the atmosphre have such a variety of colors, especially  
at low elevations of the sun?
     -) How to have a correct illumination when the sun is below the  
horizon?
     -) etc ...
     -) How to make it 'automatic'?

The answer is: follow reality. That is:

     -) Have a physical model that can be handled by POV-SDL
     -) Determine the variables of this model
     -) Implement the model

All the aforementionned behaviours are due to the interaction between the  
sun's light and the atmosphere. This interaction is itself due to the  
sun's light spectrum, to the kind and density of particles in the  
atmosphere, and to the length of the path of the light through them. Every  
kind of particle has a specific scattering and absorption behaviour.  
Unless particular events (aurorae ...) air particules do not emit light by  
themselves. I will consider such phenomena later. These interactions  
produce a complex combination of colors which yields what we can observe.

This being said, lets deal a bit with those considerations.

A) SUN's spectrum
In nature, the sun's spectrum is not really white. Some wavelenghts are  
missing. But, in outer space, the color of the sun is reported by  
astronauts as being 'very' white. TerraPOV will default the sun's color to  
white.

B) Kind and density of particles
Until now, I distinguish global atmosphere and ground atmosphere.

Global atmosphere contains air molecules that are responsible for the  
Rayleigh scattering which produces the blueness of the sky, yellowishness  
of direct sunlight, and blueishness of shadowed areas. Please, refer to  
the Web for further information about Rayleigh scattering and blue sky.  
TerraPOV uses one media for that. The atmosphere also contains other  
particles, in various shape, size and behaviour. This is described by  
another media with scatterring and absorption parameters (color and  
amount).

Ground atmosphere is reponsible for this haze we can see near horizon and  
can influence a lot on resulting aspect of the sky. This includes all  
kinds of pollution, water vapour, specific gases and so forth. This is  
also described by a media with scatterring and absorption parameters.

As you know, the pressure of the atmosphere decreases with altitude. A  
search on the web informed me that the pressure decreases 'quite'  
exponentilly with height, and that the significant thickness is about  
50km. Beyond this altitude, the relative pressure is less than 1/1000 than  
that of sea level. The pressure at altitude h for an atmosphere of  
thickness T can be expressed with a formula of the kind p = Pmax *  
exp(-k*h/T). As density is directly related to pressure, TerraPOV use such  
formulae for all altitude-related densities. In order to match the values  
found on the web for the pressure/altitude relationship, the factor k is  
around 6.7 fot a thickness of 50km. In TerraPOV, Dmax, k and thickness are  
controllable.

C) Length of the light path trough atmosphere
This aspect is due to geometrical considerations: the earth is round, and  
the atmosphere is a shell around. Therefore, the length of the path of  
light depends on the elevation of the sun, and the geometry determines the  
way this length increases/decreases with elevation. This, with density, is  
responsible of the reddening at low elevations. TerraPOV uses a round  
earth and the atmosphere is a shell around it, with an exponentially  
decreasing density as exposed above.


Well here we are for this article. Next article will deal in detail with  
the geometrical model related to TerraPOV's sky system, and the first code  
fragments will appear.


Bruno.

-- 

http://www.opera.com/mail/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.