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


All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: Incoming PolyVox changes
PostPosted: Mon Aug 25, 2014 5:54 am 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
David Williams wrote:
3) Rather than using a PolyVox Mesh instance, you could provide your own mesh class and PolyVox would write directly into that. For example, PolyVox could write directly in OpenGL vertex buffers or an Ogre::ManualObject, thereby reducing how many copies you have to perform.


This is beautiful, no longer will I have to deal with Irrlicht's mesh buffer to draw my extracted volume. I do have a couple questions about the functionality provided by this feature.

Say I have a volume of 10,000 x 10,000 x 10,000. I extract the entire volume into Irrlicht's mesh class (IMesh). Now I change a small region of the volume and again extract the surface data from the volume but I only extract that small region which was changed into my IMesh. Will this override all of the previous vertex and index data that was in the IMesh? Or will it actually update the IMesh with the changed data?

Also with the addition of this feature does this now mean that we will finally see support for specifying material id's on voxels and uvw data will be extracted into our mesh instances? If not it seems kind of pointless to allow extraction into our own mesh classes if we will just have to iterate through the voxel data again to apply multiple textures and texture mapping.

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Incoming PolyVox changes
PostPosted: Mon Aug 25, 2014 1:50 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
@kklouzal - I'm afraid it won't do anything quite as big as you are hoping. The output from the surface extractors is still just a series of vertices and indices. Previously these always went to the Mesh class which would store them in an std::vector, but now you have the option of provide your own mesh class which does something different with them.

You still need to work with regions, and keep track of changes. Updating just part of the mesh is a difficult problem and PolyVox can't do it (though I did see an interesting discussion here). It seems it probably isn't worth attempting.

Basically this change is mostly an optimization which could remove the need for some additional copying. But as I say I haven't really tested it - it just came for free when I templatised the extractors on mesh type to support 16 vs. 32 bit indices. I think at some point we might try making use of it in Cubiquity.


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

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