Mask maps are greyscale images, such as that shown below, that are used in game engines to mask user-defined quantities such as grass coverage, vehicle accessibility, tiberium density, etc. A mask map is typically an 8-bit greyscale image.
In L3DT, mask generators are objects that create a mask maps. They do this by calculating a 'score' at each pixel using a set of parameters and weightings for terrain altitude and slope (gradient), water depth and salinity, and land type coverage. The parameters in a mask generator parameters may be viewed and edited using the mask editor window, shown below:
For each of the altitude, gradient, water depth and salinity parameters, there is defined a minimum and maximum value, as well as a 'ramp' for each, and a weighting for the overall parameters.
The meaning of the minimum, maximum and ramp values shall now be explained using the altitude settings in the above example image:
For each mask parameter, a score between 0 and 1 is generated. The total score is calculated from the product of the scores of each mask parameter, and is then rescaled to a range of 0…255 for storage as an 8-bit image.