Next-Gen 3D Rendering Technology: Voxel Ray Casting

A Little Bit Of History

Carmack’s experiments with voxels go back further than last year. In fact, his interest goes back some 10 years. Between the Quake/Quake II engines and Quake III, Carmack conducted several experiments with new rendering techniques. He gave all of this research the code name Trinity, which a lot of gamers understood to be a future product and the new generation of 3D engines from id Software. But, in fact, the Quake III engine remained fairly conventional, as Carmack himself revealed in a .plan file dating from 1998:

“Here are some notes on a few of the technologies that I researched in preparing for the Quake3/Trinity engine. I got a couple months of pretty much wide open research done at the start, but it turned out that none of the early research actually had any bearing on the directions I finally decided on. Ah well, I learned a lot, and it will probably pay off at some later time.”

Some of his experiments involved displaying voxel octrees. Here’s what he had to say just after the release of Quake III:

"I did these two voxel engines at the beginning of Quake III and it got to the point where I thought that I could almost make them run in software, but it would be at a fairly low resolution, and compared to what you could do at that speed with hardware polygons, it doesn't pay off in that case," Carmack said. "I did do an analysis of what the memory-access patterns would be and everything; you could do a voxel ray-tracer in hardware with drastically less hardware than what we're actually using right now for all the triangle rasterizers and I think it could be a much more compelling visual representation in a lot of cases.”

That quote is taken from an interview on FiringSquad that dates from early 2000, almost 10 years ago. So, it’s clear that the idea has been turning over in John Carmack’s head for quite some time.

You can’t talk about voxels without mentioning Outcast. The game, which first appeared over 10 years ago in July 1999, impacted an entire generation of gamers thanks to its many qualities, but also because of its highly unusual 3D engine at a time when 3D graphics cards had started to become the rule in gamers’ PCs.

Outcast was based on an all-software rendering engine, which made it especially power-hungry. To play the game at its maximum resolution (an impressive 512x384), you needed a leading-edge processor, but not a 3D graphics card. Its resource-intensiveness wasn't the only reason why this engine made its mark. Its use of voxels also made the game’s rendering truly unique.

But you have to put that into perspective–even if the title has remained (along with the games from Novalogic) a standard bearer of voxel-based rendering, it actually only used a fairly simplified form that was also reserved for the landscape. All the objects and characters were very standard polygonal models. The landscape was based on a height map, which meant that there was only one possible height for each point in the environment, ruling out complex structures like arches.

That limitation wasn’t a deal breaker, since such a structure is fairly rare in nature due to the constraints of physics. Nevertheless, the display of the landscape was fairly simple and was achieved column by column. For each column, a maximum Y value was stored (in a Y-Buffer). The pixels of the column in question were filled in starting at the bottom of the screen, only if their Y value was greater than the one stored in the Y-Buffer. This rendering method made the process of removing non-visible parts of the scene very efficient and very easy.

After that little trip to the past, it’s time to take a look at what voxels might mean to us in the future.

This thread is closed for comments
    Your comment
  • DjEaZy
    ... the 'matrix' is near... by this rate of progress...
  • 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.
  • curnel_D
    This technology sounds a TON more promising than Ray tracing.
  • 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! :)
  • 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.
  • 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
  • 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........
  • 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 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...
  • mlopinto2k1
    Pretty cool stuff.
  • amdfangirl
    Better put off upgrading my computer... again :P
  • In the regular resolution 12x12 you get 144 cells instead of 122 as stated in the text
  • fatedtodie
    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.
  • bin1127
    “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?
  • manwell999
    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.
  • zak_mckraken
    @manwell999 : lawl
  • JimmiG
    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.
  • precariousgray
    Here's what I saw.

    That example should give you an intuitive idea of one of the advantages of using trees.
  • kikireeki
    What happened to Normal Mapping?
  • JonathanDeane
    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 :)
  • spiketheaardvark
    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.
  • I wrote my own implementation of SVOs on D3D10 pixel shaders. It's a very long loop.. The biggest problem I see is animation - you really can't do skeletal animation or anything else compact with this system. And it really is very very slow. I think Adaptive Tetrapuzzles for geometry and page tables for textures will be the way forward for massively detailed models.
  • hannibal
    Well I remember the Outcast and other voxel based games from that time period. They were really nice looking and I was sure, that they will be the next big thing... and what happened, allmost nothing untill this. I even wrote to MS (when I was much younger and more naive), that next DX version should allso support hardware accelerated voxels...
    Well as everynone knows, there has not been spesific voxel support in any DX-version. But now dx11, that brakes some boundaries between CPU and GPU, may actually bring that closer? I am not sure, based on this article, if GPU can help CPU in this very CPU bound way of making craphic. If anyone can enlightment this aspect, It would be a great interest in my opinion.
  • Soul_keeper
    I Believe the calculation at the bottom of page 3 is slightly off.
    each component of a RGBA value takes more than 1 byte a piece (3 bytes)
    so, if i'm not mistaken, instead of 4 it would be 12 for a 1024x1024x1024x12 = ~12GB calculation
  • Soul_keeper
    nevermind, I guess a single int could be used in some fashion.