Visit PANCROMA Website

Go to www.TERRAINMAP.com
Close this Window

Height Dependent Coloration

In a previous section I demonstrated how satellite imagery could be overlaid on a DEM in order to create a more interesting and useful image. But what if no suitable satellite image can be found to match the elevation model? In this case, you can use a different technique to create the impression of natural terrain features. It is one that mapmakers have used for a long time to add realism to their maps – adding elevation dependent coloring.

One application of this technique is to color code the DEM image with an arbitrary color scheme. This allows areas of similar elevation to be picked out quickly from the map. These colors are associated with a map key that relates the color to the corresponding elevation value.

A variation of this technique is to add elevation dependant color that corresponds to natural terrain features, such as vegetation, exposed rock, and snow. If these colors are added such that the lowest elevations are green, medium elevations are rock-colored, and the highest elevations are snow white, the result can correspond to realistic terrain features.

POV-Ray provides an object for accomplishing elevation dependent coloration called the texture map. A texture map is a collection of textures, which in turn are made of combinations of standard textures and/or colors or color maps. This object can be arranged so that layers of textures of different colors will be applied to the modified object such that they are arranged in layers in an arbitrary direction.

In our case, if we create a texture map with a green layer on the bottom, a rock-colored layer in the middle, and a snow-colored layer on top, we can apply the map to our height field, with the gradient in the y or "up" direction. The result will be green vegetation in the valleys, bare rock on the mountains with snow capping the peaks. As an added touch I filled in the lake shown on the map by intersecting the model with a blue-colored box object in POV-Ray. I was able to create the effect by orienting the box so that the upper box object surface was parallel to the lake surface. I nudged the box into place until the top surface just broke through the surface of the lake on the model.

The two images to the right show a DEM painted with a single color, and then the same DEM with elevation dependant coloration applied. Compare this result with the satellite image in the section above.

I plan to add a utility to apply elevation dependent coloration to DEMDRAPE soon. In the meantime, drop me a line if you want the POV-Ray script for the image on this page.

[Solid Color DEM]

[DEM Image with Height Dependent Color.  Click to enlarge.]