Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

How Quake Wars Met the Ray Tracer

Posted by timothy on Mon Jan 26, 2009 01:15 AM
from the cannot-break-the-laws-of-physics dept.
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.
+ -
story

Related Stories

[+] Technology: Intel Shows Off Quake Wars, Ray Traced 368 comments
An anonymous reader writes "At the Research@Intel Day 2008, Intel showed a ray-traced version of Enemy Territory: Quake Wars. Compared to the original game, a water with reflections and refractions and a physically correct glass shader were added. Also, a camera portal with up to 200 recursions to itself has been demonstrated. To show off this ongoing research in the topic of real-time ray tracing, a four-socket system with quad cores has been used that allowed rendering the enhanced visual effects in 1280x720 at 14-29 fps. Just two years before, early versions of Quake 4: Ray Traced ran only at 256x256 with 17 fps. Even though Intel's upcoming Larrabee will be primarily a rasterizer, the capabilities for also doing ray tracing on it should deliver interesting opportunities."
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • 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.

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

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

    • 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.

  • by grumbel (592662) <grumbel@gmx.de> 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 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.

      • 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

        • 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.

    • 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 Anonymous Coward

          Interpersonal skills, go read some, spend a few years living it then open your mouth.

          It may be worth wiping the rabid spittle off your chin first.

          ( I'm a random passerby, not the original poster. )

        • Re: (Score:3, Insightful)

          by karnal (22275)

          I know I use my share of the foul words in the english language, but think about this - everyone would take your comment more seriously if you didn't use them; at least not to the excess seen in your post.

        • by robthebloke (1308483) on Monday January 26 2009, @09:21AM (#26606885)

          If you are a decent well learned programmer, essentialy an expert in algorithmic complexity, then surely you understand the comparison O(n) vs O(log n) and why you cannot refute it with horseshit.

          How about real world experience then?

          We have approximately 120 rack units in our renderfarm, each with dual quad core xeons + Dual Quadros. Of the rendering jobs we submit, approximately 0.001% use raytracing exclusively, about 0.5% make use of raytracing extensions. The rest is rasterization because it's a hell of a lot more efficient. Period. (And I'm talking about the real world here - not Big O notation on paper)

          The arguments for scene complexity go out of the window very quickly in all fairness, for quite a few reasons.

          1. To double the complexity of a model, we typically expect to see the time spent authoring that asset to increase by a factor of 6. We currently employ in the region of 200 modellers. A doubling of scene complexity would take that number to 1200 (if you don't count the additional management overhead etc). There simply aren't enough skilled people to make that a reality, so there is an absolute cap on how complex a given scene can become.

          2. We always have, and always will continue to seperate the rendering into seperate passes for the compositor to correctly light at a later stage in the pipeline. A highly skilled compositor can produce higher quality images quicker than a better rendering algorithm can. Because we always split the scene into smaller constituent parts, the scene's never get complex enough to see any ray tracing benefits (and those parts can be rendered seperately on different nodes in our RF).

          3. We typically use 4k x 4k image sizes, rasterization is certainly fast enough for those image sizes. Our scene complexity is far higher than that of a any game now, or in the next 5 years.

          4. Scene complexity is inherently limited by 1 other major factor that you've completely ignored. Memory speed. As your data set increases, rendering performance degrades to the speed at which you can feed the processors - i.e. the speed of the memory. Again, this is another reason why we seperate the scene into render layers.

          CG has never, and will never, use accurate mathematical models to produce images. If a cheap trick is good enough, it's good enough. Raytracing never really made the in-roads into the FilmFX world that the early 80's/90's evangelists predicted - And i predict that it will never make the in-roads into Games that you seem to believe.

          Thirdly, what the fuck do current video cards have to do with *anything* about this? This is called RESEARCH. Ever do any?

          Wow! Ever done any research yourself? If you did, you'd know that the answer is an awful lot! The only computational resource available that can provide both the memory bandwidth, and the computational power required for raytracing is the GPU. Our rendering process has been using GPU's to accelerate raytracing (and rasterization) for a couple of years now, unfortunately all of the problems I raised above regarding ray-tracing still apply.

          • Re: (Score:3, Interesting)

            by 0xABADC0DA (867955)

            4. Scene complexity is inherently limited by 1 other major factor that you've completely ignored. Memory speed. As your data set increases, rendering performance degrades to the speed at which you can feed the processors - i.e. the speed of the memory. Again, this is another reason why we seperate the scene into render layers.

            What's neat about raytracing is that the memory access can be divided into millions of separate 'threads' that are not dependent on each other. So, with a processor (such as Tera MTA) where threads run in the order that memory is available you achieve maximum memory bandwidth.

            On 'modern' processors where memory is read in the order that threads run you get massive pipeline and cache stalls when using a software raystracer. So when you are comparing the 'vs' of rasterization and raytracing you need to cons

        • by daVinci1980 (73174) on Monday January 26 2009, @11:46AM (#26608541) Homepage

          Rockoon, you are mistaken in a lot of your points. Even if you seem a bit angry, please allow me to explain. (I work for nvidia, but I do not speak for them).

          Firstly, in rasterization, 4xAA does mean 4 samples per-pixel. The short version is that 4xAA basically means that we render into buffers that are twice as large in the X and Y direction (so 2*2 is 4), and then resolve the extra pixels with hardware when we go to present the backbuffer into the front buffer.

          I can't speak to 4xAA in raytracing, but to be apples-to-apples, it would have to literally be extra rays in the X and Y directions. Note that I'm not claiming there's a 4x performance penalty here, though, because modern ray tracers rely a lot on cache coherency to be performant. Algorithmically, I would agree that there really is a potential for 4x the cost, but algorithmically we don't care about the constants we multiply by, right?

          Third, it's important to consider what current cards do because they're the largest install base, and they are what developers will target. It's also important if you believe that hybrid raytracing is the future--almost all modern raytracers use rasterization for the eye rays to try to help with the pixel complexity problem.

          Fourth, you are correct. In fact, there are probably relatively few hardware inventions that didn't begin their life as a software implementation--CPUs excepted.

          Finally, you are incorrect. Raytracing scales O(pixels) and O(ln(complexity)). Rasterization is relatively constant in the number of pixels, and O(complexity). I agree, scene complexity has gone up considerably (and continues to go up considerably) every generation of new titles. Fortunately, in the same time period rasterization has massively decreased the cost of processing geometry while simultaneously increasing the ability to parallelize those types of workloads. Modern GPUs (like the relatively old 8800 GTX [wikipedia.org]) can process in the neighborhood of 300M visible triangles per second. That means that if you're trying to redraw your scene at 60Hz, you can have around 5M triangles per scene per frame. The closest I've seen of most modern titles is in the 500K-1M range, so I think we still have some head room in this regard. Modern techniques, such as soft shadowing and depth-only passes definitely eat into this count, which is why we're seeing much higher counts than we used to.

          Regarding pixel complexity, the number of pixels that matters is more than just the resolution, it's also how many times you'd like to draw those pixels in a given second. Seven years ago, you were lucky to find a CRT that drew 1280x1024 (which is a weird, 5:4 resolution, but I digress) at more than 60 Hz. 85 was reasonably common, but finding a monitor that drew at 1600x1200x85 was pretty rare.

          Now, you can find monitors that render at 1920x1200x120 for relatively cheap. And 240 Hz is on the way. [extremetech.com] That's a lot of pixel data to be moving and redrawing. And speaking from experience, I can say that leveraging coherence within a single frame is hard, and leveraging coherence between frames is virtually unheard of.

          It's not that raytracing is an impossible dream, it's just that the GP was correct: it's no panacea.

          I'd like to reiterate: though I work for nvidia, I do not speak for them.

    • 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.
    • 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) <peterNO@SPAMslashdot.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.

  • 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 argent (18001) <peterNO@SPAMslashdot.2006.taronga.com> on Monday January 26 2009, @12:09PM (#26608953) Homepage Journal

        Intel isn't trying to do ray tracing. Really, their point is to find a way to make GPUs unnecessary since it is a threat to the CPU market.

        They can call it "ray tracing extensions" to the I7 or I8 CPU. It's not like the x86/x86_64 instruction sets are some kind of blushing virgin whose precious architectural purity would be violated by adding instructions like "RT_LOAD_MESH" and "RT_LOAD_SHADER"...

        What bothers me is how nVidia is missing the boat.

  • 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!
    • Re: (Score:3, Informative)

      by Flentil (765056)
      Best off-topic post I've seen today.
      • Re: (Score:2, Funny)

        by Isauq (730660)
        Indeed. I sort of actually started paying attention when I caught, "The ninja was flanked by a pair of Nazi frogmen...."
    • Re: (Score:3, Informative)

      How did this get modded insightful - by ANYONE?

      guys they did this work, I played this game enough to be able to tell it wasn't fun to play, it tried to be a Battlefield 2 clone with a broken physics engine, and "real-time" shadows that wasted FPS and didn't need to be real-time at all, static objects could have just been baked into the megatextures like bf2, was sad to see ETQW when it finally showed up a year late and suck ass gameplay. Splash Damage and id should be ashamed of this product and tech.

      QW:ET is one of the best made, best balanced team FPS games I have EVER played. If it draws from anything, it draws from the previous Enemy Territory game. I'm sure we've all played a lot of the original ET, being that it was free. QW is like a much refined version of this, with a modern graphics overhaul, and more interesting setting.

      a warmed over version of Doom3 / Quake 4 tech that was poorly coded by Splash.

      I mean, come on? Flamebait if not outright troll. But insightful? Where's the evidence that this was poorly coded - this game is

    • Carmack is still turning in his grave, oh wait he still around? Oh yeah he is, ahh Mr. Carmack.. sir please stop working on console games and blow the world away again, we need you, and being a console whore is one more step toward mediocrity.

      Don't worry, just wait for his next game. John Carmack is about to make you his bitch.

    • Re: (Score:2, Insightful)

      Reality, by definition, is "dirty". We have dust, we have imperfections in every surface, no matter how carefully machined. Houses are never truly square, roads are never perfectly level, and points in a corner are always rounded. Always.

      Computers, by definition, are "clean". Squares are always truly square, roads are as perfectly level as they were designed to be, and corners are always razor sharp, no matter how much you "zoom in".

      The problem with modern graphics systems is they are computed to extreme levels of precision. If they incorporated a sort of fundamental randomness, if they were intrinsically uncertain, they just might be able to really approximate reality, which is messy, ugly, and imperfect.

      You seem to be confusing texture irregularity with material consistency. A house wall is not perfectly "razor sharp", but no matter how many times you look at it, they do not suffer from "randomness" or are in any way "uncertain". At least not if you are not looking at a sub-atomic level. Also, the bandwidth would not be that high, if you take into account that human eyes have very little resolution, and thus an extreme amount of detail at a distance would be pretty much irrelevant.

    • If you just add randomness to every frame, it would look like a mess. The tricky part is to draw each frame with the same randomness so it doesn't jump around. Which of course means you aren't drawing it very randomly at all...
    • Personally, I'm thinking about FPGAs which produce circuits at relatively low bandwidth but that are highly tuned to the task at hand.

      Hardware-Accelerated Shaders Using FPGAs [dctsystems.co.uk]