Lot of terrain

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
zxenop
Posts: 4
Joined: Thu Jun 14, 2007 12:29 pm

Lot of terrain

Post by zxenop »

Hi there i'm using Irrlicht with .NET CP and i'm trying to load a lot of heightmap (something like 2000), but after a few hundred loading i got an engine crash (i've got a C++ runtime error window).
It's probably due to large amout of data, and now i would like to modify the engine to enlarge the capacity of loading.
Where, in sources, shoud i seek ?
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

You have to replace all 16 bit indices with 32 bit indices.

Regards - Xaron
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

What is a heightmap 2000?
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

hybrid wrote:What is a heightmap 2000?
I guess it's the size with 2049x2049.

Regards - Xaron
zxenop
Posts: 4
Joined: Thu Jun 14, 2007 12:29 pm

Post by zxenop »

Na you didn't get it guys
it's not a 2049*2049 heigtmap, it's 2000 256*256 heightmaps ^_^
Sorry if i didn't said it properly, english is not my mother tongue langage.
Anyway thanks for the help and the fast reply =D
Delight
Posts: 42
Joined: Tue Jul 05, 2005 3:16 pm
Location: Muenster, Germany

Post by Delight »

Creating or wrapping the tile based terrain from the code snippets forum would be better than setting indices up to INT32...
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Using larger indices would not help here, I guess you run out of memory. Since you have all terrain scene nodes in memory you'll have several milliion vertices in memory (32k per terrain). You'll have to use an efficiently culled tiled terrain manager which loads new parts dynamically. Otherwise I don't see how this would be possible.
zxenop
Posts: 4
Joined: Thu Jun 14, 2007 12:29 pm

Post by zxenop »

Running out of memory with 4Go ???
My guess is that the list than containing all the SceneNode get overflowed, but since i'm using Irrlicht .NET CP i can't catch the exception in Visual so i'm trying to modifying it, anybody got an other idea ?

Anyway hybrid if i get your idea properly i will have to make my own TerrainSceneNode right ? (then wrapping it into C# but that's not a big deal)
Is there already some algorithm for the culling job or will i have to create one by myself (again >_<) ?
Ho mon dieu attention benjamin derrière toi c'est affreux !
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The basic culling is done automatically by the engine. But you'll probably need some more advanced features to handle the huge number of LOD operations etc. And for the dynamic loading you'll definitely need a custom scene node.
Memory requirements: (32k*10 bytes Vertices, 65k*2 bytes indices)*2 per terrain node, so it's about 900MB for just the terrain geometry. In case you have textures applied to the terrain you'll drop out much earlier.
zxenop
Posts: 4
Joined: Thu Jun 14, 2007 12:29 pm

Post by zxenop »

I maybe have misunderstood something, what is the culling ?
Ho mon dieu attention benjamin derrière toi c'est affreux !
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Culling is basicly excluding parts of geometry from rendering. In most cases those parts which are not in camera view or othervise invisible. Based on efectivity of culling method this can save lot of time.
Post Reply