Sign in with
Sign up | Sign in

The Technologies

Next-Gen 3D Rendering Technology: Voxel Ray Casting

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.

Ask a Category Expert

Create a new thread in the Reviews comments forum about this subject

Example: Notebook, Android, SSD hard drive

Display all 47 comments.
This thread is closed for comments
  • 4 Hide
    DjEaZy , October 21, 2009 6:17 AM
    ... the 'matrix' is near... by this rate of progress...
  • 3 Hide
    doomtomb , October 21, 2009 6:23 AM
    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.
  • 2 Hide
    curnel_D , October 21, 2009 6:53 AM
    This technology sounds a TON more promising than Ray tracing.
  • 2 Hide
    the_krasno , October 21, 2009 7:09 AM
    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! :) 
  • 0 Hide
    the_krasno , October 21, 2009 7:09 AM
    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.
  • 1 Hide
    Anonymous , October 21, 2009 7:10 AM
    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
  • -2 Hide
    liquidsnake718 , October 21, 2009 7:41 AM
    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........
  • 0 Hide
    JonathanDeane , October 21, 2009 7:59 AM
    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 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...
  • -2 Hide
    mlopinto2k1 , October 21, 2009 10:40 AM
    Pretty cool stuff.
  • -2 Hide
    amdfangirl , October 21, 2009 11:08 AM
    Better put off upgrading my computer... again :p 
  • -2 Hide
    Anonymous , October 21, 2009 11:33 AM
    In the regular resolution 12x12 you get 144 cells instead of 122 as stated in the text
  • -5 Hide
    fatedtodie , October 21, 2009 11:59 AM
    Based on John Carmack's record if he says it is bad... you should do it, seeing as anyone with a memory will recall the time he said multi-core was a waste of time and we should continue the Ghz race (even those the Ghz race achieved Moore's Law).

    John Carmack is a dinosaur and will try any new technology if paid enough (see his changing his mind on multi-core to "help" on the xbox 360).

    Please get an expert that isn't a moron.
  • -3 Hide
    bin1127 , October 21, 2009 12:43 PM
    “pixel” is a fusion of the terms “picture” and “element,”, learned something new.

    But i wouldn't want destructible walls. How am i going to camp when all the walls are gone?
  • -4 Hide
    manwell999 , October 21, 2009 1:11 PM
    Since when does a tree have attached children?
    It's unfortunate that the example of MRI scan example was used. Medical software must avoid the habit of naming branches in tree structures as children, lest an error message is displayed accidentally to a patient such as "Out of memory allocating children, child process aborted." Which would be a lawsuit if scanning a pregnant female. But this bad coding practice is quite common.
  • -8 Hide
    zak_mckraken , October 21, 2009 1:43 PM
    @manwell999 : lawl
  • 1 Hide
    JimmiG , October 21, 2009 3:37 PM
    fatedtodieanyone with a memory will recall the time he said multi-core was a waste of time and we should continue the Ghz race

    Well, back in the day, everyone was talking about higher GHz as the solution to everything. Even Intel did:
    "LUCKY PUNTERS WILL BE ABLE TO BUY 15GHZ INTEL CHIPS, containing a billion transistors, by the end of the decade, said Pat Gelsinger, Intel veep and CTO in his keynote at the Intel Developer Forum in Tokyo today. Gelsinger also predicted that PDAs will hit 5GHz in the same timeframe. It's unlikely the chips will use the existing Pentium 4 architecture which is reckoned to only be good up to around 10GHz. "

    Then Intel hit the thermal/power wall some time in 2004-2005, before even making it to 4 GHz. This of course signaled the end of such optimism. If that hadn't happened, higher clock speeds would still have been the best way to make faster CPUs. That makes all code run faster, not just code that is carefully optimized to extract parallelism. Multi-core CPUs for desktops and laptops initially came around not because it was the best choice for improving performance, but because it was not possible to further increase clock speed.
  • -1 Hide
    precariousgray , October 21, 2009 3:41 PM
    Here's what I saw.

    That example should give you an intuitive idea of one of the advantages of using trees.
  • -1 Hide
    kikireeki , October 21, 2009 5:28 PM
    What happened to Normal Mapping?
  • -1 Hide
    JonathanDeane , October 21, 2009 5:54 PM
    kikireekiWhat happened to Normal Mapping?

    Hmmm maybe using a skin of voxels on top of a polygon mesh would be good for facial animation stuff, that sounds interesting to me or a mesh of polygons on top of the voxels for deformation purposes. Ok my mind is officially fried you may all proceed to LOL at me :) 
  • 0 Hide
    spiketheaardvark , October 21, 2009 6:43 PM
    I wish the article discussed how such a system would handle transparent objects and refracted light sources , such as an image of a glass of water.
Display more comments