Alternate terrain shading

Mike pointed me to an interesting slide deck by Leland Brown in October 2010, about using a fractional Laplacian to colour a terrain map instead of the usual altitude greyscale or hill shading. The results are pretty nice and the presentation of how he did it is quite clear.

Conceptually, what he’s doing is a bit like a standard altitude greyscale. Ie: 0′ is black, 15,000′ is white, and use a grey ramp inbetween. But the transform he applies highlights local terrain differences. Ie: the shade of a pixel isn’t just its absolute altitude, but also how it differs based on its neighboring pixels. It’s a little analagous to edge enhancement on an image: find regions of high variance and highlight them. The result is a map that’s essentially altitude coloured, but with highlighting of local terrain details.

One nice aspect of the math he’s using is that it’s scale invariant. That means the algorithm makes sense at all scales and, also, doesn’t need to be recalculated at different scales.

The computation is more expensive than hill shading but not terrible: he says he can do 10,000 x 10,000 pixels in a few minutes. He notes at the end it’s a bit tricky to do this with tiled data, because you should consider data outside the tile itself when doing the rendering.