It is currently Sat Aug 22, 2020 4:28 am


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Infinite World Terrain Generation
PostPosted: Thu Sep 19, 2013 2:11 am 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
So I'm trying to wrap my head around how exactly I could go about making an infinite like type world that is generated on the fly using PolyVox, quite the undertaking but I have no doubts I can achieve such a feat.

I have a few questions and would love the communities input on the matter :)

First I'll lay out my thought process on the topic.

I have a volume say 1024x1024x256
Each mesh extracted is in 16x16x16 chunks
The surrounding 27 chunks are displayed, moving from 1 chunk to another would unload the ones behind you and load the ones in front of you. (the player does not see this as it is out of their view)

This is currently working but now I need to expand past the 1024x1024x256 region.

Route 1, I was thinking every time the player moved from 1 chunk to another it would essentially shift the voxels and everything would stay within the 1024x1024x256 region. However this sounds like a lot of looping and unnecessary processing.

Route 2, I was thinking of would be to have a smaller region, say, 512x512x256, we'll call this a sector to keep things simple, and have the sector the player is in plus the surrounding 26 sectors in memory at any given time, loading/unloading them as they are needed when the player moves from 1 sector to another like the chunk system. This seems more feasible but I've read in a few places you should only ever use 1 volume. I hope I'm wrong or there is an easier way to go about this.

I hope I explained my though process well enough, how do you think I should approach this? :)

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Infinite World Terrain Generation
PostPosted: Fri Sep 20, 2013 9:08 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
First up I should say I've never attempted truly unlimited terrain, so there may be some things I haven't anticipated. Secondly, I'm going to assume your terrain doesn't need to be truly infinite but just very large (e.g. a volume side length of billions of voxels).

The expectation is that you would use the LargeVolume for this, as you can create a LargeVolume with a side length of billions (again, I've never tried it!). The LargeVolume only keeps the most recently used blocks in memory, so in theory it doesn't matter how big it is.

Be sure to check the FAQ to understand why multiple smaller volumes would probably be a bad idea: http://www.volumesoffun.com/polyvox/doc ... l/FAQ.html

In a nutshell, route two is the expected approach (though route one is also interesting...) but LargeVolume will handle the loading/unloading for you. This only applies to the volume data, you need to handle loading/unloading of meshes yourself.

Also the LargeVolume has seen a lot of work recently and the documentation isn't quite up to date. Sorry anout that ;-)


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net