Gnurfos wrote:
- at first the documentation was a bit worrying, with talks about "running out of memory", which made me think that the user has not much control over when paging occurs. But actually, seeing the example and other functions, I would say that, if he is careful of not overflowing memory (it that detected by bad_alloc or something similar?), the user has full control and loads/unloads pages at will. Could you confirm ?
The LargeVolume can support an 'infinite' number of blocks but most of these are not loaded into memory at a time. If you try to access a block and it is not in memory then a callback is executed giving you the chance to load that data from disk/network/database/etc. If this causes the number of blocks in memory to become to large then the oldest block is removed from memory and given to you (again through a callback) giving you a chance to store it back somewhere.
Gnurfos wrote:
- it seems that the LargeVolume does not allow variating LOD, because all chunks are of the same dimensions ?
The representation in memory should be independant from the surface extraction algorithm. Even if the whole volume was one single continous peice of data in memory (i.e. the RawVolume), you can still choose to only extract a surface for only part of it.
At least, that is how it works with the existing extractors. Marching Cubes doesn't care how the data is stored (raw data, octree, blocks) as long as you can call getVoxelAt() on the relevant position.
Perhaps Transvoxel is more complex, but I think the same principle should apply. You choose the region of the volume you want the mesh for (ignoring the underlying representation), you possibly copy that data to a RawVolume and downsample it, and then you run the extractor.
Gnurfos wrote:
I remembered there was talk about implementing the "Transvoxel" algorithm in Polyvox some day (maybe in the old forums). Is this still planned ?
One
that wiki page, there is an item called "Support for Eric Lengyel's voxel terrain lod system", so that could be it. But that page is old, and the item is not present in git's TODO.txt.
Hmmm... I forgotten we had two lists - we should resolve that. Anyway it is still planned though not anytime soon as I'm simply not using it in the forseeable future (our current game is bult on the cubic extractor). But I have noticed a few implementations of Transvoxel popping up on the web, so it shouldn't be too hard to implement.
Gnurfos wrote:
If some external user was to implement it for polyvox (I don't know if I could, but it would surely be interesting to try), what kind of volume do you suggest having it operate on ?
Again, ideally it shouldn't matter (though this might not be the case). I don't think we would provide a 'complete' implementation of transvoxel terrain in that I think a complete implementation requires custom vertex shaders for example. In the same way, we don't provide a complete terrain system based on Marching Cubes - we just provide the extractor and leave the user to work out what regions they need to extract. PolyVox has no concept of a camera position (which is relevant for LOD) and I would expect this to stay in user code.
Quote:
PS: I think there are a few outdated/wrong copy-pasted information in the doc, namely for the constructors of SimpleVolume and RawVolume (they refer to using some other constructor that doesn't seem to exist anymore).
I only see one RawVolume constructor and it's this one:
http://www.volumesoffun.com/polyvox/doc ... 3ad118987fAre you referring to something different? But yes, over Christmas I had a discussion with Matt about our release system and what we can change. Using proper version numbers and matching up the docs, etc. Hopefully we will make some improvments here soon.