Assigning land types

Determining which land type goes where in the attributes map is done by evaluating 'scores' for all the land types at every pixel in the map. The land type with the highest score at a particular heightfield pixel wins, and is assigned to the attributes map. The score for a land type is a function of several properties calculated from the heightfield and water-map, including:

Each land type has a set of coefficients for these values that determines the weighting effect in the final score for the land type (see land type definition). For example, a 'beach sand' land type might have positive coefficients for water and salinity (because you find sand near salty water), but negative coefficients for gradient and curvature (because you don't often find steep, bumpy beaches).

The equation (or a part thereof)

The equation for used to calculate the 'score' for each land type looks like this:

score = BaseScore + gradient × cgrad + curvature × ccurv + ... etc (perlin noise, water, salinity)

Where:

The additional perlin, water, and salinity terms are of a more complex nature, and will not be listed here.