The key fields for a Fog Node are color, visibilityRange, and fogtype. The color of the fog
illustrated is white or (1, 1, 1), which is the default color. The visibilityRange
is the visible distance and is given in meters. If the visibilityRange is 0,
the fog is dsiabled. The fogtype can be either LINEAR or
EXPONENTIAL. The fog at the left is linear, while the fog below is exponential.
Both have the same visibility range.
Exponential Fog
This image has an exponential fog. The ground may or may not be visible, depending on
the fog type and the browser plug-in being used.
Backgrounds
Backgrounds are not effected by fog. In the illustration the pink box is partially hidden
by a fog, but the background is not affected at all. To make the background disappear
into the fog it is necessary to create a background that is a single color matching the fog color.
The code for a light gray fog with matching background is shown below.
Fog {
color 0.9 0.9 0.9
fogType "EXPONENTIAL"
visibilityRange 50
}
Background {
skyColor 0.9 0.9 0.9
}