It is currently Sat Aug 22, 2020 1:45 pm


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: ogre material to a voxel
PostPosted: Sun Apr 22, 2012 4:10 am 

Joined: Wed Feb 29, 2012 12:35 am
Posts: 25
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: ogre material to a voxel
PostPosted: Sun Apr 22, 2012 7:18 am 
Developer
User avatar

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


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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