It is currently Wed Nov 20, 2019 4:05 am


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: polyvox volume corruption
PostPosted: Wed Nov 23, 2016 5:21 pm 

Joined: Fri Sep 30, 2016 3:30 am
Posts: 14
My polyvox volume seems to become corrupted after a few thousand calls to the extractMarchingCubes function. I get back an empty container for a given chunk, and my terrain ends up looking like this. One thing I noticed is that it always work on the first time the voxel volume is accessed in that place, but subsequent access has a chance of this happening.

Image

Cheers,
Maxwell Gumley


Top
Offline Profile  
Reply with quote  
 Post subject: Re: polyvox volume corruption
PostPosted: Thu Nov 24, 2016 7:29 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Are you using RawVolume or Paged Volume? I assume the latter, in which case it might be worth testing with a RawVolume to verify if the problem persists. And if you are using PagedVolume then are you providing a Pager instance? I forget what PolyVox does if no pager is provided. If you are, then can you e.g. add logging calls to verify that the pager is being called as expected?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: polyvox volume corruption
PostPosted: Wed Nov 30, 2016 8:50 am 

Joined: Fri Sep 30, 2016 3:30 am
Posts: 14
sorry for the late response. I've been away for thanksgiving.

You were exactly right about the paged volume. I didn't realize how it was supposed to work. When my world size grew past a certain size, chunks started to page out and I wasn't handling it.

I switched my voxel volume to use the FilePager, and the problem is fixed now.

I realize that I actually need to control the paging more intentionally so I don't fill up the directory with old save files, but this is a good quick fix for getting a minimally viable demo.

Cheers,
Maxwell Gumley


Top
Offline Profile  
Reply with quote  
 Post subject: Re: polyvox volume corruption
PostPosted: Sat Dec 03, 2016 4:50 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
mgumley wrote:
I realize that I actually need to control the paging more intentionally so I don't fill up the directory with old save files, but this is a good quick fix for getting a minimally viable demo.


Yes, the FilePager is just a basic example to get you started. In practice your are probably going to want compression, and might instead want to write the data to a network or database. We used SQLite for Cubiquity (see VoxelDatabase.inl) because it was small and well documented, but a key-value store such as LevelDB would also be appropriate.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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