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

Help with terrain-algorithm

Started by fallex Jan 31, 2005 at 4:05 PM 19 replies 3.4k views
Original Post
fallex
fallex
Hi all! Help me plz to make choice. I'm going to rewrite my terrain-engine, because of its weakness. It's a RTS terrain-engine, thats why it needs to render huge lanscapes in a little time with good Level of detail. What good articles do u know on this subject? ROAM, SOAR, GeoMipMapping and others are too old. I need something fresh. I want to combine QuadTree, LODs, Splat-mapping and something else. Shaders maybe. But i haven't information. The biggest problem is LOD. Can anybody help me?
Kibble
Kibble
RTS terrain really doesn't need LOD, you just need to cull terrain that isn't visible. You probably don't even need a quadtree, just a simple grid. You may want a quadtree for collision and other interaction between units though.
fallex
fallex
The thing is that in my terrain-engine camera is almost free, thats why i need quad-tree and LODs. But it's a RTS. So i needthe fastest and the best algorithm of LOD+QuadTree...
Palidine
Palidine
well, LOD and quad-trees are essentially parallel processes or can be made so pretty easily. So i'd implement quad-trees first then throw some LOD into the mix if you find you need it. why do you say ROAM is "too old"? have you tried it with your game and found it to be slow? boolean logic is pretty old too (mid 1800s), but dammed if it ain't still useful in CS. :)

-me
caesar4
caesar4
-even with a free camera (ground control 2 like) it would be better to use a "volumetric" quadtree (each node has three dimentions as compared to a regular grid)
-use CLOD based on the patch center distance from the camera eye, that way u can render the entire patch in one tri strip

-splatting would be easier to do with shaders, cuz u can then render up to 4 details in one render pass. the prob is that not many people have vs and ps 2.0
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)
fallex
fallex
I haven't tried ROAM, but i've never heard about using ROAM+splat-mapping. And ROAM is very expensive algorithm, as i know...
And my height-map stores in memory. It could be usefull.
fallex
fallex
Can u give some links to articles, which discover
1) volumetric quad-trees
2) CLOD
fallex
fallex
No. I need just articles or links. Some sources maybe. The main problem is lack of information.
Ademan555
Ademan555
Well, CLOD can be one of two things, Continuous level of detail (a general term, and the most common use) or chunked level of detail, a specific algorithm (which is a type of discreet level of detail (DLOD), just to confuse things). As far as a quadtree goes, my quad tree is actually a n-tuple tree, it has a variable number of children, so the majority of the tree will be interpreted as an oct tree... but then the terrain is actually a class derived from a generic tree node... and then the terrain, has its children, which are really just quad tree nodes, and have 4 children each rather than 8 (but they still cull with AABB's)

as far as i can tell, a "volumetric" quad tree, is just a quad tree that uses 3d axis aligned bounding boxes rather than just 2d ones...

hope that wasnt too confusing/not well thought out/whatever, and hope it helps
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out hi
fallex
fallex
Thx, but i need some implementation and good tutorial. Can u help me with links?
Palidine
Palidine
[google]: "CLOD terrain tutorial"

[google]: "volumetric quadtree tutorial"

start there anyway. also have you looked through the Articles section of this site? there's lots of good stuff there.

-me
fallex
fallex
This is the main problem - i've spent not one hour, trying to find something usefull...
Palidine
Palidine
Quote:
Original post by fallex
This is the main problem - i've spent not one hour, trying to find something usefull...


not sure if this means you spent less than an hour or more than an hour. anyway this article is linked directly from the articles section of this site:

http://www.gamasutra.com/features/20000228/ulrich_01.htm

seems to be pretty much exactly what you're looking for. gotta learn how to navigate the articles section, most of the stuff you'll need can be found there very quickly.

-me
fallex
fallex
I've seen it, and i've seen demo+source, but source is very tricky. Is there another implementations of it?
caesar4
caesar4
a volumetric quad tree is like an octree, but instead of 8 child nodes, u have 4, and each node has its own tight axis aligned bound box which is computed from all the contained objects. the x and y bounds are on a regular grid, plus u have a height bound, making it volumetric
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)
caesar4
caesar4
there is one more way to do the splatting as im experimenting right now, but requires the use of dx9
u can use vertex declarations, keep the vertices and one set of detail texture coordinates in one vertex buffer, and have another vb with ONLY colors. that way instead of using 5 textures, u use 4 (a r g b controling each detail channel)without touching the main vertex buff.
the other plus is the argb colors are interpolated between triangle vertices, so the transitions can be smoother and it takes less memory than a 4x4 alpha pixels per cell
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)
fallex
fallex
Quote:
there is one more way to do the splatting as im experimenting right now, but requires the use of dx9
u can use vertex declarations, keep the vertices and one set of detail texture coordinates in one vertex buffer, and have another vb with ONLY colors. that way instead of using 5 textures, u use 4 (a r g b controling each detail channel)without touching the main vertex buff.
the other plus is the argb colors are interpolated between triangle vertices, so the transitions can be smoother and it takes less memory than a 4x4 alpha pixels per cell

Does this method eat many resources?
caesar4
caesar4
i think it eats less resources, because one color buffer, COMBINED with shaders can significantly reduce memory usage by eliminating the need for 16bit alpha textures, and can provide some speed improvement, because ure doing up to 4 detail layers at once

(D3DFMT_A8 is rarely supported, so for EACH alpha texture u must use a 16 bit format like D3DFMT_A4R4G4B4)
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)
fallex
fallex
Thanks.
nDealO
nDealO
If any of you guys are seriously thinking about terrain rendering, geometry clipmaps are the way to go for sure right now. One word: VBOs. If anyone has any information related to geometry clipmaps, I would be interested in exchanging ideas.

I am currently using geo-mipmapping for my terrain rendering and am working on implementing geo-clipmapping shortly.

cheers,
N

yahooIM: nealo_dealo_2000

Topic Locked

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

Sign in to reply to this topic.