Rendering outdoor scenes is a complex task due to the many lighting effects that are present. Some of these lighting effects can be quite subtle and hard to notice at first. Others, such as Rayleigh scattering, make a drastic improvement in the rendering. This page shows a progression of images of a landscape with increasing visual realism. Each image in the progression adds a new atmospheric lighting effect to the mixture. For each effect that is added the realism improves but the computation time also increases. Often the scaling between rendering quality and computational expense is not linear – a particular effect may be quite expensive to compute and yet improve the rendering only in a small measure. This non-linearity motivates research on improving rendering algorithms that can reduce the computation time while not compromising rendering quality too much.
The major difference between outdoor rendering and indoor rendering is that, for indoor rendering, one does not need to worry about the presence of the atmosphere. Although the atmosphere is still there when one renders the interior of a room, the distances involved are quite short and the atmosphere does not have a chance to influence the lighting of the room. For all purposes, in indoor rendering, the atmosphere can be regarded as perfectly transparent and passive and one only needs to worry about the way that light bounces around on the surfaces of the furniture in the room. The only exceptions to this rule occur when there are significant concentrations of smoke or dust in the air of the room that are not normally part of the composition of the atmosphere. For outdoor rendering, the atmosphere becomes a significant part of the rendering equations. What makes realistic rendering for landscapes especially difficult is the large range of distances involved. Some terrain features can be quite close to the observer while others can be kilometres away, close to the horizon. A realistic outdoor rendering algorithm needs to account for all light interactions across this large range of scales.
We use a procedural terrain, defined over a sphere, as the geometry to test the rendering of atmospheric lighting effects. As the name implies, a procedural terrain is defined by a procedure in a computer program that implements a function returning the height of the terrain for every point on the sphere. The function is fractal and is capable of generating terrain detail everywhere. The generation of the terrain over a sphere means that we are actually simulating an entire planet and, by controlling the size of the terrain features versus the size of the sphere, we can have the same sense of scale of terrain that one can find on Earth. We have placed the observer looking horizontally towards the horizon so that a very large range of terrain features becomes visible in the image. The sun was placed to the left of the observer and at a very low angle above the horizon. This creates the opportunity for the terrain to interfere with the propagation of light, creating shadows known as crepuscular rays. The image below illustrates the directions towards the observer and towards the sun for the set of images that we have rendered.
A local lighting model accounts for the direct interaction of the light coming from a light source (the sun in this case) and the surface of the terrain. This is the simplest lighting effect that can be considered, if one wishes to see anything other than just a black picture. The light arrives from the sun, is reflected off the surface of the terrain and goes on towards the observer where it forms the image. We consider the terrain to be a perfect diffuse reflector, meaning that it reflects light equally in all directions. This is reasonably true for terrain but would be inappropriate if water was present either in lakes or oceans. Some terrain features can be seen in the image but the overall shape of the terrain is difficult to discern.
A local lighting model should only be applied for points on the terrain that are visible from the sun. If the light on a part of the terrain is blocked by other parts of the terrain, it does not make sense to evaluate the local lighting model there. This implies that, for every point on the terrain, it is necessary to trace a line towards the sun and check that this line does not touch any other part of the terrain. The parts of the terrain that are in shadow will be pitch black at this stage. The image, after shadows have been included, is still a bit confusing. If anything can be perceived it is that the sun is indeed at a very low angle above the horizon, due to the large amount of shadowing involved.
This is where things start to get interesting. The atmosphere is made of gas molecules. The light is made of photons. When photons travel through the atmosphere they can collide with gas molecules and bounce off in a different direction to the one they were initially travelling. What is more, this bouncing effect is dependent on the wavelength (or colour) of the photons. Low wavelength (or blue) photons bounce more than high wavelength (or red) photons. With all those blue photons bouncing around in all directions, it is easy to understand why the sky appears blue. Rayleigh scattering introduces an important component to landscape rendering known as aerial perspective. The more distant a mountain is the bluish it looks and the less contrast it has against other nearby terrain features. Because the distance to far away mountains is greater, more blue photons can get in the way between the mountain and the observer, making the mountain look like it is blue. This effect gives a sense of depth to landscape renderings. Aerial perspective was discovered by the Italian painters of the Renaissance – notice the blueish mountains in the distance of Raphael's Mond Crucifixion.
.We stop our progression into ever increasing realism here as the rendering times are already getting to be quite long. The last image took about two days to render in parallel on 30 processors. This rendering time could have been significantly reduced if we had used optimised algorithms and data structures for light scattering and reflection. We used instead simple implementations for most of the effects with no optimizations considered. The most significant lighting effects have already been considered but there are many other effects that could have been included. Some of these are:
A good book on lighting phenomena in the atmosphere that does not use much technical language and is accessible to everyone is Minnaert's "The Nature of Light and Colour in the Open Air". It explains all the phenomena that we have presented here and plenty more.
Excellent photographs of atmospheric lighting effects can also be found in Les Cowley's Atmospheric Optics website. Some of the phenomena shown there are quite rare and difficult to photograph.