Devlog#4 – Procedurals & Library

Hi there! Today I would like to show you about fresh & juicy features, just created in PhotoVoxel. There are two:

  • Asset Library – Allows you to quickly organize your voxel prefabs in your handy library, which allows you to drag&drop into it the scene outliner and then, drag&drop previously added assets into the scene.
  • Procedural objects – which makes possibility to create your voxel assets directly from C# script.


Often in your work flow, you will find cases, when something needs to be used more than once. To achieve this, the library window comes to the rescue! The PhotoVoxel library is the place, where you can easily manage your asset parts, to quickly create large scenes, in a matter of minutes. Assets dropped into this window remain persistent across each editor launch (items are stored in a special OS directory dedicated to PhotoVoxel editor). New items can be added by simply dragging elements from the outliner window into the library. You will be able to manage assets, like adding, removing, or renaming. You can even rotate the previews within the library window!

Procedural Assets

Procedural assets let you create custom voxel objects (single or with multiple “children” objects). The setup is very easy:

  1. First you will download PhotoVoxelKit (which will be available publicaly via github – we drop links later on)
  2. Next you will create your custom class based on Procedural class, visible via API of PhotoVoxelKit.
  3. Then you will use commands like SetVoxel, AddChild, Line, Box etc. to create your asset.
  4. When you are done, just click the library with the right mouse button, and from context menu select “Add Procedural..”, then browse to your newly created C# script.

This feature is dedicated to a little more advanced PhotoVoxel users, we know, but the whole API is so simple, that every beginner programmer or amateur should be able to handle this.

In every script that you are creating, you can add some properties of your asset, that will be visible to the editor Object Properties window, where you can tune in the asset parameters. The one default parameter is the Seed, which is an integer number, that can be used as an input to your random number generator for making a unique asset look, each time a seed is changed.

Procedural snowflake asset and its outliner and properties with its parameters (MaxArmCount, MinArmCount, Seed)
Source code of the snowflake asset, isn’t it simple? 🙂
Cactus asset, while the Seed value is changing by the user

I hope, you like these new features. According to the procedural objects, the links for the PhotoVoxelKit (which will include much more than just procedural assets API) will be posted soon. So stay tuned and see you soon!

Leave a Comment

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