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


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to add data to voxel
PostPosted: Sun Aug 25, 2013 6:52 am 
User avatar

Joined: Sun Aug 25, 2013 4:13 am
Posts: 10
Right now does the dll only support colored voxels. Or can we alter the "CubiquityVertex" and add additional data elements? Such as voxel objects like plants, water, etc?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: How to add data to voxel
PostPosted: Sun Aug 25, 2013 11:23 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Every voxel in a ColoredCubesVolume is a 16-bit unsigned integer storing the color as RGBA with four bits per channel (though the alpha isn't used at the moment).

At the moment the only way to store extra per-voxel data would be in a separate data structure in Unity, and obviously this is only practical for limited volume sizes. In the future we may allow you to define your own extra data and store this in a Cubiquity volume ('CustomVolume', or something). This would allow more efficient storage as it would use the Cubiquity mechanisms, but it would still be separate from the color data. But this isn't high priority at the moment.

You shouldn't alter CubiquityVertex - this the the vertex format (not the voxel format...) and needs to match what the .dll outputs.

If you want things like trees you can draw them directly into the main volume (as with the trees in the video). When multiple volume are better supported you could have separate voxel objects, but you wouldn't want too many of these. Or of you want voxel characters (like the enemies in Voxeliens) then actually these are just regular meshes made to look like voxels.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: How to add data to voxel
PostPosted: Sun Aug 25, 2013 8:30 pm 
User avatar

Joined: Sun Aug 25, 2013 4:13 am
Posts: 10
I see, I was trying to avoid having multiple saves for the data. As it reads in the voxel volume from the saved file I was hoping it would be able to read that "this voxel is a [tree/door/rock/mineral/water/etc.]" and attach the corresponding component (or system), I guess it will load an additional file for that volume area that marks where the objects are and what voxels belong to the object. I guess this is ok as water will probably eventually be represented without voxels so that it can use some fluid dynamic mesh of some sort.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: How to add data to voxel
PostPosted: Mon Aug 26, 2013 8:35 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Yeah, individual voxels cannot have any kind of script or component attached to them. If you want something to happen when you approach a tree (for example) then you could keep a list of where all the trees are and check against that as you move. Alternatively you could perhaps add a GameObject with only a collider (no mesh) at each tree position and add your script to that.

There are probably smarter approaches, but the point is that Cubqiuity is mostly concerned with the rendering at the moment. You'll need to use some creativity to to work out how to implement the game play logic ;-)


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 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