Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

How to add data to voxel
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=23&t=533
Page 1 of 1

Author:  ianjosephfischer [ Sun Aug 25, 2013 6:52 am ]
Post subject:  How to add data to voxel

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?

Author:  David Williams [ Sun Aug 25, 2013 11:23 am ]
Post subject:  Re: How to add data to voxel

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.

Author:  ianjosephfischer [ Sun Aug 25, 2013 8:30 pm ]
Post subject:  Re: How to add data to voxel

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.

Author:  David Williams [ Mon Aug 26, 2013 8:35 am ]
Post subject:  Re: How to add data to voxel

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

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/