Asset - Shaders Snidr's Voxel Sprites

TheSnidr

Heavy metal viking dentist
GMC Elder

Snidr's Voxel Sprites

Welcome to the topic about Snidr's Voxel Sprites!

Marketplace link
Executable download link


This asset allows you to draw 3D voxel objects using ray casting. The asset is made specifically to work well with conventional 3D games, allowing for a combination of voxel sprites and triangle meshes.

The voxel sprites can be transformed like any other 3D object using matrices. Even if the object is transformed, the actual voxels will still be rendered in world-space, resulting in a lovely low-resolution effect when the object rotates.

The sprite for this car actually looks like this:


The asset has only been confirmed to work on Windows.

Thanks to:
kraifpatrik, for showing that you can set the depth of individual pixels in a shader!
 
Last edited:

IGameArt

Member
So then are these essentially just 2d images rendered to look 3d using a shader, with the addition that individual pixels have their own depth and can appear to pass through other geometries and voxels?
 

TheSnidr

Heavy metal viking dentist
GMC Elder
They are essentially true voxels, since the texture map is laid out so that the voxel sprite has both width, height and depth.
It can indeed be compared to the so-called sprite-stacking technique, but that technique would not allow for any other rotations than around the z-axis, like this:



As opposed to the usual way to draw 3D graphics, rasterization of triangles, the voxel sprites are rendered by casting rays from the camera and returning the colour of the first voxel the ray hits. This also returns info about the normal at the intersection, and we can even cast more rays from the position of the intersection for cheap exact shadows and ambient occlusion.
 

IGameArt

Member
Hmmm, I'm going to experiment with combining this with my voxel format importer. Your renderer is far superior to mine, but mine allows for loading of known formats, like ken silverman's formats :p
 

TheSnidr

Heavy metal viking dentist
GMC Elder
I also made a few tests a while ago, using a 2048x2048 surface for a 256x256x64 world! It had more optimizations, like a cascade of grids that increased in resolution and stuff.
In the following gif I removed the surface clearing function, resulting in something that looks like a voxel version of the solitaire win effect:
 
Top