About Store Forum Documentation Contact



Post Reply 
Memory usage too high
Author Message
Gian-Reto Offline
Member

Post: #1
Memory usage too high
So I'm trying to create a 8192x8192 Heightmap world with an area size of 128 Fields and 1 Meter per field.

This heightmap without anything on it is already using 2-3 Gigs of Memory if I set viewDistance to 1,2 KM (and anything below 1 KM starts to look bad, at least in First Person perspective). When I increased the Viewdistance from 600 meters to 1,2 Km, memory got up from aroun 600-900 Megs to 2-3 Gigs.

While if I decrease the resolution of the same heightmap to 4096x4096 (while keeping the same size of the map and thus increasing heightfield size to 2 meters), memory usage with 1,2 KM Viewrange was 500 Megs.... but when I enlarged that to 2,5 KM, Memory only got up 600-700 Megs (FPS went down though)


Now I inserted some hundred Gras Object into the 8192x8192 Map, and while I could start it in the editor play view, when I tried to start it in visual studio, I got an exception when the memory consumption reached the end of adressable memory with 32bit (around 3,8 Gigs)..... so, could it be that maybe 1000-10'000 objects (Grass objects, that is) eat another 1 Gig of Memory?

I thought that Esenthel just had problems handling a 1024x1024 per 1x1KM Map, but now I'm not sure anymore. Could it be a memory leak on my side? Are there some special things that need to be taken care of when using lots of objects in a level? Is it not possible at all?

Also, is using 1 meter heightfields not a good idea in Esenthel? It is really sad, as 2 meter Heightfields make the whole Heightmap look much less detailed....
(This post was last modified: 03-30-2011 09:54 AM by Gian-Reto.)
03-30-2011 09:52 AM
Find all posts by this user Quote this message in a reply
Gian-Reto Offline
Member

Post: #2
RE: Memory usage too high
Ooookay... so I tried to reduce the Area Size to find out how the Memory is behaving....

First to 64, then to 32. Memory usage went down indeed.... but then I found out that not the whole size of my level was loaded (which explains, why memory usage went down)

Now I'm not sure anymore..... are there any manual steps I need to take care of in my C++ code to load more tiles? Did I completly miss that part?

I'm getting more and more confused about what Esenthel does with my heightmap ingame.... Cause in the World Editor, I can still see my whole world when moving around, but I always only see a small "tile" of the world (which conforms more or less in size to the size of the existing terrain in game /3 (like if this was the "tilesize", and only the center tile and the next tile to this was loaded, while everything else was just cut away))

EDIT:
It might be me hitting update visible instead of update all... I'll try again smile

EDIT2:
So now I get a "can't Append <Path>-141, 250" Error.... Apparently no space left on my filesystem... rats! The world uses more than 15 Gigs now!
Thats for the Size 32 Area world, so maybe its just to finegrained, but still....

EDIT3:
Okay, so I made room on my harddrive and could build it.... nice. Memory usage went down to roughly a third, while needed diskspace for world was tripled. Can't say anything sure about FPS, might have gone down a bit, as the Terrain Management now kicked in for the first time

As it looks, with the 128 Sized Areas the Terrain Management saw the whole terrain as "visible", and therefore (or so I guess) everything was loaded into memory, while now only a part of the whole map is in memory.

To me it seems like "visible terrain" in the Esenthel terrain managment system is not the same as graphically visible terrain. Maybe syncing this might bring memory consumption down a bit on worlds with large Area sizes (and would allow you to have minimal disk space usage with moderate memory usage).... but than again, I don't know exactly how the Terrain Management System is built up in Esenthel, I can only guess from my experimentations.

Well, at least I managed to bring down the memory consumption to a good 700 Megs for the 1,2 KM Viewrange.... at the cost of a 16,5 Gig World, but that needs to be adressed later (Maybe the middlegound with Area size of 64 would be the best compromise).... and finally I start to understand what all the functions do in the World Editor.... especially whats the difference between build visible and build all wink
(This post was last modified: 03-31-2011 12:13 PM by Gian-Reto.)
03-30-2011 08:58 PM
Find all posts by this user Quote this message in a reply
Demostenes Offline
Banned

Post: #3
RE: Memory usage too high
I dont know what is going inside EE, but I know, that information stored in 2MB height map (1024*1024 with target resolution 2048m) takes lets say 100x more HDD space when stored in EE format (devided into 1024 32*32 areas).
It mean, that my whole game can easily eat 5GB of space only for terrains (now it takes 48MB).

Why does it takes some much HDD space? Isnt it wasting, why is it done like this, what is going inside?
12-26-2011 02:40 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Memory usage too high
Area files in Game folder contains:
Heightmap, Mesh, PhysBody, PathFind information, etc.
12-28-2011 10:29 PM
Find all posts by this user Quote this message in a reply
Post Reply