It is currently Sat Aug 22, 2020 3:36 pm


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: irrsurfaceextractor, surface extractor for Irrlicht meshes.
PostPosted: Thu Nov 10, 2011 11:42 am 

Joined: Wed Oct 26, 2011 2:09 pm
Posts: 9
Hello, i have modified the surfaceextractor class to use the Irrlicht mesh buffer instead, this makes it both simpler and faster when integrating PolyVox into Irrlicht.
This will ofcourse make it impossible to use the smooth class, but i plan to redo that as well to support Irrlicht meshes.

Quick example:
Code:
CDynamicMeshBuffer *newBuffer = new CDynamicMeshBuffer(EVT_STANDARD, EIT_32BIT);
IrrSurfaceExtractor<SimpleVolume, MaterialDensityPair44 > irrsurfaceExtractor(volData,   volData->getEnclosingRegion(), newBuffer);
irrsurfaceExtractor.execute();


http://www.lajt.com/Victors/irrsurfaceextractor.zip

Edit: Faulty download link should be fixed now.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: irrsurfaceextractor, surface extractor for Irrlicht mesh
PostPosted: Thu Nov 10, 2011 11:37 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
That's great, but did you actually modify the SurfaceExtractor? It might be better to just make your class a wrapper, as then you can more easily apply any patches and fixes in the future. It could just pass through the parameters to the real SurfaceExtractor, then convert the result to an Irrlicht mesh and return that to the user?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: irrsurfaceextractor, surface extractor for Irrlicht mesh
PostPosted: Fri Nov 11, 2011 8:13 am 

Joined: Wed Oct 26, 2011 2:09 pm
Posts: 9
Thought about doing that as well, but i wanted to get rid of the conversion to save time loading the mesh, this approach saved be about 16% time in loading. But ofcourse its a pain when it needs to be updated, but just a few lines of changed code. Bigger problem is that for example the smoothing wont work anymore since it uses the PolyVox mesh.

Ide: Would be cool if all classes working on PolyVox meshes for example the SurfaceExtractor somehow could support custom mesh formats, maybe by specifying functions for adding Vertexes and Indices or something. Default could be the use of the PolyVox mesh to also make it simple.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: irrsurfaceextractor, surface extractor for Irrlicht mesh
PostPosted: Fri Nov 11, 2011 11:29 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Virror wrote:
Ide: Would be cool if all classes working on PolyVox meshes for example the SurfaceExtractor somehow could support custom mesh formats, maybe by specifying functions for adding Vertexes and Indices or something. Default could be the use of the PolyVox mesh to also make it simple.


This may be possible... I've added a note to the todo list to consider it.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

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