Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

polyvox volume corruption
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=15&t=689
Page 1 of 1

Author:  mgumley [ Wed Nov 23, 2016 5:21 pm ]
Post subject:  polyvox volume corruption

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

Author:  David Williams [ Thu Nov 24, 2016 7:29 pm ]
Post subject:  Re: polyvox volume corruption

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?

Author:  mgumley [ Wed Nov 30, 2016 8:50 am ]
Post subject:  Re: polyvox volume corruption

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

Author:  David Williams [ Sat Dec 03, 2016 4:50 pm ]
Post subject:  Re: polyvox volume corruption

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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/