A real-time voxel path-tracer using a fast DDA voxel traversal algorithm and spatiotemporal reprojection.
The scene consists of low level 8x8x8 voxel grids called 'bricks' and a high level 'brick map' grid that specifies which brick to use in each cell.
- Scenes are loaded entirely from .scene and MagicaVoxel .vox files.
- Each brick can contain up to 15 materials, with color, emission, and roughness properties loaded from MagicaVoxel.
- Each brick-map can contain up to 15 bricks that should be specified in the pallet in order (pallet colors 1-15).
- The camera is initialized to the saved camera in the 0 slot in the brick-map file.
- The sky can be either a sample sky shader, or a uniform color loaded from the brick-map pallet in index 255 (with an emission mat applied).
A scene file should start with the brick-map MagicaVoxel file, followed by 'sky' or 'color' depending on the sky choice, and then all of the brick MagicaVoxel files in order, all seperated by whitespaces (see assets folder for examples). If the 'sky' setting is selected it should be followed with the sun strength.
WASD + Space + Ctrl to move, Alt to unlock the cursor.
Right-click to place brick, Left-click to destroy.
showcase1.mp4
showcase2.mp4
showcase3.mp4
- Better material lighting
- Add higher level 4x4x4 bitmap
- Overhaul scene representation to use a Sparse Voxel Octree?
- Minecraft world/schematic loading?