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


All times are UTC




Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: SimpleVolume + new mesh extraction = broken & slow
PostPosted: Tue Dec 16, 2014 2:02 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SimpleVolume + new mesh extraction = broken & slow
PostPosted: Thu Dec 18, 2014 1:50 pm 

Joined: Tue Apr 08, 2014 5:10 pm
Posts: 124
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SimpleVolume + new mesh extraction = broken & slow
PostPosted: Sun Dec 21, 2014 4:52 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SimpleVolume + new mesh extraction = broken & slow
PostPosted: Fri Jan 02, 2015 9:05 pm 

Joined: Tue Apr 08, 2014 5:10 pm
Posts: 124
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SimpleVolume + new mesh extraction = broken & slow
PostPosted: Sun Jan 04, 2015 9:46 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2

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