Skip to main content
gamedev.net
🔒 Locked

Landscapes

Started by _ShaDoW_ 16 replies 850+ views
Original Post
_ShaDoW_
_ShaDoW_
Hello all, For a while i''m learning to code in c++, i used VB for 4 years, and did DirectX within VB as well. So i know a couple of things about 3d programming. For now, i want to make a landscape engine, such like Black & White, the settlers, etc.. I''ve no idea to start from, i''ve been reading some about using Quadtree''s is this what i need for a good landscape? If so, could someone give me some URL''s for more info about them, if not, someone give me a type of engine i should use, some URL''s would be handy Thanks in advance, Martin
DW-za
DW-za
I hear Octrees are better for out door enviroments... it''s basically the quadtree principle with another dimension, so it''s not the anti-Christ. If I recall correctly, you can find stuff on this at www.Gamasutra.com or/and www.flipcode.com. If you want to try something else, you could also search for ROAM, which in theory is really an excellent "theory", but some experts consider it a bit CPU-expensive to play around with (but it highly intuitive...).

Being punctual is only making your mistake on time...

Murphy
Being punctual is only making your mistake on time...Murphy1 to 3 chefs make a good restaurant 100 chefs makes a McDonaldsTim Sweeney
zerwit
zerwit
Octree''s do not replace quadtree''s. You should either go with quadtree''s or roam, personally I think quadtrees are a little simpler than roam. Octree''s are not used to make continuous level of details, thats the difference.

*** Triality ***
*** Triality ***
LilBudyWizer
LilBudyWizer
Just what I needed since that is what I''m working on now.
Keys to success: Ability, ambition and opportunity.
Ingenu
Ingenu
?
Octree are a kind of strucure, they are used to what you choose to used them for.

Octree are best than Quadtree in the way that they handle 3D terrain much more than them.
Basically you can see a Quadtree as almost a 2D handler.
(no caves, terrain is almost plane)

An octree can be considered as a 3D handler.
(Mountains, caves, strange terrain..)

Of course you can use Octree to do LOD/MRM.
About ROAM a problem I see with it is the integration of strucrues (like house) on a ROAM terrain.
And the fact that it''s handled as only ONE object.
(Clipping maybe problematic)

However you should read ROAM and adaptive Quadtree Articles to grab ideas and simply know them.

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
zedzeek
zedzeek
"Octree are best than Quadtree in the way that they handle 3D terrain much more than them.
Basically you can see a Quadtree as almost a 2D handler."

ild disagree with this i''ld say the opposit if ure in a terrain situtaion use quadtree BTW how many caves did u go into today

another quote
"For a while i''m learning to code in c++, i used VB for 4 years, and did DirectX within VB as well. So i know a couple of things about 3d programming."
im sure we''re all interesting in knowing how u know about 3d programming from knowing VB,C++

(sorry im in a strange mood)



http://members.xoom.com/myBollux
_ShaDoW_
_ShaDoW_
I said i knew "some" about 3d programming, i did a simple fps game in VB once.....
Ingenu
Ingenu
Octree allow you to produce any kind of landscape you can think about much more easily than Quadtree.

A quadtree is ''flat'' compared to an Octree so I think I wasn''t wrong telling you that Quadtree are for terrain with little ''bumps'', while Octree can handle fantasy terrains.

Of course, the depending on what kind of terrain you want to make you''ll use one or another.
The Octree structure let you more freedom in designing your terrain than a Quadtree IMO.

Note also that most people use heightmaps with quadtree, and that it heavily reduce the freedom you have in creating your terrains.

I don''t think you should begin straight C++ coding with a 3D engine, I would advice you to create simple programms and maybe a 2D engine (using OpenGL to learn the API you may want to use in your 3D engine, and benefiting from 3d acceleration and nice effects) before writing your 3D engine.

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
LilBudyWizer
LilBudyWizer
A real programmer can use any language he pleases for whatever task he chooses :-P
Keys to success: Ability, ambition and opportunity.
D
D
HAHAHAHA, Saying that quadtrees cannot be used for 3d terrain is a joke, in fact I''d recommend Quadtrees be used instead of Octrees. They are so much easier because you can "ignore" one of the axes althogether, usually the y axis. This will then easily allow you to generate terrain, especially efficiently using a heightmap, etc etc. Caves can also be done because you''re not storing the points in the quadtree, you''re just pointing to the list of points there...

