View Full Version : Rendering Aspect Maps(Slope Maps)

06-22-2011, 03:07 AM
Hello Everyone,

Can anyone please let me know how I could render a height map(slope map)?
PIC (http://www.google.co.in/imgres?imgurl=http://freegeographytools.com/wp-content/uploads/2007/05/slopepic.jpg&imgrefurl=http://freegeographytools.com/2007/terrain-slopeaspect-display-and-analysis&usg=__kfOrXbwRd-si0hEw7nW-02dv-g4=&h=518&w=593&sz=172&hl=en&start=12&zoom=1&itbs= 1&tbnid=1XmXl32aMZQP4M:&tbnh=118&tbnw=135&prev=/search%3Fq%3Daspect%2Bmap%26hl%3Den%26safe%3Doff%2 6sa%3DX%26biw%3D1024%26bih%3D601%26tbm%3Disch%26pr md%3Divns&ei=mLgBTtSbNMvhrAfu2oSGAw)

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.

06-22-2011, 03:37 AM
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.

06-22-2011, 03:43 AM
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?


06-22-2011, 05:00 AM
with color bands :
http://www.pik-potsdam.de/research/resea...sColorBands.jpg (http://www.pik-potsdam.de/research/research-domains/transdisciplinary-concepts-and-methods/modsimenv/simenv/data/figures/2DVisColorBands.jpg)

with interpolated colors instead :
http://www.pik-potsdam.de/research/resea...isPureColor.jpg (http://www.pik-potsdam.de/research/research-domains/transdisciplinary-concepts-and-methods/modsimenv/simenv/data/figures/2DVisPureColor.jpg)

06-22-2011, 10:17 AM
Ah, got it. Thanks!