terrain map examples?

Hi, I’ve just unsuccessfully trawled the site for example code for rendering terrain and haven’t found anything.

Did I miss something?

Ultimately I’d like to do something with Orthogonal Illumination Maps…

If anyone has any idea on where I can find more detailed information about implementing this stuff with GL, then please point me in the right direction.



Well, I posted on my site a sequence of code to demonstrate how to make a simple terrain from a very simple to a more advanced manner.

I dont use lightmaps yet, but a good start is there…


[This message has been edited by mancha (edited 07-11-2002).]

If you want to generate simple terrain you can load the Texture into the memory, and read the RGB of each pixel… THe color will represent the hight of your terrain … Then just create a grid of vertices and depending on the color their Hight will vary … Ten use GL_TRIANGLES to connect them and you have terrain …

However if you know how to read .raw files, its MUCH easier to generate terrain then with Bitmaps … You can just use Photoshop to save picture as .raw … Then just read each Character of from the file and save it in BYTE array[x][y] … Its very simple and give you Good terrain to start with .