Atmospheric light scattering: Difference between revisions

Jump to navigation Jump to search
Line 61: Line 61:
When the sun is high enough in the sky, the situation to render is as follows: Light penetrates the thin upper atmosphere, as it filters through, Rayleigh and some Mie scattering create the blue sky. Dependent on the model for the amount of high haze and water vapour to be specified by the weather system, this is handled by the skydome shader.  
When the sun is high enough in the sky, the situation to render is as follows: Light penetrates the thin upper atmosphere, as it filters through, Rayleigh and some Mie scattering create the blue sky. Dependent on the model for the amount of high haze and water vapour to be specified by the weather system, this is handled by the skydome shader.  


As the light reaches the first significant cloud layer, light intensity is much reduced. As clouds are drawn outside the terrain and skydome shading codes, this can not be explicitly computed by the shader, neither is it computationally feasible to compute the shadow cast by each cloudlet by ray tracing in real time. Thus, the relevant parameters (<b>rendering/scene/scattering</b> for the light intensity reduction at the position of the aircraft and <b>/environment/surface/scattering</b> for the light reduction on the ground) must be modelled by the weather system (which knows the cloud layer position) and passed to the shaders.
As the light reaches the first significant cloud layer, light intensity is much reduced. As clouds are drawn outside the terrain and skydome shading codes, this can not be explicitly computed by the shader, neither is it computationally feasible to compute the shadow cast by each cloudlet by ray tracing in real time. Thus, the relevant parameters (<b>rendering/scene/scattering</b> for the light intensity reduction at the position of the aircraft and <b>/environment/surface/scattering</b> for the light reduction on the ground) must be modelled by the weather system (which knows the cloud layer position) and passed to the shaders. The visual difference between shaded terrain and unshaded terrain is illustrated by the following two screenshots:
 
[[File:Cloudshade01.jpg|400px|No terrain shading by clouds]] [[File:Cloudshade02.jpg|400px|Terrain shading by clouds]]


After passing through the cloud layer (usually the lowest layer beneath which the ground haze layer starts), the light is attenuated due to the diffuse scattering in the layer, which leads to additional intensity reduction by fog self-shading which can be computed in the shader.
After passing through the cloud layer (usually the lowest layer beneath which the ground haze layer starts), the light is attenuated due to the diffuse scattering in the layer, which leads to additional intensity reduction by fog self-shading which can be computed in the shader.
1,360

edits

Navigation menu