PDA

View Full Version : How GL generates terrain from a bitmap



snupinokyo
03-12-2003, 03:24 AM
How GL generates terrain from a bitmap
where can i see the algorithm?

Thnx

Deiussum
03-12-2003, 05:31 AM
It doesn't. That's something you'd have to do yourself, and there are many ways you could do this.

jleffelm
03-12-2003, 07:01 AM
I think you are refering to using a grey scale bitmap for the height of the terrain? To do this you would read in the greyscale bitmap. Then each pixel represents a vertex, and the color value refers to the height of the terrain. So you have heights ranging from 0 to 255.

Knew I had seen a link on the NeHe sight, this might help you:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=34

-Drew

[This message has been edited by jleffelm (edited 03-12-2003).]

[This message has been edited by jleffelm (edited 03-12-2003).]