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

SimpleVolume + new mesh extraction = broken & slow
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=614
Page 2 of 2

Author:  David Williams [ Tue Dec 16, 2014 2:02 pm ]
Post subject:  Re: SimpleVolume + new mesh extraction = broken & slow

I'm afraid not - PolyVox work tends to come in bursts over the last year. We do some work on PolyVox, and then move on to higher level features in Cubiquity. Then after we ship a new Cubiquity release we get back to work on the next set of PolyVox improvements.

So you are probably best off using your custom version for now.

Author:  petersvp [ Thu Dec 18, 2014 1:50 pm ]
Post subject:  Re: SimpleVolume + new mesh extraction = broken & slow

I will add up about production.

In Crafterria, we started with polyvox 0.2.1 stable. While working on the project, however, Polyvox got so much refactors.... so I don't thing the code left from Polyvox can still be named "PolyVox" :)

Basically, I am now using raw c char* array class, derived from the current Polyvox trunk's 3D array that David is talking about. No Volumes. The Marching Cubes Surface Extractor got broken into parts that I use directly to extract geometry from own Voxel Type. Basically, the only thing that remained unchanged from me was the PolyVox::SurfaceMesh class.

Also, I changed the algorithm for Marching cubes extraction, instead of iterating over ALL voxels in the 3D array, it casts a ray from camera straight bottom and straight up and then with Dijkstra Spreading "marches" the volume and extracts only the boundary geometry (Huge, huge extraction speed up, because we only iterate where isovalue threshold changes, not the entire region, and you have to learn how Marching Cubes actually work - what is an isovalue, the 8 neighbouring voxels, lerping over the threshold and so on). And, this algorithm skips floating islands!! (unless its "branching" "discovers" one of them), but this is a feature, because all of these islands have a "genesis" point and are extracted to different PolyVox::SurfaceMesh. And the Volumes are completely bypassed.

Still, working like this requires so much modifications of PolyVox that converts the library from general purpose library to something specific for my game - and added as part of my project.

If you don't have the time for such a research, however, things will not be so easy. If you want Minecraft clone with so much realtime editing, these optimizations are very worth.

If you need a tool for meshing, Stick to 0.2.1 and use RawVolume as it is way, way faster then the SimpleVolume, and just works for you more than the latest version.

Author:  David Williams [ Sun Dec 21, 2014 4:52 pm ]
Post subject:  Re: SimpleVolume + new mesh extraction = broken & slow

petersvp wrote:
I changed the algorithm for Marching cubes extraction, instead of iterating over ALL voxels in the 3D array, it casts a ray from camera straight bottom and straight up and then with Dijkstra Spreading "marches" the volume and extracts only the boundary geometry ... this algorithm skips floating islands


Definitely an interesting approach if you don't mind the floating-islands limitation that you mention. I think in a typical volume only a few percent of cells are actually occupied, so there is indeed some potential for speedup. But note that it is also quicker to process empty cells than occupied cells so I'm not sure how empty a volume needs to be to benefit from this optimization. Nice to hear that it works though.

Author:  petersvp [ Fri Jan 02, 2015 9:05 pm ]
Post subject:  Re: SimpleVolume + new mesh extraction = broken & slow

Well, to be honest, it works because accesses and indexing id not performed, but I am reworking the algorightm all the time.....

How does Z-brush do its real time editing, do they have chunking... do they menipulate vertices... ? Do anybody know?

I have to think a lot about these problems. Especially when aiming for low-end PCs and geometry extraction... And I'm a noob in mesh processing and s**k at math for a lot of different topics... that force huge research on my own :)

How VoxelFarm do its job... How is this engine optimized so much? Are they magicians and doing something we are unaware of? So much questions that are breaking Crafterria even more.

Author:  David Williams [ Sun Jan 04, 2015 9:46 am ]
Post subject:  Re: SimpleVolume + new mesh extraction = broken & slow

petersvp wrote:
How does Z-brush do its real time editing, do they have chunking... do they menipulate vertices... ? Do anybody know?


No, I'm afraid I don't have much insight here. A quick skim of the overview indicates that it uses 'mesh retopology' rather than a voxel representation - in other words I believe they are operating directly on the vertex data. Presumably they have quite an advanced mesh structure to allow these kind of sculpting operations.

petersvp wrote:
How VoxelFarm do its job... How is this engine optimized so much? Are they magicians and doing something we are unaware of? So much questions that are breaking Crafterria even more.


I haven't played with the Voxel Farm engine (only seen videos, etc) but for me the impressive part is the editing tools rather than the extraction speed. Actually, I haven't seen the extraction taking place so I don't know how fast it is, but the character seems to move at walking pace so perhaps does not require fast extraction. Clearly they have a pretty nice LOD algorithm which is based on the Dual Contouring algorithm rather than Marching Cubes. But this requires 'Hermite data' rather than density values, and again I think the editing tools need to be fairly advanced.

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