|
-
Jul 5th, 2002, 01:45 PM
#1
Thread Starter
New Member
Opengl Question
How do you create a terrain in opengl ?
-
Jul 5th, 2002, 02:27 PM
#2
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jul 5th, 2002, 07:16 PM
#3
Thread Starter
New Member
Would a textured quad be good for a flat terrain ?
-
Jul 5th, 2002, 10:39 PM
#4
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.
-
Jul 6th, 2002, 07:26 AM
#5
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|