Jump to content

  • Log In with Google      Sign In   
  • Create Account


Saving world partition info


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Bow_vernon   Members   -  Reputation: 137

Like
0Likes
Like

Posted 30 December 2013 - 03:22 AM

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!



Sponsor:

#2 kauna   Crossbones+   -  Reputation: 2168

Like
0Likes
Like

Posted 30 December 2013 - 06:09 AM

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!



#3 Bow_vernon   Members   -  Reputation: 137

Like
0Likes
Like

Posted 30 December 2013 - 11:26 PM

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...






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS