13 - Voxel Sprites

Introduction

One of the biggest draw backs to creating a voxel engine (in my opinion) is actually the limited style and look that most voxel engines give as a final output. If all the rendering and drawing of objects is limited to 'world size' voxels, every object in the world has to stay at the same scale relative to every other object. I didnt like this limitation and instead decided that I wanted to create objects that could have independent scales and thus allowing me to create objects with different levels of detail.

For example if I wanted to create a world sized tree, this would be fine and I could create it using the normal block size, but if I wanted to create some small flowers using voxels, I needed to use a much smaller block size to still get the same level of detail. To do this I decouple the block sprite data management and rendering from the world data and rendering.

This means that each block sprite maintains its own array of voxels internally. When loading a voxel sprite, we setup the block data, the same way as the chunks, then setup the block data depending on what type of block sprite we are loading. One downside of this is that *large* block sprites lose the 'chunk' optimizations that the world has, and effectively means that each block sprite is essentially a mini voxel-world in it's own right.

Here are some examples of block sprites:

    • // TODO : Add screenshots

Independent Rotation

Another advantage of splitting the voxel sprite data from the world rendering, is that you can decouple the block sprites from the world axis. This means that you can have rotated objects in the world, this adds a BIG improvement over a purely 'world only block' voxel engine.

Re-using The Same Voxel Sprite

A nice trick to help optimize and speed up a scene containing many many voxel sprites, is to re-use the same static mesh for each instance of the voxel sprite.