Saving world partition info

Started by
1 comment, last by Bow_vernon 10 years, 3 months ago

Hi, I wonder how those big map games save their world map. Do they store the quadtree/octree info in it? Right now my map format only stores the heightmap, map dimension, and at loading time I would build a mesh based on those informations. However, this HEAVILY affects loading time, as I have to rebuild the mesh everytime.

I really want to know, and maybe you can give some advice/opinions about this. How should I design my map format? I use this method because the editing would be way simpler. I merely have to resize map resolution and then paint heightmap and/or then texturing and place objects. But it's slow. How would you guys design the map format that is easy to edit and fast to load? thanks for your time reading this!

Advertisement

There is no reason which prevents you from saving any information that is required to present any object. It depends heavily what kind of terrain system you are using.

I store only the terrain height data since storing any other vertex attributes would be kind of a waste. Even then, loading the terrain height data (~40-50 mb) takes only a fraction of a second. The terrain uses quadtree for lodding and the mesh data is generated almost 100% on GPU. Of course, I update only a small fraction of that data to the GPU (ie. one texture of ~1024x1024 is able to store all the height data needed for the terrain rendering). Also, I store around 25k map objects in the map file and placing them inside world octrees has very small impact on the loading time.

So, first of all I'd try to see if there is something that you can optimize with the map loader.

Big games such as Far Cry 3 split their maps in sectors (something like 64*64 meters) and they keep only a certain amount of sectors in memory. When the player moves in the world, sector data is loaded to memory (and distant sector data is discarded / overwritten) . Probably there is no need for any accelerator structure since the sectors are in grid.

Of course I'd like to use a sectoring scheme in order to support bigger worlds with constant memory requirement.

Cheers!

Wow, that's kinda...nice. However, I'm not using GPU intensive approach such as yours, so I still store terrain data in CPU. By the way, I use Octree for frustum culling the terrain....and I guess the biggest bottlenecks is the Octree creation. I think I'd better save the Octree structure inside the map file. But....how am I supposed to save such "structural" trees into a "flat" file? Damn my head hurts. Waiting for your input guys...

This topic is closed to new replies.

Advertisement