Rendering Aspect Maps(Slope Maps)

Hello Everyone,

Can anyone please let me know how I could render a height map(slope map)?

Here is an example. Now, I tried to generate the map using a lot of lines, i.e finding slope and then assign a color to the line based on the slope. But that becomes very slow. Is there any other way I can do this?

Thanks in advance.

An easy and efficient way is to render the terrain normally using triangles, textured with 1D texture representing the color scale, the world up coordinate being used as texture coordinate.
Use “GL_NEAREST” sampling if you want to avoid gradients between colors, and keep the “banding” effect.

Thanks for the reply Zbuffer. Could you please explain what you meant by this:

>>keep the “banding” effect.

What exactly did you mean by banding?


with color bands :…sColorBands.jpg

with interpolated colors instead :…isPureColor.jpg

Ah, got it. Thanks!