Parts of the Voxel Engine
I thought it was time to talk about the Voxel Engine and how it all works.
Below is a diagram describing the different pieces of the voxel engine:

There are four major parts to the Voxel Engine:
- VoxContainers
- Lookmaps
- Renderers
- Z-Sorters
VoxContainers
In the same way as Sprite is the basis for anything you do in Flash, VoxContainers are the basis for everything you do in the Voxel Engine. VoxContainers contain Voxel Data (both position and colours).
Voxcontainers are further divided into two types of containers Parsers and ParticleContainers.
Parsers are used to parse Voxel Data. For instance the Radio Head dataset for House Of Cards which is a bunch of CSV files. One of the parsers in the Voxel Engine is a CSVParser that is specifically designed to parse the House Of Cards dataset.
ParticleContainers are used to “particlize” parsed voxel data. In other words you take the data from a parser pass it to a ParticleContainer and then your voxels can start moving. (I’m sure I’ll discuss this process more in a future post)
LookMaps
Earlier I mentioned that VoxContainers contain position and colour data for colours. Well in actuality a VoxContainer contains positions, LookMaps, and look indices.
Basically a LookMap has an array of colours and each voxel has an index (look indices) that points to a specific colour in a LookMap.
It may seem pointless to have LookMaps however they are a crucial step for the Voxel Engine. (again more about that later)
Renderers
Renderers are the part that make voxels visible. It basically takes a VoxContainer and renders it out to screen using it’s position data and LookMaps.
Z-Sorters
Z-Sorters are used to sort the Voxel Data before it’s rendered. Simply it makes things look right, Voxels that are far back in Z-Space aren’t rendered in front of ones that are closer.
Z-Sorters were specifically broken out because this way they are not tied to the renderer. This way if a newer better sorting method (hint hint Adobe) comes out we can use that instead. Or if we want to implement some sort of culling of voxels it can be implemented here.
But wait there’s more…
These are the major portions of the Voxel Engine but there are definately more pieces to the Voxel Engine and I hope to talk about those in future posts.
_Posted in R&D, Voxel Engine
