How do you create a terrain in opengl ?
Printable View
How do you create a terrain in opengl ?
The same way you make any other object :)
Easiest way is to use a heightfield, say 10x10 nodes. Each of these nodes has a value from (say) 1 to 100, giving its height. Then, the hard part is generating a triangle strip across these values.......
Google should help you if you search for things like this.
Also, anything on www.gamedev.net might be useful.
Would a textured quad be good for a flat terrain ?
Depends on where you plan to go with it. Lighting and Fog look REALLY BAD when applied to a very large quad, and you dont get very much flexibility. A better way would be to create several quads, and map a texture over all of them.
Z.
It's still best to decompose a single large object, since OpenGL only calculates lighting, etc., at the vertices, so the more vertices you have the closer you get to specular lighting (Phong shading, per-pixel shading, etc.) - there's a discussion on this at www.opengl.org.