FRAKTALIA

INTERACTIVE WORLDS & DIGITAL SOLUTIONS

Testing Cubiquity

The theorethical part of the master thesis is almost complete. Now its time to actually implement the practical part which contains a voxel engine capable of real time sculpting which also supports material properties. To gather experience, Cubiquity has been tested in Unity.

Cubiquity is a voxel framework created initially in C++ and has a wrapper for Unreal and Unity. It uses an octree as data structure and visual hull construction for visualisation. The plugin for unity is a derivation of the unity terrain functionality and allows sculpting. There was a commercial unity asset on the asset store which got deprecated for some unknown reason. The unity version available here: https://bitbucket.org/volumesoffun/cubiquity-for-unity3d

My test:

I have set up the repository for the master thesis which contains assets from endless dream which includes a bullet system, camera system and character controller so basic interaction is possible. After importing the Cubiquity, I created a voxel terrain according to the documentation and filled it with voxel data. Unfortunately there are no settings to change octree properties like maximum depth. Also no option for debug visualisation exists. Voxel data can be altered during runtime as SetData function is implemented which requires the volume coordinate which is the local object coordinate of unity.The editor also provides a painting tool where you can sculpt the terrain using the mouse. Painting behaves similar to the Crystal Painter from my Crystal Generator where the result grows towards the screen. This occurs due to the ray cast shot from the mouse point towards the volume.

I have created a bullet which destroys the voxel it collides with and has a radius value which defines the removal area. When a projectile hits the volume, the voxels around the impact point are removed. However the removal function is implemented on the CPU which causes extreme performance loss. The main problem is the initial implementation in C++ which make modifications difficult as the main plattform was not Unity. The voxel engine itself is hidden as DLL files so it is not possible to direct access the internal data structure.

The test also shows the benefit of visual hull construction in Unity which brings many advantages. The main advantage is the usage of the mesh collider provided by Unity which is extremely well optimized when set as static. Also the visual hull can be rendered with normal Unity materials. Therefore no special collision plugins or rendering systems are required which is especially important when virtual reality is involved. The unity version uses a texture atlas shader similar to the terrain shader provided by Unity.

Conclusion:

I will try to implement my own voxel engine in Unity as I need full control over the data structure and generation processes. However if the development seems to be impossible, I have to look for an existing voxel engine and just implement the educational application. Unity has to be used because the target application requires virtual reality.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen