Next-Gen 3D Rendering Technology: Voxel Ray Casting

The Advantages Of Sparse Voxel Octrees

Now let’s look at the advantages of our voxel octree when it comes to rendering. The main advantage of this data structure is that it provides an elegant way of solving the problem of level of detail (LoD) in textures, but also of geometry--all with a single algorithm. That’s because, as we implied in the preceding paragraph, each node of the octree contains color information, and so we can do away with 2D textures as we know them. Or, to be more precise, the octree is both the texture and the geometry.

Consequently, the level of detail problem, which had to be managed in a totally independent way for the geometry and for the textures, now amounts to one single system: managing the level of detail of the octree. And it turns out that this can be done very simply. In a way, the principle is an extension of the mipmapping used for textures. The purpose of mipmapping is to try to conserve texels (texture elements) of the closest possible size to that of a pixel. To do that, several resolutions of the texture are pre-calculated and stored, and the hardware adapts the choice of the mipmap level to the size of the texture on the screen.

Something like this can also be achieved with voxel octrees, with the choice of level of detail made dynamically. As soon as the size of a voxel is less than the size of a pixel, the ray’s traversal of the octree is halted at that level. All that’s needed is to store the average of the information contained in its children in each node and you have a very simple way of managing LoD. This mechanism is perfectly suited to a streaming system, which is a little like the one id Software already uses for its MegaTextures. Only those portions of the octree that are needed are stored in video memory, with another part in main memory to accelerate subsequent accesses. But the great majority of the octree simply remains on the storage medium.

The result is that we have an almost unlimited quantity of geometry (and of textures, as we noted). The octree can be as detailed as we want, and at run time the quantity of memory and the display time remain (relatively) constant. The only limitations are the amount of time the artists can devote to creating the octree and the physical limitations of the storage media in the next generation of computers.

We should say that there are other possible ways of addressing these issues, such as with the use of virtual-texture systems like MegaTextures or sparse virtual textures, which will be built into the major 3D engines (CryEngine 3, idTech 5, etc.) next year. Geometry is a more complicated problem to solve, but several possible solutions are afoot. The simplest of these involves pre-calculating several versions of a mesh at different resolutions and selecting the one that best fits the distance from the mesh to the camera. This basic solution is easy to implement, but a significant amount of visual artifacts are created when moving from one level of detail to another.

  • 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