Voxels for Unity: Release at the Asset Store

In fall the tool had been rejected by an administrator of the Unity Asset Store because they perceived it as a complete tool, which cannot compete with existing packages. Generated objects with high color variation had too many draw calls and the complete conversion process was taking too much time. After explaining that my extension focuses on the scanning step, that this step is done in a unique way by using the GPU so it would add a matchless feature to the store and that the generator scripts are only examples to show the ability to use it in existing or own frameworks, the administrator advised me to adopt the description, to change the title and maybe to include more examples. I really modified the statement and added a subtitle to underline the main function of the extension. But before I did a lot of work to improve some of the points, which had been criticized.

A mesh and a tree from the Asset Store had been converted to voxel objects. Half of a combined object had been voxelized and is displayed using a sphere for every cell.

First I tried to implement multi-threading and I could really accelerate the rasterizing by 100% for more complex tasks. Unfortunately sometimes there are errors in the result objects and I did not find the reason up to now. So I removed the option from the inspector but it is still available using an undocumented API command.
Next I included an iterator to access only filled cells and I changed the mesh processor script to utilize it. That way I improved the building time for voxel meshes. Moreover I added a new processor class to store coloration data into a 2D texture and implemented options in the mesh script to make use of them. Such data can also be stored per vertex now. Both ways are allowing the merge objects with high color variation much better and so massively reducing the draw calls. Thus I optimized the creation as well as the presentation.

As you can see in the manual I refactored the class Voxels.Converter to Voxels.Rasterizer because the former name rather described the whole execution. And I removed Voxel from scripts like Voxels.VoxelMesh so the duplicated labels vanished.

I resubmitted the package on Thursday. In fall it took about two weeks to get a rejection notification but this time “Voxel for Unity: Rasterizer” has gone live within a day and can be purchased at the Asset Store now.

Category: Content Creation, Technology, Voxels / Author: Lightrocker / Date: 2016-02-21 - Sunday / Comment(s): none

Voxel for Unity: Tutorial

I added a tutorial video to YouTube. It shows how to add the extension to your objects, so they get converted to voxel meshes. Moreover you can see how to set up materials for best outcome and how important properties of the plug-in impact the result.

Please turn on the sub-titles, if you want to get more information!

Category: Content Creation, Technology, Voxels / Author: Lightrocker / Date: 2015-10-09 - Friday / Comment(s): none

Voxels for Unity 1.0: The manual

I completed the manual for the first version of the tool, which is still waiting for approval to be published in the Unity Asset Store.

You can download the PDF here or read it on SlideShare:

Category: Content Creation, Technology, Voxels / Author: Lightrocker / Date: 2015-09-24 - Thursday / Comment(s): none

Voxels for Unity: The release version

“Voxels” is being published as an extension to the Unity runtime and editor via the Asset Store. Its purpose is to scan existing graphics for its colors or materials and store those into a three-dimensional data structure. Those scanned cells can be called “volume pixels”, or voxels for short, and are being transferred to processor classes. Two types of processors are included in the release package.
The first one constructs a hierarchy of game objects from the incoming data and attaches a specified mesh, a renderer and a material to every of its objects. The material is instantiated using a standard shader or a given template and modulated by the sampled color data of the individual cell. An optimization can be enabled to merge multiple voxels that share the same material into single meshes.
And the second processor is able to store the voxel data into a particle system, which is also instantiated by a given one.
Because there is a very simple programming interface it is easy to write own scripts, which are building other game objects, passing the voxels to volume textures, converting the data for (existing) scripts respectively plug-ins or even exporting them to be used outside of Unity. You can use the two included processor classes as blueprints for your own efforts.

But you can also stay away from programming and only utilize the user interface of the components to create appealing voxel graphics. The conversion can be done in the edit mode and while the game or application is running.

Converter inspector in edit mode Converter inspector in runtime while processing

It is also possible to mix inspector adjustments and scripting. For example you set up converter and processor properties in the editor but the operation will only be started when an event in the game like loading a level occurs.

The scanning process works by rendering the desired items in slices to off-screen buffers, which are being copied to main memory afterwards. Whenever a pixel is set, its color is added to a cell in an octree. Later the colors are being combined per cell using mathematical operations or a more complex algorithm for the most frequent color method. That way source materials, lights and shaders remain intact and you get a result comparable to the original, if the settings are right. And this solution is the unique feature of the tool because other, existing extensions are using the ray casting methods provided by Unity. Those methods do not perceive vertex transformations by the shader or material computations per pixel.

Voxels logo

Further on you can also create results that only resample the shape of the basis but contain total different surfaces and appear as holograms, dust clouds, artistic effects and so on. Another option is the ability to animate voxels, e.g. for detonating 3D models or transforming between different ones.

Converter inspector in runtime while processing

Unfortunately not everything works the way it has been planned. Shadow maps seem to become effectless and particle systems are culled in the scanning process because of the near depth clipping planes. Up to now no options could be found to prompt Unity to use other clipping values for shadow map creation or not to hide specific objects while rendering. But I am still looking for answers. Moreover I want to include new features into upcoming versions. Some will help to make the conversion more powerful, others may handle the results in various directions.

Category: Programming, Technology, Voxels / Author: Lightrocker / Date: 2015-09-16 - Wednesday / Comment(s): none

Voxels: A personal introduction

In my free time of the past year I developed a tool for Unity, which arose out of Project: Evolution. For the planned main effect I need pixels in three-dimensional shape to advance graphically from level to level. Those cells are commonly called voxels, which is a combination of “volume” and “pixels”, and they have to be generated from 3D models with generic meshes like I did it for the 2D presentation in the prototype. So I started to program a solution to do the conversion and shortly afterwards a decision grew inside me. Because there was no plug-in comparable to mine I wanted to release it as a product, which other people can use.

The actual functionality for meshes had been finished relatively rapidly but at that state it was a quick-and-dirty implementation, which could be used in-house but was not ready to be published. I began to adapt the user interface and polish the functionality. And it lasted a long time and there are still sections to improve and features to be added. But I am satisfied by now and intent to release “Voxels overview” in the next days.

Category: Programming, Technology, Voxels / Author: Lightrocker / Date: 2015-09-14 - Monday / Comment(s): none