Slashdot Log In
Real-time Raytracing For PC Games Almost A Reality
Posted by
Zonk
on Fri Sep 21, 2007 12:52 PM
from the hard-not-to-love-reflections dept.
from the hard-not-to-love-reflections dept.
Vigile writes "Real-time raytracing has often been called the pinnacle of computer rendering for games but only recently has it been getting traction in the field. A German student, and now Intel employee, has been working on raytraced versions of the Quake 3 and Quake 4 game engines for years and is now using the power of Intel's development teams to push the technology further. With antialiasing implemented and anisotropic filtering close behind, they speculate that within two years the hardware will exist on the desktop to make 'game quality' raytracing graphics a reality."
Related Stories
[+]
Games: Ray Tracing for Gaming Explored 266 comments
Vigile brings us a follow-up to a discussion we had recently about efforts to make ray tracing a reality for video games. Daniel Pohl, a research scientist at Intel, takes us through the nuts and bolts of how ray tracing works, and he talks about how games such as Portal can benefit from this technology. Pohl also touches on the difficulty in mixing ray tracing with current methods of rendering. Quoting:
"How will ray tracing for games hit the market? Many people expect it to be a smooth transition - raster only to raster plus ray tracing combined, transitioning to completely ray traced eventually. They think that in the early stages, most of the image would be still rasterized and ray tracing would be used sparingly, only in some small areas such as on a reflecting sphere. It is a nice thought and reflects what has happened so far in the development of graphics cards. The only problem is: Technically it makes no sense."
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
Loading ... Please wait.

