Storing Landscapes as Height Fields

Landscape data is typically stored as a height field, or elevation grid. A height field is simply an evenly spaced 2D array of values, where each value represents the height of the landscape at that point on the ground. Height fields are a natural and easy way of storing elevation data, and many natural landscapes can be represented with height fields. Those landscapes that cannot be represented with height fields have cliffs or overhangs, where there would be multiple heights for a particular ground location. Fortunately, many natural landscapes do not have such overhangs, since gravity tends to cause overhangs to eventually fall to the earth, thus forming the simple hills and valleys which we can model with height fields.

We can obtain such height field data for real-world locations based on geographical surveying information. For artificial landscapes, we can create the height field by hand in a normal 2D paint program. If we make a 2D gray scale image, then the darker values of gray could represent lower elevations and lighter shades could represent higher elevations. We can then easily and intuitively paint a landscape, as if we were viewing it from above.

We can use tiles to reduce the memory requirements of a large landscape. The idea is to create several small landscape maps, all of which match on the edges. Then, by combining these tiles in various ways, we can generate varied landscapes with reduced storage requirements. Of course, such a scheme introduces repetition into the landscape, but clever arrangement of the tiles can hide this fact. Also, using the same tiles at different elevations is an effective reuse technique. To reuse a tile at different elevations, the geometry within the tile would need to slope upwards or downwards, so that the tiles match up seamlessly on the edges.

Was this article helpful?

0 0

Post a comment