Layered Fog
 
 
 

In a mountain scene viewed from above, the valleys may be filled with fog while the peaks are crystal clear. In fact, there may be several layers of fog with clear air between them (see the following illustration).

The Alias system lets you create a one-dimensional table of values to use for layered fog by using a column of data from a pix or mask file.

If you don't specify a file, a smooth ramp is used to create the fog. If you specify a file, you may also specify a column, which indicates the horizontal position for the column. By animating the column position between 0 and 1 (the left and right sides of the texture file), you can vary the layers of fog over the duration of a scene. Use a file or ramp that has some variation across the file. By taking advantage of the variations, fog layers can appear to move or be made to appear and disappear. The height of the column corresponds to values between AltitudeMin and AltitudeMax, the lower and upper boundaries of the fog. Outside of this range, fog is assumed to be absent.

Argument Name Absolute Range Useful Range Default Description
amult -infinity, infinity -1, 1 1 Scaling factor for layered fog density
aoffset -infinity, infinity -1, 1 0 Offset factor for layered fog density
depth (triple) 0, infinity 0, 100 10, 10, 10 Decay constants for the air
fog_color (triple) 0, infinity 0, 255 255, 255,255 Colour constants for the air
min_altitude -infinity, infinity -10, 10 0 Bottom of the fog layer
max_altitude -infinity, • -10, 10 1 Top of the fog layer
column 0, 1.0 0, 1 0.5 Animation key to fog data
density_file     no default Mask file name for 8-bit density image
fogtype =     012other no fogconstant foglayered fogno fog