Big improvement on the way (Score:5, Interesting)
Or is it? Simply means games will appear more eye-candy than they currently are. Gameplay will not change. EA will continue to use take last years sport game, through some new people into it, perhaps introduce some bug which makes it unusable and peddle it as The New Deluxe Edition. I wonder how many geometric objects it will be able to handle (and whether it handles transparancy with textures and patterns well) Having done a bit of raytracing I'm familiar with how quick things can bog down. It'll probably be a bit clunky at first, but get much better as horsepower and horsepower/dollar ratio improve.
There was some game I played on an Amiga (got that? A really old computer) where I raced around in an aircar zapping stuff (some bastard borrowed the game and I've never seen it since!) Very nicely rendered graphics, beautiful even, nearly looked ray-traced. Must have been about 15 years ago.
While I look forward to more realistic, or creative and beautiful gamescapes, do keep in mind -- we were all blown away by the first high quality animated films, now almost everything animated is rendered, raytraced, etc. and there's a lot of junk out there now. So this will be exciting for about 2 years then become "meh".
Lastly, they've got to get the motion down. Characters in games, including sports, look so damn wooden in their movement! That's where real improvement needs doing.
Re:Big improvement on the way (Score:5, Informative)
Re:Big improvement on the way (Score:5, Insightful)
I'll have to disagree with that. For many people "right" looking shadows are like the movies and television shows. Shadows and light/dark interplay in these environments are far from natural and even in ray-traced environments, animators laboriously juggle "fake" light sources to make the shadows "right" looking.
Also "single" bounce reflections are essentially "solved" problems with triangle rendering (environment maps), so only real advantages of ray tracing are "multi-bounce" and "self-shadowing" which are somewhat easier to solve in a ray-traced environment instead of a triangle rendered environment. Although sometimes these are interesting effects, they generally fall in the "eye-candy" side of the fence today and developers rarely spend much time on these (or so we hope given the state of game-play and AI in todays games), and they generally just implement canned solutions (e.g., some self-shadowing bump-map pixel shader technique) for certain "effects".
Re:Big improvement on the way (Score:5, Interesting)
E.g. raytracing solutions will free up developers to implement more-dynamic scenes, more-dynamic lights and level designs where buildings and cities aren't glorified mazes where 90% of the architecture is an impenetrable facade.
(Sure, some titles feature those sorts of things now - but they're expensive tricks, with severely limited implementation)
Re:Big improvement on the way (Score:4, Insightful)
Re:Big improvement on the way (Score:5, Insightful)
Re:Big improvement on the way (Score:4, Interesting)
Untrue! Ray Tracing is a lot more flexible method of rendering than previous engines have allowed. Many engines have claimed features like "destructible levels and terrain", but the engines were never fast enough to give both the eye candy demanded by the market and an engine capable of such free-form interaction. Ray Tracing could change all that. Programmers could no longer be limited by BSP trees, visibility trees, polygon count, and other requirements imposed on traditional engines.
Graphics-wise, ray tracing could open new doors as well. For example, 3D adventure games haven't really taken off because it's harder to insert clues in the areas. A painting on a wall, for example, will tend to be slightly too blurry to see a clue embedded in it in a true 3D environment. Ray tracing allows for more precise rendering that would make the painting crystal clear from all perspectives and distances. Which means that the game designer could actually make it visible that the subject of the painting is pointing at a hidden door without making it so obvious that it destroys the enjoyment of the puzzle.
What I'm getting at is that graphics improvements have been one of the factors that have allowed game creators to explore new game genres in the past. While the 3D-age has often focused on rendering quality to the point of forgetting the purpose of graphical improvements, that's not to say that a major switch in technologies couldn't bring new gaming experiences with it.
Re:Big improvement on the way (Score:5, Informative)
With raytracing, there are lots of new possibilities. For one thing, reflection and refraction actually work like they do in real life. That means accurate mirrors, lenses, and water refraction. Lights can work accurately if you want them to, and radiosity can be precomputed for static scenes. That may just be eye candy to most people, but there are potentially game-play enhancements that make real life optics part of the game. Most of it (except good lenses) has been faked before with rasterization, but raytracing will actually let you set up a series of mirrors and telescopes to peek around corners in a FPS for instance. I can imagine a true hall of mirrors in an FPS would be at least a little more interesting than what we have now, too.
The other big technological benefit of raytracing is that it's asymptotically faster than rasterization. Raytracing is O(log n) versus O(n) for rasterization, which means that even though raytracing is currently slower (the constants involved in raytracing are higher), after the break even point is passed much less of the available computational power will be needed to render the scene and can instead be used for physics and AI.
I think what he meant is (Score:4, Interesting)
People sometimes get a little too giddy talking about Big O notation. Yes, something that scales logarithmicly rather than linearly will eventually be faster, but it kinda depends on where you are now if that will happen any time soon and thus is worth worrying about. To use arbitrary units, suppose at an 'n' of 1000 is the intersection point between the line for rasterization and the curve for ray tracing. So when we pass 1000, it starts to be a case that ray tracing is more worthwhile. Now suppose that current generation of graphics is 100, and it grows at a rate of 2 per year. Ya... Ok, not going to be worrying about that any time soon.
I think that was his point is that just saying "But it's O(log n)!" doesn't mean it is necessarily better at this point.
Also there is the silicon problem to be considered. We don't do our graphics on general purpose processors, we do them on highly specialized DSPs that actually have only recently gained turning completeness (and aren't very good at it, they are really slow at branching among other things). The graphics we see today are possible only because we can make a special purpose processor that can accelerate them very efficiently. Can the same be done for raytracing? I don't know. I mean I'm sure it is possible to an extent, especially since it is a very parallel problem, but that doesn't mean that we will be able to as efficiently accelerate it.
So while it is appreciated that at some point, on equal general purpose hardware, ray tracing is more efficient that isn't the question. The question is What is that point (and how soon will we reach it) and does that carry over to the special purpose graphics hardware?
big O (Score:5, Informative)
- O(log n) in the number of objects in the scene
- O(n) in the number of primary rays, generally some multiple of the number of pixels on the screen (though it might be a bit less if you're using MLRTA)
- O(n) in the number of lights (though there may be some shortcuts) if shadow rays tests dominate
- O(something big) if there's a lot of reflective and/or refractive objects and you don't do anything to mitigate the rampant recursion
- O(n log n) in the number of photons, if you're using photon mapping
- O(n log n) in the number of objects that moved since the last time you rebuilt the acceleration structure
That first one was what the original post was refering to. (Tracing a single ray is O(n log n). Tracing a pixel involves sending one or more rays and a shadow ray for each light for each primary ray that hit an object. Tracing a whole image involves tracing a lot of pixels. If the number of pixels and the number of lights are assumed to be a constant, they drop out of the big O equation. It's a very big constant, though, and that's one reason why ray tracers are so slow. However, once you get enough CPU to compensate for that large constant, the algorithm starts running pretty fast, and it doesn't slow down much at all when you throw lots of geometry at it.Unintended consequence (Score:5, Informative)
Today, most CG effects must be hard coded, using tricks, shaders, complex modeling techniques, multiple passes, etc... In the raytracing world, as you are aware, the engine is easier to use, and I would also say, easier to code. It is also very easy to parallelize (so a specialized card could bring HUGE performance gains) and require few modeling tweaking compared to the current T&L world. In a raytracer, shadows (including self-projecting), reflections, refractions, bump mapping, displacement mapping, etc... are an integral part of the renderer, they are not a lot of different modules stacked on top of each other. Bringing down the complexity of the rendering engine hopefully frees more resources to work on other parts of the game.
Re: (Score:3, Insightful)
I think the grand-parent's point still stands.
Give me gameplay. (Score:5, Insightful)
Re: (Score:3, Insightful)
arcade Pac-man was awesome game play for it's time. I doubt I could stand more then 10 min of it. Super mario brothers was awesome for it's time. I doubt I could ever finish it again without bei
Better graphics != worse gameplay (Score:3, Insightful)
Not to be a wet blanket... (Score:4, Interesting)
Sure is interesting, all the same.
Wow, real time -- glad I left that business (Score:5, Interesting)
I exited that market and Deep eventually moved out of that field entirely, but looking back, I can't believe we made the money that we made at the time. Now that ray tracing is getting closer to real time, it gives me a few minutes pause to realize how much technology has changed in ways that the AVERAGE consumer has no understanding of -- and doesn't need to. In the end, I'm glad that so many entrepreneurs take risks so that consumers needs (and yes, entertainment for some is a need) and wants are fulfilled, without those consumers even knowing the process necessary to get there.
Raytracing is "embarassingly" parallel (Score:4, Insightful)
Raytracing comes under a class of problems that are embarassingly parallel. Want to render 2 million(~1920x1020) pixels? Send them to 2 million processors(cores) simultaneously and get results back. This is possible because there is rendering each pixel is independent of rendering another. Note that all the data required(like textures, lights, etc.) should be available to all the processors, so SETI style high latency computation is out of the question.
What makes it interesting is that the gigahertz race is done with and has turned into a "core" race. Intel was already showcasing 80 cores on the same chip. A few cores dedicated to Phong shading algorithms and radiosity and the rest to ray tracing would simply overshadow the current raster rendering. Also, raytracing is mathematically elegant and simple compared to all the dirty tricks employed by current graphics technology so it should make programmers' lives easier(unlike the Cell processor which is a nightmare to code for).
Handhelds first? (Score:4, Interesting)
And to the above posts bemoaning the focus on graphics over gameplay, remember if they get a good real-time raytracing system in place then that frees the dev team up quite a bit. No longer having to work so hard on faking proper lighting, they can then focus on the more important things like gameplay/AI/physics.
Gameplay vs Graphics (Score:5, Insightful)
There is game play innovation today, and it doesn't have to be independent of pretty graphics. In fact the people responsible for the game play aren't the ones responsible for innovative game play. One does not diminish the other. Good game play is also not the same as innovative game play. They coincide for instance in games like Katamari damacy but often innovation ~= unpolished ~= crap. What we're all looking for is polished game play. It never changes that around 80% of everything will be considered crap. So just rmeember that back int he day 80% of everything was crap too but you just don't remember. So they can ray trace graphics, thats awesome. Will it diminish gameplay.. not really you'll still have 80/20 rule. It's not an indication that things were better then before only that your brain works in a funny way.
Is it still relevant? (Score:5, Interesting)
Don't get me wrong, I love raytracers [mysterystudio.com], but what once was their exclusive domain (reflections, shadows,...) has been done in a "fake" but very convincing way since the few latest generations of 3D video cards. What's left? True refraction? True curved surfaces? Is it that important? I tend to side with the "give me gameplay" crowd here.
Realtime caustics and global illumination, on the other hand...
Re:Ya I haven't really seen many benefits (Score:5, Informative)
The problem with faking everything is that it quickly breaks down as your needs get more complex. For example, I've been working with a colleague recently on doing some nice, fast, impressive fake effects - most notably a system that can simulate a light shining through stained glass (not just a straight texture projection). We came up with a novel and fast way to fake it, but it completely breaks down if, say, two stained glass windows are in-line and you try to shine a light through... It simply doesn't work.
The advantage of doing things "for real" are that compatibility between your different effects is almost guaranteed, and your coders don't have to spend immense amounts of time curing those problems.
Re:Ya I haven't really seen many benefits (Score:4, Informative)
Just wanted to add a bit more explanation of this. Lightmapping has traditionally been the most effective way to get radiosity in a scene while still remaining real-time. When effects like normal and parallax mapping came along, lightmaps were suddenly incompatible. It took Valve to sort this out (though their solution is far from ideal), and only now, with UE3 and Gears of War, does it actually look halfway decent (Half-Life 2's solution washed things out, it's as if the normal mapping simply isn't there).
To solve the problem of two fake effects being incompatible, Valve invented a new fake effect to bridge it. You can imagine what happens when you start trying to mix a large number of effects. This is why the holy grail is still real-time raytracing - it's also a bit like why we want to have the Theory of Everything, as opposed to a bunch of little physics theories that each apply to a special case.
Sigh (Score:5, Insightful)
The obsession with graphics is ruining the gaming industry. Compare the PS3's sales to the Wii's [msn.com] for evidence.
Re:Not the shiny new hammer (Score:4, Interesting)
Actually, there's a big advantage. Raytracing is O(log n), but rasterization is O(n). OpenRT's demo [openrt.de] of a 350 million triangle model of a Boeing rendered in real time on a single PC (without GPU support) is a good example. The entire model doesn't even fit in memory, so visible surfaces are cached. The result is still realtime (although only a few FPS) with incredible detail. Go slashdot the server and watch the movie. Modern raster based cards can only render that many triangles in a whole second with all their fancy hardware, if they're lucky.