Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Graphics Software First Person Shooters (Games) Intel Technology

How Quake Wars Met the Ray Tracer 158

An anonymous reader writes "Intel released the article 'Quake Wars Gets Ray Traced' (PDF) which details the development efforts of the research team that applied a real-time ray tracer to Enemy Territory: Quake Wars. It describes the benefits and challenges of transparency textures with this rendering technology. Further insight is given into what special effects are most costly. Examples of glass and a 3D water implementation are shown. The outlook hints into the area of freely programmable many-core processors, like Intel's upcoming Larrabee, that might be able to handle such a workload." We mentioned the ray-traced Quake Wars last in June; the PDF here delves into the implementation details, rather than just showing a demo, and explains what parts of the game give the most difficulty in going from rasterization to ray-tracing.
This discussion has been archived. No new comments can be posted.

How Quake Wars Met the Ray Tracer

Comments Filter:
  • by Anonymous Coward on Monday January 26, 2009 @01:37AM (#26604801)

    I was using a raytracer.

  • Hrmm (Score:5, Funny)

    by acehole ( 174372 ) on Monday January 26, 2009 @01:41AM (#26604821) Homepage

    So when can I buy the CPU/Vid card that can do raytracing, heat my house, cook food off and pipe extra heat out for a steamhouse?

    • Re: (Score:2, Funny)

      Right here! [nvidia.com]
    • Re: (Score:2, Funny)

      by Spy Hunter ( 317220 )

      2010. [wikipedia.org]

    • Re:Hrmm (Score:5, Informative)

      by j1m+5n0w ( 749199 ) on Monday January 26, 2009 @02:07AM (#26604923) Homepage Journal

      Quoting wikipedia: "Intel planned to have engineering samples of Larrabee ready by the end of 2008, with a video card featuring Larrabee hitting shelves in late 2009 or early 2010."

      Of course, it's always possible that AMD or Nvidia could beat Intel to market with a ray-tracing friendly GPU, but it doesn't seem likely that they'll bet the farm on a technology that isn't well-established.

      If you want to play a software ray-traced game right now (or you just want to heat your house for the winter), you might want to look at Outbound or Let There be Light, which are both open-source games (though they run on Windows) built on top of Arauna. Gameplay is not really up to par with commercial games, but as a technology demo they're quite impressive. Framerates are tolerable on reasonably modern CPUs.

      • by CarpetShark ( 865376 ) on Monday January 26, 2009 @04:05AM (#26605287)

        AMD or Nvidia could beat Intel to market with a ray-tracing friendly GPU, but it doesn't seem likely that they'll bet the farm on a technology that isn't well-established.

        What? Not well-established? Raytracing is probably one of the most established graphics technologies. Specifically, it's been coming to games for years; only a matter of time. In fact, I don't really know why they're making such a big deal out of it here, since I'm pretty sure I read that the original quake (or was it doom?) traced a ray or two for some mapping reason, back when the source code was released.

        Raytracing has mostly been replaced with other, faster technologies these days, which produce similar results, so it's not the panacea it seemed back when you had 5-bit hand-drawn stuff OR raytracing.

        None of which is to belittle the work done on this game, because it does look nice, and improves on the graphics of the games before. But so do most games. Wake me up when town characters have emotions based on that guy you killed last week who rebuilt the clock tower because you suggested it back when you weren't so torn up about your wife dying.

        • Re: (Score:2, Interesting)

          by 91degrees ( 207121 )
          since I'm pretty sure I read that the original quake (or was it doom?) traced a ray or two for some mapping reason, back when the source code was released.

          Not sure about those two, but I'm pretty certain Wolfenstein 3D did. That was for visibility and texture coordinate calculation, rather than light and shadow. Since the map was 2D only a handful of rays were needed.
          • Sounds like the same system, yes. I'm pretty sure it was back with Doom 1, now that I think about it more.

          • by TheBracket ( 307388 ) on Monday January 26, 2009 @10:38AM (#26607635) Homepage

            Wolf3D used raycasting, rather than tracing to give a pseudo-3D rendering of what was basically a 2D grid map.

            It's pretty clever how it worked, I remember having a LOT of fun cooking up my own similar renderer back in the day (Turbo Pascal with inline asm was fun!). If I remember rightly:
            First, the ceiling and floor were drawn in, covering everything (intersecting in the middle, vertically). Then, they took your location on the map, and cast a ray for each row of pixels (320 of them, I believe). This ray went forward until it intersected a wall - and the distance to the wall was measured. It then did a quick calculation (lookup table) to determine the height of the wall at that distance, subtracted half that height from the center of the screen, and plotted a vertical line in the color of the wall. I seem to remember the wall color was retrieved from a small texture and scaled.
            That gives surprisingly good results, albeit with no lighting or shading.

            • It then did a quick calculation (lookup table) to determine the height of the wall at that distance, subtracted half that height from the center of the screen, and plotted a vertical line in the color of the wall.

              Wouldn't it make more sense to simply store the top and bottom coordinates directly to the lookup table ?

              In any case, you'd also need a Z-buffer to draw sprites correctly, especially if one is half behind a corner and half visible.

        • by Joce640k ( 829181 ) on Monday January 26, 2009 @05:34AM (#26605617) Homepage

          Wolfenstein did "ray casting" - not the same thing.

          • "Ray tracing" and "ray casting" were used interchangeably when ray casting was popular. Now, that ray tracing has become feasible for advanced real-time rendering, a distinction was made between the two phrases.
        • Raytracing has mostly been replaced with other, faster technologies these days, which produce similar results, so it's not the panacea it seemed back when you had 5-bit hand-drawn stuff OR raytracing.

          Those technologies are only faster for the moment. Theoretically, at some point in the future, raytracing will be faster again, and already produces better effects.

          It's actually hard to tell which will win, just thinking about it. If I'm reading TFA right, they went from a 20-machine cluster to a single machine in some 4-5 years. And raytracing has better theoretical scalability -- it's embarrassingly parallizable, and has quite a few cases (extremely complex geometry, real curves instead of just triangles,

          • Movie studios usually go with rasterization rather than ray-tracing because ray-tracers access scene memory in an unpredictable way, and so ray-tracing is excruciatingly slow if you can't fit the entire scene into the memory of one of the machines that's rendering it. Rasterizers can split the scene up, render the pieces separately, and combine the results in a single image.

            For games, which typically run on a single machine, this is a non-issue.

            • Ah, thanks for that...

              For games, which typically run on a single machine, this is a non-issue.

              It still is, though, because now there's memory bandwidth to consider. The amount of cache/RAM, and how fast it is -- or worse, requiring more RAM in your system, or on a raytrace-friendly video card...

              Contrast with rasterizers, which can at least transfer the scene in discrete, contiguous chunks, whereas a raytracer will hit it more unpredictably, as you said.

              • That's true. It's already the case in some well-written ray tracers that the memory bus is the bottleneck, not the floating point math. There are some interesting tricks to get the most out of that limited bandwidth. With packet tracing, for instance, you trace a bundle of rays (often 4 or 16) at the same time, so you don't have to access the same geometry over and over again, once for each ray.
    • You forgot all about taking care of business in bed and making you a sandwich afterward.
    • by aliquis ( 678370 )

      It's the kitchen of tomorrow:
      http://ftp.arl.mil/ftp/historic-computers/png/cray2.png [arl.mil]

    • by Lumpy ( 12016 )

      Buy a Quad P4 motherboard from 4 years ago and use heatpipes to do all that you ask.

      Hell if you did it right you could get one of the old P4 Xeon dell servers that would take 8 processors and easily heat your home and water for you.

    • You Already [pixelution.co.uk] can [computerarts.co.uk]
  • by grumbel ( 592662 ) <grumbel+slashdot@gmail.com> on Monday January 26, 2009 @02:45AM (#26605043) Homepage

    Yet another ray tracing article and yet again all the same problems as before. Doing yesterday games in ray tracing is all nifty, but also kind of pointless. For one we already played them, but more importantly, it doesn't actually use the strength of ray tracing. Rendering a tree build out of texture quads is a nice accomplishment, but wasn't the whole point of ray tracing that one can have a million polygons and no longer need such hacks? So show me a realistic tree instead of trying to replicate the limitations of rasterization.

    I am still waiting for a game/demo that actually is build from the ground up with ray tracing in mind and by that I mean one that actually looks good, just a few shiny spheres might have been impressive back on the Amiga some 20 years ago, not any more.

    • by j1m+5n0w ( 749199 ) on Monday January 26, 2009 @03:14AM (#26605129) Homepage Journal

      I am still waiting for a game/demo that actually is build from the ground up with ray tracing in mind and by that I mean one that actually looks good,

      Have you tried Outbound? You can find it here [igad.nhtv.nl]. While it's probably not destined to be a huge hit, it looks nice and runs at a playable framerate on a reasonably fast computer. (If you don't want to try to "beat" the game, there's an option buried in one of the configuration files to disable physics and just fly around and admire the scenery.)

      • by aliquis ( 678370 )

        Looks kinda crappy vs todays games, or the games off 5 years ago, on par with those released 8 years ago maybe ;)

    • by YesIAmAScript ( 886271 ) on Monday January 26, 2009 @03:58AM (#26605259)

      The problems haven't changed since the 80s.

      I attended Siggraph in 1989 and watched the AT&T Pixel Planes presentation. Things still haven't changed in 20 years.

      I have no idea how you say that ray tracing somehow frees you from quads (or tris). You're still going to have to describe the geometry somehow. Depending how things are done you might get some freedom from surface normals and such, but you'll still have to figure out how to make that tree from sub-elements so that the ray-tracer can bounce rays off it. When a ray passes through the bounding box of the tree, you're going to have to be able to find out of the ray truly intersects the tree and if so, where on it did it hit, at what angle and what color the tree would appear to be from the angle the ray came from. That's going to require you describe the tree with geometry elements and the texture/color and spectral changes depending on angle.

      • by malakai ( 136531 )

        I think the gp was talking about using transparent quads with textures to fake complex graphics.

        IE, branches of a tree are really just a texuture painted on a quad with bump-mapping. It's 2 polys, not 1000 it could be.

        the article makes a reference to trying to speed up hit testing of transparent quads when shadow-casting.

        Games/technology will continue this slow R&D followed by a quick jump in visuals for all games for the next 10 years. At some point, our power will be suffiecent enough that the tree wi

        • by tepples ( 727027 )

          IE, branches of a tree are really just a texuture painted on a quad with bump-mapping. It's 2 polys, not 1000 it could be.

          That's the case in Fighting Force for PS1. It's also the case in Animal Crossing, which was designed for a 1996 GPU and a fixed-angle camera. (The GameCube game was a source port from N64, the DS has N64-class GPU, and the Wii game intentionally kept the same art style.) But in plenty of games using a "realistic" art style designed for the PS2 or more powerful hardware, branches are actual geometry.

        • People said the same things as you are saying 20 years ago. Iterative fractal systems (as you describe) were also big at SigGraph 1989.

          But that extra power was instead used to raise the output resolution, texture resolution and the poly count, instead of using the trickery you speak of. I don't foresee a boom in the next 10 years any more than the last 20.

          Also, there's no difference between ray tracing and scan-line rasterization that would dictate or even facilitate a change from textures (and transparency

    • by Sycraft-fu ( 314770 ) on Monday January 26, 2009 @05:17AM (#26605563)

      You aren't going to see that kind of thing in a game for many reasons that boil down to that ray tracing isn't ready to do realtime. To make a game that used ray tracing would pretty much doom it to failure.

      One problem you have is that the graphics hardware out there isn't built for ray tracing, it's built for rasterization. Now while I'm sure you can write your own ray tracer on the newer hardware that does GPGPU stuff, I'm also sure it wouldn't run as well. Reason is that current graphics cards are purpose built rasterizers. They are designed to do that as fast as possible. So you are left with writing your own ray tracing engine in software, either on the CPU or GPU. This is not going to be fast, especially since ray tracking is fairly computationally intensive.

      Well then you hit the next problem: Pixels. Ray tracers do NOT scale well with resolution. Each pixel has to have it's own ray cast. If you want to do anti-aliasing, then you have to do more rays for that. This is why ray tracing demos tend towards low resolutions. It is much faster the less pixels you have to do. Ok well that doesn't compare favorably against the rasterizers. They scale extremely well with resolution, and also in terms of anti-aliasing. Many of them can do 4xFSAA with next to no performance penalty, and can do it at full HD resolutions. Not the case with your ray tracer. If it can render 40 FPS at 1920x1200 with no AA, it'll be just 10 FPS with 4x AA since it now has to do 4 rays per pixel.

      So you aren't going to see it happen any time soon. The net result wouldn't look as good as the equivalent rasterized game. It won't be the sort of thing you see until either there starts to be purpose built ray tracing hardware (GPUs may start be made for both) or general purpose processors are so fast it makes no real difference.

      Intel is all up on this because they see GPUs as a threat to their computation market. However, as this demonstrates here, there really isn't an advantage at this time. You throw a positively massive system at it and you get poor performance. Even if you redid the game so it used extremely high geometry, nobody would give a shit. IT would run way too slow on any normal computer.

      • by gwappo ( 612511 )
        I'm going to have to disagree a bit here.

        The issue with raytracing is memory access patterns; this is not so much an issue with GPUs vs CPUs, but rather that both CPUs and GPUs rely on linear prefetch patterns through memory, which raytracing breaks as you traverse the spatial subdivision structure.

        Secondly, ray tracers scale very well with resolution O(n) where n = number of pixels; we currently still have a relatively high constant cost, but assuming moore's law keeps up in performance and we find an

        • by Creepy ( 93888 )

          true, optimally it requires static geometry for the scene mesh, and that actually is why they're using bump mapping for the water rather than a surface mesh. One flaw to this is that the edges of the water will not rise or fall, so you need to fake it with texturing or particle systems.

          Ironically, bump mapping is largely being replaced in rasterizers by pseudo raytracing techniques that use the normal map and a height to project the actual geometry from the subsurface (however, most are still mapped to a s

      • by Sloppy ( 14984 )

        Near as I can tell, your whole argument boils down to "raytracing is slow[er]." (I added the "er".) The years keep going by, though, and while the clocks are creeping up slower than they used to, we keep getting more 'n' more cores. Raytracing might always be slower but it's only a matter of time until it's fast enough.

        When you say 10 FPS, I think "That's amazing!" That means in 10 years we'll all be doing 60 FPS it on $500 machines.

      • One problem you have is that the graphics hardware out there isn't built for ray tracing, it's built for rasterization.

        This paper is by Intel, who wants to release video hardware specifically designed for raytracing. It's also embarrassingly parallel -- this example originally ran on a cluster of 20 machines.

        Ray tracers do NOT scale well with resolution. Each pixel has to have it's own ray cast.

        That's linear. As in, throw in twice as many cores, and you can handle twice as many pixels. How does rasterization scale with pixels?

        Ok well that doesn't compare favorably against the rasterizers. They scale extremely well with resolution, and also in terms of anti-aliasing. Many of them can do 4xFSAA with next to no performance penalty...

        Alright -- but you haven't actually shown what the requirement is. Is it logarithmic? Linear? Constant?

        The net result wouldn't look as good as the equivalent rasterized game.

        No, it will look better, when it gets there.

        As an example: A mirror in a rasterized

    • Actually your tree example has nothing at all to do with raytracing. Textured Quads are used for leaves because of polygon count. The polygon count required to create every individual leave is extremely huge and it takes not only more render power but a hell of a lot more setup/translation processing.

      The higher polygon count required would put just as much demand on a raytracer as it would on a reyes or scanline renderer. In fact it may put more stress because raytracing scenes tends to require larger amoun

      • Re: (Score:3, Informative)

        by grumbel ( 592662 )

        Textured Quads are used for leaves because of polygon count.

        The whole point of realtime ray tracing is that it scales with O(log(n)) instead of O(n) when it comes to polygons. Which means that you can and should model each leaf as fully polygon. That is actually done in quite a few other examples, such as the sunflower scene [openrt.de] or that Boeing model [uni-sb.de], where every last screw is modeled and yes, ray tracing can handle those just fine.

        Now there is of course a cavet, this scalability only works for static scenes and things become quite a bit more problematic when stuff is an

        • Re: (Score:3, Insightful)

          There's one other caveat. That scalability fails to apply when you take into account that memory read's are not free.
          • isnt the point that x*log(n) (where x represents the extra cost of doing raytracing) is still going to be smaller than n (for large enough n), infact the benifit of switching to raytracing (if it can approach its theoretical limit) is that for highly complex scenes it scales incredibly well (almost flat infact)

            • True, but the thing everyone forgets is that artist time increases exponentially with modeling complexity. Artists can't physically create enough data for it to be of real benefit. Given that renderman subdivides all polys to pixel sized chunks, and an entire filmFX team still can't produce enough data to make raytracing more cost effective than reyes, I fail to see how a games team is going to do it... Architectural rendering is about the only scenario where you may get to that level of complexity.
        • I've been working in 3d modelling and animation professionaly for a long time, and started back in 3ds in the dos days and povray...

          Honestly i've never heard this. I've never experienced this either. From a performance point of view, raytracing as always been heavier with larger poly counts.

          But it is interesting, perhaps i'm wrong and i've never noticed and its worth checking into. After all i'm more of a modeller and animator than a render coder ;) but i've been around a while in the field.

        • Btw, i just checked out the sunflower and boeing models. I'm not sure they show off exactly what you're referring to becauese there is no text explaining what is going on in the scene so here is my assumption...

          In the sunflower case, each peddle is rendered, and each leave is as well (this is nothing new or specific to raytracing) In fact, each of those peddles and leaves are "Instances" of 1 peddle, and 1 leave. Its simply cloned in memory from the source objects and it saves down on polygon count/memory e

    • Was it more fun? (Score:4, Insightful)

      by samkass ( 174571 ) on Monday January 26, 2009 @07:26AM (#26606109) Homepage Journal

      So was the ray-traced version of the game more fun? Or am I missing the point of games?

      • Re: (Score:3, Insightful)

        by Cheapy ( 809643 )

        In this case, yea. You were missing the point. It wasn't meant to make the game more fun. It was meant to show that ray tracing was possible on a fairly modern game. It's like modding a toaster to run BSD, or adding a laser turret to your mailbox: a substantial reason for doing it is to see if it's possible.

  • by robvangelder ( 472838 ) on Monday January 26, 2009 @02:51AM (#26605057)

    When looking at the before/after pictures, was anyone else surprised when they read which was the raytraced version?

    To me, the ship in the water looks better with the bump map.

    • by CMKCot ( 1297039 ) on Monday January 26, 2009 @02:55AM (#26605063)
      both screens were raytraced, they just showed off two ways of simulating the water.
    • Re: (Score:3, Insightful)

      it's got more obvious special effects but the other one looks for more realistic.

    • by nbert ( 785663 ) on Monday January 26, 2009 @04:24AM (#26605351) Homepage Journal
      Maybe the reason for this is that the 2D surface with the bump map resembles the look of water we expect in a game. I also thought it looked better, but it's not really possible to judge this based on a screenshot, because when it comes to water it's all about the movement.
    • Bad sample (Score:4, Informative)

      by argent ( 18001 ) <(peter) (at) (slashdot.2006.taronga.com)> on Monday January 26, 2009 @06:42AM (#26605915) Homepage Journal

      As someone else noted, both pictures were raytraced.

      To really show the difference between 2d and 3d water, you need to show the water interacting with a solid object close enough so that you can see that in one example the waves really go up and down and in another they're just a picture of waves on a mirror.

      There's been a LOT of work making 2d water look dramatic, and I've seen people say they prefer 2d water in broad shots like this in other games (not even raytraced ones), but when you're in the game looking over the edge of a dock or looking at a nearby boat with the light behind you, it's pretty clear that spending more time on the physics of the water pays off.

      Heck, even with 2d water, paying attention to the wave effects in shallow versus deep water pays off when you interact with it. And that's rarely done because it's not as dramatic.

  • Seriously, as of a year ago I would rather have used an old AGP TNT2 than than the latest built in Intel graphics. I improved the performance of a relatives machine by 35% after putting in a PCI GeForce 5600 instead of using the built in Intel.

    Did something happen over the past year or two that caused Intel to be able to publish papers like this? I mean their graphics are fine for a Windows desktop running Office and a browser, but it stops there unless something recently changed.

    • There's a huge difference between the things they have in their lab and the things they're selling.

      • by Linuss ( 1305295 )
        Hmmm, I WAS going to say that you should get yourself a better pc, but I think I've changed my mind and would recommend common sense, instead. No Shit intels lab work is going to be better than what the end user ends up seeing, usually because the end user is too dumb to set up a pc correctly, but maybe even a little bit because THEY USE STUFF YOU CANT BUY? sheesh, people these days.
    • Re: (Score:3, Informative)

      All of this stuff is done in software on the CPU, so the graphics hardware really doesn't affect it.

    • they're looking into raytracing ''because'' they're graphic cards are so bad. They can't be bothered to juice up their video graphics department and productivity, so they're trying to make the world change, instead of Intel changing their ways.

      - They would be a lot better off if they would just stop making graphics processors altogether and let ATI, Nvidia do the integrated graphics, or better yet, motherboard makers should bloody well realize that intel integrated is crap and stop buying integrated graphi

    • Intel are perfectly capable of producing high performance graphics hardware. The reason they don't is that the cost of entry to that market is too high. ATI and nVidia have it sewn up between them. Intel make a lot more money selling lots of cheap chips to people who don't need much performance.
  • "however, if one part of the bundle hits another surface then the other one, it produces some reorganization"

    Is it just me or does this widely disseminated professional document contain a then/than error?

    Let's hope that wasn't one of the coding challenges they faced.

    if (x > y/2) than

    {

    'uh oh

    }

    (This post written assuming "the other one" = "the other part of the ray bundle")

  • They're still taking the wrong approach to raytracing. If Philip Slusallek was able to get 30 FPS in a raytraced game in 2005, using a single Pentium 4 behind a raytracing accelerator that was roughly equivalent to a Rage Pro in terms of gates and clock speed, it seems silly to me to ignore the possibilities of adding an "RPU" to the mix instead of just adding more general purpose CPU power. Yes, I know that's Intel's thing, but even for Intel... a raytracing core would be a tiny speck in an I7.

  • by bitrex ( 859228 ) on Monday January 26, 2009 @07:09AM (#26606043)
    Our raytracing engine is the finest available! For all your sphere-on-chessboard game needs! If your game is going to involve spheres, chessboards, reflective spheres, or possibly spheres floating on water - raytracing is the way to go!
  • Why is an article about a game that was released in mid 2007 tagged classicgames? Quake is a classic game, Enemy Territory: Quake Wars certainly isn't.

  • Rasterizing triangles and the "first intersection" on a ray tracer actually give exactly the same result for a triangle mesh.

    Ray tracing has a more obvious mapping onto the rendering equation, but rendering geometry or even first order reflections offers very little advantage (and several disadvantages) over rasterization techniques. Shadows are more implicit in ray tracing, but they don't look "better" until you have area light sources and start shooting a LOT of rays.

    And that's really the problem. Most

"All the people are so happy now, their heads are caving in. I'm glad they are a snowman with protective rubber skin" -- They Might Be Giants

Working...