Bringing another dimension into it complicates it further because it double increases the data used and processed and it slows the whole system down...

Dæmin
(Dominik Grabiec)
sdgrab@eisa.net.au
Daemin(Dominik Grabiec)
Ferrit
Ferrit
Ok, Ok, hold up a minute.

Quadtrees are good for landscapes were the majority of the data is
in the x/z plane, with the minority being in the y-plane, i.e. terrain
were you look down at an angle, with no huge mountains towering in the
y-axis.
Octrees are good were ther is an equal amount of data/objects in either
axis, such as space, underground, or terrain with large mountains/a
viewpoint close to the ground. At the end of the day, its down to
preference, as if you do choose the wrong one, its not such a big deal,
maybe a performance hit (ok, a big deal, but not system-crash worthy).

Right. For the terrain, I suggest a grid in the x/z plane, with the
y-values for each vertex taken from a height map. This gives you
a lot of scope, and the chance to use fractal landscapes.

Hope this helps


Yoshi
Yoshi
If you want to search for some other techniques try searching for "VIPM"(ViewIndpendentProgressiveMesh) or "VDPM"(ViewDependentProgressiveMesh).


The last truth is that there is no magic(Feist)
The last truth is that there is no magic(Feist)
Ingenu
Ingenu
Ferrit expressed very well my opinion about Octrees and Quastrees.

I''d like to tell Daemin that I NEVER said that Quadtree cannot be used for terrain.
So please read the whole thread and be fair.

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
Etnu
Etnu
You can''t ignore the Y axis if you are high above the ground (i.e. in a plane, on a mountain, etc.)

Of course, if you aren''t in a high altitude situation, then yeah id say you can pretty much ignore it.
---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.
Diragor
Diragor
I archived the Longbow Digital Arts (developer of Tread Marks) programming message board before it got wiped out. It's a *very* informative source for info on ROAM, quadtrees and other landscape rendering topics.

LDA-Programming.zip



Edited by - Diragor on October 25, 2000 1:06:44 PM
ColonelMustard
ColonelMustard
Ingenu says :
"Octree allow you to produce any kind of landscape you can think about much more easily than Quadtree.

A quadtree is ''flat'' compared to an Octree so I think I wasn''t wrong telling you that Quadtree are for terrain with little ''bumps'', while Octree can handle fantasy terrains."

Ok wise guy, that''s true :-) dut don''t you think that it take about 100x less time generating terrain form a heightfield than modelizing it with 3d editor of something
Unless you got 50 full time artists i can difficultly imagine you making beautiful fantasy terrain just like that !
BTW, how do you implement fractals or noise if you don''t even have a heightfield ?
So you actually have loads more freedom with quadtrees, cause heightfields are much faster in the making than non-LOD meshes (don''t even think about multimeshes), so you actually save time, sacrificing concave surfaces

Mustard
Ingenu
Ingenu
I agree that you need to model your terrain in a 3d editor to do that, anyway some games already need artists to model the terrain.
It''ll be a bit longer but can give you interesting landscapes, as always you have to trade...

Fractals are not 2D exclusive process, and even if you only use 2D ones, mixing two or three allows you to have a ''3d'' version.

Noise is just a random function at the basis.
(I''ve worked a little on 2D and 3D procedurals textures, it''s a way off handling terrain, with little modifications.)

LOD can be manage by an Octree, in almost the same way it is in a Quadtree. (ok, with one more dimension.)

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
Sof
Sof
I resently implemented a quadtree terrain implementation for a Uni project (there is a thred with screen shots in here, a very good resource I found was http://www.gamasutra.com/features/20000228/ulrich_01.htm.

Hope that helps.

Ingenu: I would be very interested if you could point me to information or a demo of such a octree terrain implemention (I saw one on the forum here at one stage but it didn''t do the kind of thing you are talking about). For the moment anyway I am pretty pleased with the progress on my quadtree one .
______It is entertainment not reality.

Topic Locked

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

Sign in to reply to this topic.