Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
irrsurfaceextractor, surface extractor for Irrlicht meshes. http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=285 |
Page 1 of 1 |
Author: | Virror [ Thu Nov 10, 2011 11:42 am ] |
Post subject: | irrsurfaceextractor, surface extractor for Irrlicht meshes. |
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. |
Author: | David Williams [ Thu Nov 10, 2011 11:37 pm ] |
Post subject: | Re: irrsurfaceextractor, surface extractor for Irrlicht mesh |
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? |
Author: | Virror [ Fri Nov 11, 2011 8:13 am ] |
Post subject: | Re: irrsurfaceextractor, surface extractor for Irrlicht mesh |
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. |
Author: | David Williams [ Fri Nov 11, 2011 11:29 pm ] |
Post subject: | Re: irrsurfaceextractor, surface extractor for Irrlicht mesh |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |