Voxelicious

I’m going to run out of voxel-based titles and puns real soon. Until then, have some more flying cubes! The sparseness factor influences render time a lot, since there is no efficient skipping of empty space inside the voxel grid. So denser grids render at interactive framerates (>30 fps), because the rays terminate early. Grids with a high sparseness render at abysymal framerates (< 4 fps). I expected this performance hit, but didn’t think it would be this big. Just shows why we need a hierarchical, decent acceleration structure in place.

Remember, this is a ray tracing technique – I’m not rasterizing found voxels here, which some hybrid techniques do – this is per pixel. All results are rendered with a 20x20x20 (8000 voxels) datagrid, varying sparseness at a resolution of 1200×1200, and were downscaled 60% to keep file size acceptable.

I’m implementing Bresenham’s Line Algorithm next week, to get the list of voxels the line passes through, so I can weigh their contributions and achieve a significant speedup. Will require lots of debugging, though :)

I’m also thinking of putting some time in a basic front-end which allows me to rotate the camera, zoom in/out on the fly. Right now, it’s pen-and-pencil camera estimations and running the executable with a lot of parameters. Tedious. :)

Maybe some more parametrisations to work with (cone, sphere, …), or trying to tackle a real-world voxel model.

Leave a Reply