MicroVoxels (beta)

Modified on Tue, 29 Oct at 10:49 AM

Note: this feature is currently only available in Voxel Play 3 beta.


"MicroVoxels" is the term used to specify or change the shape of a single voxel (cube). By default, all Voxel Play regular voxels use a 1x1x1 cubic shape. A voxel can have microvoxels or not. By default, no voxels have microvoxels. When a voxel has microvoxels enabled, Voxel Play does not generate the default 1x1x1 cubic shape but a custom shape. This shape is constrained to the 1x1x1 cubic volume but allows you to define a more detailed aspect.


MicroVoxels only affect the shape of a single voxel. They don't carry color or texture information, so all microvoxels in the same voxel space use the same color and textures than the occupying voxel.



General MicroVoxels address space


In Voxel Play Environment, there's a new setting called MicroVoxels Size:


This setting defined the number of microvoxels per voxel, in a similar way that the chunk size determines the number of voxels in a chunk (along any axis). By default, the MicroVoxels Size value is 16, which means each voxel can be subdivided into 16x16x16 microvoxels.


Note that MicroVoxels do not add extra memory consumption by default if they're not used. This setting just configures the address space for microvoxels (how tiny they can be).



Creating and Saving MicroVoxels


MicroVoxels can be added or removed at anytime using new API methods or the default character controllers. Any voxel that uses microvoxels will store this new data into the savegame file automatically. A new savegame file (v15) includes new additions to store the microvoxels data per chunk.


In the demo scenes, you can enable the microvoxels by pressing the V key. Then, depending on the item carried, you can remove or add microvoxels to the scene. An item can define the microVoxels property to determine the size of the tool so it determines the size of the microvoxel being placed or removed.



MicroVoxels API


New methods are available to place/remove microvoxels. Check the Scripting C# Methods page for details.



Technical Considerations


MicroVoxels add extra mesh (triangles) to the scene. They're not intended to be used massively in the scene, such as creating more detailed or granular terrain. They're designed to be a complement to the classic 1x1x1 cubic shapes so detail can be added where needed, such as entrances, pools, buildings, decorations, etc.


The difference with custom voxel definitions is that the microvoxels produce runtime/procedural meshes which are generated natively and optimized by Voxel Play meshing algorithms and these triangles are part of the regular chunk meshes so they don't need extra drawcalls.


MicroVoxels data is stored in a packed format inside each chunk. If a voxel does not use microvoxels, there's no extra memory consumption.










Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article