Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
ogre material to a voxel http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=385 |
Page 1 of 1 |
Author: | xelons [ Sun Apr 22, 2012 4:10 am ] |
Post subject: | ogre material to a voxel |
Hey everyone, This seems to be an obvious question, in reality I'm looking for the best way to apply Ogre3d material to a single voxel. Currently my terrain is generated using polyvox, then it is rendered using small chunks, each voxel chunk ( block of many voxels) is transformed into a mesh object and then assigned the global terrain Ogre's material. Would transforming the voxel into a single mesh object and assign the ogre material to it be the best way to do it? I'm afraid of having so many objects ( in this case voxels) witch will probably cause a performance hit. The main result that I'm trying to achieve is adding water, I can, using shaders, transform a voxel into transparent water looking, however I'm still trying to find the best way to assign an Ogre material to a single voxel. |
Author: | David Williams [ Sun Apr 22, 2012 7:18 am ] |
Post subject: | Re: ogre material to a voxel |
As I recall you are woking with the CubicSurfaceExtractor? Making voxel water with the Marching Cubes extractor would be unusual. Basically yes, you should seperate the transparent voxels into a seperate mesh. But this doesn't need to be a seperate mesh for each voxel as all your water voxels can share the same mesh. So you run the surface extractor and then split the resulting mesh in two. One peice holds all your solid voxels and you use texture atlases, etc as normal. The other piece holds your water voxels. So for a given region of the map you end up with two meshes instead of one. Also, support for transparent voxels in the CubicSurfaceExtractor is the feature I'm currently working on as part of our voxel type refactor. So it should get better in the future, but things are slow at the moment with Voxeliens coming out. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |