Voxels for Unity: Version 1.1

An update for my Unity plug-in has just been released at the Asset Store. It took me much more time to get a collection of new features and useful enhancements, which are worth to be published, than I had originally planned. Here are the key ones:

Voxels for Unity 1.1

  • Adaption to Unity 5.6 and 2017
  • Better results using PBR (physical based rendering) and HDR (high dynamic range)
  • Two fully working file exporter examples added: PLY (common point cloud format) and VOX (MagicaVoxel editor format)
  • Rasterizer enhanced by supersampling and multithreading options
  • API enhancement: Callback parameter to inform the executing script about the creation of new game objects
  • API extension: New class to decrease number of resulting materials in a processor to given amount
  • Multi-textured terrain included into the example scene
  • Bug fixes for minor issues

If you are interested in acquiring the extension to convert common Unity assets into Voxel objects or files, you can use the following link:

But if you have already purchased it or want to have a look into the manual before, here is the updated version:


 

Category: Content Creation, Game Development, Programming, Technology, Voxels / Author: Lightrocker / Date: 2017-11-17 - Friday / Comment(s): none

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

Voxels 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

Prototyping summary

My full time prototyping phase is over and I have not nearly reached the state I wanted to. But I learned to utilize Unity and how to implement software using it. And I have got a good base to continue the development in my spare time, so you will read, hear and see more of “Project: Evolution” in the future.

There are two main reasons, why the development schedule could not be translated into action. At first the plan was too tight and I had not enough time every single feature would have required. And the second point dramatized that even more. I abstracted too much, what does not support fast prototyping. But it will help me in the future to add new functionality and content in shorter time and is essential for the flexibility in configuration and modding.

Project: Evolution screenshot

Screenshot of “Project: Evolution” from 2014-04-11

You can still track the progress of the game when you follow my updates on Twitter and Facebook. I hope that you enjoyed and will enjoy the insights in the development I gave and will still give.

Category: Game Development, Project: Evolution / Author: Lightrocker / Date: 2014-04-13 - Sunday / Comment(s): none

Update on “Project: Evolution”

Here are two screenshots from the current process of the prototype:

Project: Evolution Project: Evolution

You can see day by day progress by watching the highlights on YouTube:


Category: Project: Evolution / Author: Lightrocker / Date: 2014-04-04 - Friday / Comment(s): 1

Let’s get started!

The development of “Project: Evolution” has just begun.

Watch the stream on Twitch: www.twitch.tv/Lightrocker
Follow my tweets: twitter.com/LightrockerRon
See my updates on Facebook: www.facebook.com/LightrockerRon

I hope you will enjoy it!

Category: Content Creation, Game Development, Programming, Project: Evolution / Author: Lightrocker / Date: 2014-03-26 - Wednesday / Comment(s): none

Development Schedule: Building a game in less than three weeks!

Yes! A full game! Okay… It will only be a playable prototype. But hey, you nearly cannot have a sensational headline without bending the truth today. Nonetheless I intend to do a lot of things in short time without knowing my tools well. But I have got a plan:

Time Plan Result
Week 1
Day 1 - Set up the camera
- Import a space craft from the asset store
- Make the player vehicle controllable
- Cameras for 3 levels set
- Free space craft imported
- Player can control vehicle view dependent with keys
- Mouse/touch input is not finished
Day 2 - Import enemies
- Create hostile movements by using mathematical functions
- Project floating-point movement to level resolution grid
- Mouse input finished
- Two free space vehicle imported as enemies
- Enemy spawning functionality implemented
- Hostile movements created using predefined way points, but not finished
- Resolution grid missing
Day 3 - Render entities to textures and display results
- Apply shaders to the sprites for "quality downgrade" to match retro style
- Scene is being drawn to a render texture
- Vehicles are placed on a grid
- "Retro" shader is absent
Week 2 – Research for modding options
Day 4 - Implement shooting and destruction system - Post-process shader program added
- Grid and render texture functions have been improved
- No projectile/destruction system introduced
Day 5 - Add environment (from asset store?) - Post-processing has been refined
- Weapon/Projectile system and simple destructions are included now
- Environmental visualization has not been addressed
Day 6 - Write "AI" scripts for enemy behaviour
- Integrate scoring system
- An environment was added
- Simple scoring system has been implemented
- Projection to 2D grid was refined
- First attempt to integrate spline movement
- Research for asset loading capabilities
Day 7 - Include sounds and music
- Refine shading system
- Spline movement between way points fully integrated
- Background music inserted
- Shoot and hit sound effects added
Day 8 - Build framework including menus - Movement of the environment added on
- Level abstraction and loading functionality assembled
Week 3 – Investigate releasing options
- Test, fix and improve
Day 9 - Level loading refined
- Colors mapped to Commodore 64 palette
Day 10 - Environmental shader for harder edges added
- Started to replace color palette constants by grading texture map
Day 11 - Finished to replace color palette constants by grading texture map
- Trying various combinations of environmental and post-process shader properties
Day 12 - Environment rendering for stage two simplified
- Directional alignment adapted to grid
- Indirect movement by mouse positioning introduced
Day 13 - Publish prototype - Vital energy for objects introduced
- Sounds can be played using an identifier
- Player is destructible and will respawn after some time
- NO DEMO HAS BEEN PUBLISHED!

I will amend and adjust items, when the right time has come.

Category: Project: Evolution / Author: Lightrocker / Date: 2014-03-18 - Tuesday / Comment(s): none

« Previous Entries