Skip to main content
GameDev.net gamedev.net
🔒 Locked

Terrain

Started by Hippokrates May 24, 2003 at 12:06 PM 5 replies 1.6k views
Original Post
Hippokrates
Hippokrates
I have some questions about terrain rendering using OpenGL: 1) Which method (Brute Force, Quadtree, Octree, ROAM, GeoMipmapping, etc.) would you use? And why? 2) How do you render your terrain? By calls to glVertex or using something else? 3) How do you texture your terrain?
Im Anfang war die Tat...Faust
Cifko
Cifko
I''m not guru in terrain rendering.

1) Octree is good for this, but use some occluders too.
2) I use vertex array
3) Mutli texturing, one mapped to small arrea, and one to big.



GreatOne
GreatOne
I've written my own terrain engine, and I'm in the process of getting it to texture nicely, but anwyay...

1) I use a quadtree + Geomipmapping. I personally think an octree is over kill for terrain unless you have floating islands or something. I've heard chunked LOD yields much better performance than geomipmapping, but I haven't experienced a much greater performance increase. If you code a good geomipmapping implementation, which isn't hard, you should be fine.

2) My quadtree splits my terrain into patches. Then I choose an appropriate detail lvl based on a few factors including distance. Then using one call to glDrawElements, I render the patch.

3) I use the method outlined by Yann L in this thread. I'm still working on this, and I got good results, but it was very slow. However, using Cg and its fragment shading capabilities, I think I can pull it off. But using Cg pretty advanced stuff for someone attempting their first terrain renderer. If I were you, I would just take a really really big texture and stretch it over the entire map.

Hope that helps.

[edited by - greatone on May 24, 2003 4:53:06 PM]
-------------------Realm Games Company
Hippokrates
Hippokrates
Which leads me to this question:
How do you compute the GeoMipmap Levels and how do you store them?
Im Anfang war die Tat...Faust
GreatOne
GreatOne
Do you have a working brute force (i.e. no LOD or quadtree) terrain render right now? If not, code one, then ask about how you compute LOD levels for each patch. If so, its really quite simple. First look up geomipmapping on google, and read the paper on it by William De Boer. If you still don''t yet understand, after you''ve done all those things, come back and I will explain it in more detail. But it won''t do you much good until you''ve got a more than basic understanding of terrain and geomipmapping.
-------------------Realm Games Company
Hippokrates
Hippokrates
Well, actually I read that paper before posting this question.
In addition to that I have already read a book on terrain programming. The author used a kind of GeoMipmapping, too. He computed 2 terrain resolutions using ROAM and stored them. But I would like to know if there are other ways.
Im Anfang war die Tat...Faust
blizzard999
blizzard999
The common solution is to use height map (BYTE, WORD or FLOAT) : your h-values are stored in a simple matrix.
Then perform a recursive algorithm using quadtree...

See papers on
http://www.vterrain.org/

In most case you compute ''geomipmap'' real time by simply stop the algorithm on a high order quadtree...the real difficult task is to manage T-cracks (near quads that have different LOD).
The differences between these methods are mainly
1) How to choose the LOD (distance, roughness, screen-error,...)
2) How to manage T-junctions

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.