Hello here (if ever some people are still there :p ).
Here we are for improving our atmosphere model. Last post produced our
first blue sky using Rayleigh scattering media and following physics. Now
let's play a bit with some parameters. This will help us to see how the
model works, and to validiate the principle.
A) Playing with some parameters
We try different values: -5°, -1°, 1°, 5°, 20°, and 70°, all other
parameters unchanged. We get FirstBlueSky_-5_-1-1_5_20_70_deg.png. Not so
bad, considering we only changed the elevation of the sun. The principle
seems to work. We do have the redenning of the light, and we get something
'acceptable' when the sun is below the horizon. Obviously, these are not
perfect colors, but I recall, this is what we obtain considering only pure
atmosphere, with only Rayleigh scattering, no other particles, no other
effect or property. Not so bad on my opinion.
We set the elevation to 45°. Remember: the camera has angle = 40° and a 5°
pitch upwards. And we set altitude to different values: 2*m, 1000*m,
4000*m. We get FirstBlueSky_2_1000_4000_m.png. Visually and with a color
picker, we can see how the brightness decreases with altitude. This
behaviour was expected because at high altitude, the light encounters less
molecules (less distance + less density), there is less scattering, and we
see less blue and more black from the outer space (considered as 100%
3) Density power factor
As seen previously, the density of the atmophere can be expressed by: d =
Dmax*exp(-k*h/T), where h is the atitude and T the thickness of the
atmosphere. In TerraPOV, the factor k os split into a default value
TP_BASE_RAYLEIGH_POWER that expresses 'normality'and valued to 6.7 for a
50km thick atmosphere, and a multiplying factor TP_RAYLEIGH_FACTOR,
defaulted to 1.
As we increase TP_RAYLEIGH_FACTOR, the density curve will sharpen and
become more spiky. The transition near the horizon will also be sharper.
The overall number of particles will also decrease and there will be less
scattering, yielding less reddening at low elevations. The sky will darken.
As we decrease TP_RAYLEIGH_FACTOR, the density curve will flatten. The
transition near the horizon will also be smoother. The overall number of
particles will also increase and there will be more scattering, yielding
more reddening at low elevations. The sky will lighten.
The picture RelativeDensity.png shows curves of relative density for
TP_RAYLEIGH_FACTOR = 0.5, 0.75, 1, 1.25, 1.5. The number of tarversed
particles is proportinal to the surface under the curve until considered
REM: We can also control Dmax and compensate loss or gain of scattering,
but it's another aspect. And it sems we do not - at first - need to change
Let's set elevation to 45° and vary TP_RAYLEIGH_FACTOR: we get
Let's set elevation to 2° and vary TP_RAYLEIGH_FACTOR: we get
The general behaviour seems to work fine, already with a basic model for
atmosphere (pure atmosphere with only air molecules and only rayleigh
scattering). It will soon be time to control the color values (Hue,
Saturation, Light) and compare with photographs. This will help us
determine correct values, and also reveal the limitations of this simple
model. The model will then be augmented with additional medias to get
closer to what we observe in nature.
To be continued in next post: TerraPOV - Sky system - Atmosphere - Part4,
A Better model (cont'd)
PS: Congratulations if you have read me until this point !!!
Utilisant le client e-mail révolutionnaire d'Opera :
Post a reply to this message
Download 'firstbluesky_-5_-1_1_5_20_70_deg.png' (47 KB)
Download 'firstbluesky_2_1000_4000_m.png' (14 KB)
Download 'relativedensity.png' (20 KB)
Download 'firstbluesky_rayleigh_factor_0.5_0.75_1_1.25_1.5_elev45.png' (22 KB)
Download 'firstbluesky_rayleigh_factor_0.5_0.75_1_1.25_1.5_elev2.png' (44 KB)
Preview of image 'firstbluesky_-5_-1_1_5_20_70_deg.png'
Preview of image 'firstbluesky_2_1000_4000_m.png'
Preview of image 'relativedensity.png'
Preview of image 'firstbluesky_rayleigh_factor_0.5_0.75_1_1.25_1.5_elev45.png'
Preview of image 'firstbluesky_rayleigh_factor_0.5_0.75_1_1.25_1.5_elev2.png'