Next-Gen 3D Rendering Technology: Voxel Ray Casting

The Technologies

Before going into detail about the algorithm being discussed, we need to define certain terms, such as voxels, octrees, and ray casting. Not everybody has a Carmack to English dictionary handy.

Just as “pixel” is a fusion of the terms “picture” and “element,” a voxel is a fusion of “volume” and “pixel.” So, a voxel is a basic volume element. To visualize this easily, think about the Lego blocks you played with as a kid (or maybe still do today, if you have kids). You can build just about anything using a few basic blocks. Voxels start with the same principle: a volume is approximated by an assemblage of cubical blocks. That means we have a representation of volume, whereas triangle meshes only represent an empty shell, or the skin around the volume.

Voxels have been used many times in video games, but their traditional use is mostly in the medical field. The primitive is especially well-suited for reconstructing volumes from successions of transverse–section images, like the ones MRI scanners put out.

However, representing volumes using voxels is not a perfect approach. The real world is not made up of an assemblage of little cubes, and so it’s impossible to get an exact representation of most volumes using voxels. In the next image, you can see a particularly unfavorable case with a very rough approximation of a torus (you can call it a doughnut if you want) using voxels.

However, that shortcoming has to be put into perspective when talking about video games. After all, the triangle meshes used in most games are also only approximations of volumes, and just as you can refine a representation by using more triangles, it’s possible to use a finer grid of voxels to limit the effects. But here is where memory consumption comes into play, which represents the main disadvantage associated with the use of voxels.

Let’s do the math: a simple grid of 1,024 voxels in each dimension takes up 1,024 x 1,024 x 1,024 * 4 in red, green, blue, and alpha (RGBA) values, which equals a whopping 4GB of memory. And that’s far from being an exaggerated resolution. Consequently, it’s out of the question to use voxels that way. Fortunately, there is a solution for limiting the disadvantage: octrees or octal trees.

  • DjEaZy
    ... the 'matrix' is near... by this rate of progress...
    Reply
  • doomtomb
    This stuff is pretty interesting but a little over my head. The only thing I really care about is when we will start seeing this in our games.
    Reply
  • curnel_D
    This technology sounds a TON more promising than Ray tracing.
    Reply
  • the_krasno
    This is awesome, the people that can really gain something here are amateur filmmakers that can't afford the giant rendering farms big studios have! :)
    Reply
  • the_krasno
    the_krasnoThis is awesome, the people that can really gain something here are amateur filmmakers that can't afford the giant rendering farms big studios have!I meant independent, not amateur. Sorry.
    Reply
  • personally i like raytracing, except for the performance issues. if you've ever tried doing a little 3d rendering, ray tracing is very good, makes things look very real if done properly. again i know it is slow
    Reply
  • liquidsnake718
    Very interesting stuff, I do understand how limiting cubes or voxels can be limited in terms of depth and height(same height per distance) as polygons have that advantage where the triangle gives us just that, an angle that can be measured in terms of height and distanve. We have a vanishing point with a triangle as well.....

    Iwonder if they can impliment both polygons and advanced cubes with different sizes for the initial layers creating a more fluid and complexed scenario or landscape........
    Reply
  • JonathanDeane
    Interesting but voxels will have some extreme performance and space constraint hurdles to overcome before they become the main rendering of any game. I just downloaded a small demo http://www.advsys.net/ken/voxlap/voxlap03.htm its a little over 500K for the whole works but after you hit the genall batch file (it speeds up loading) the thing occupies about 120MB's of space for this simple game. Something like Quake 3 would have been a multi DVD file...
    Reply
  • mlopinto2k1
    Pretty cool stuff.
    Reply
  • amdfangirl
    Better put off upgrading my computer... again :P
    Reply