Real-Time Ray Tracing : Holy Grail or Fools’ Errand? *Partial Reconstruction*

Fill lights are almost as neccessary with GI as without, and shadow casting lights are obviously not part of GI at all, as they're direct illumination.
Well, in mentioning shadow-casting lights, I was referring to those cases where the lights that cast shadows are too few in number and range to cover an area and fill lights are not really what they want. Then you see lighting guys breaking out the negative lights and the gobo hotspots and what not.

Ever been to a movie shoot? A lot of extra lights, bounce cards and trickery is always required to create mood, emphasize parts of the scene, separate actors from backgrounds and so on - even though mother nature gives us high quality GI.
Of course, and this comes up in level design when you're doing baked GI lightmaps and such as it is. We often have to design scenery such that there are a lot of overhangs and not-entirely obvious 90-degree angles and so on just so we can get that bounced light to show up. We avoid things like wide open spaces with gently rolling hills or something... instead, you put clutter and make the scene just busy enough to generate some interesting paths for light to follow.

I could go on and list other examples but I hope I've already made my point clear. GI will present a lot of wins - but there are many new problems and challenges as well, and people expecting a simple and easy solution are in for a lot of disappointment.
The only part where I disagree is the part about it being "new." I'd say that these are pretty well-known problems, and in many cases, artists and designers have already learned how to deal with them. They were new when people first started providing tools for generating radiosity lightmaps, but it looks to me like the art community has learned quickly. Okay, you could make the argument that a lot of small studios aren't there yet, but the knowledge is out there.
 
im barging in in the middle of long discussion but .. can anyone summarize in simple terms why doing GI using low LOD geometry, like physics proxies, does not work ?
 
I searched and couldn't find this, so I thought I'd throw it out for discussion. My apologies if this has been linked too already in another thread.

http://www.pcper.com/article.php?aid=506&type=expert&pid=1

The article is by Daniel Pohl, a relatively familiar name around these parts when it comes to this topic. It's his "One year later" take on the subject.

He also talks about what he's doing over at Intel. I won't pretend I know enough about all of this to assume it may have something to do with Larrabee, but it's interesting nonetheless.

Anyways, I'm just the messenger... ;-)
 
Last edited by a moderator:
Oh no... I had convinced myself that Matt Pharr was gonna fix up the nonsense coming out of Intel ;)

The most rediculous paragraph from the latest work:
The question may arise, why can't these acceleration structures be used in rasterization? Well, they are, to a certain extent, but at a lower precision. Some games have one such coarse-grained structure for rendering graphics, a different one (at a different resolution) for collision-detection and yet another one for AI (sometimes created by different third-party infrastructure suppliers). Besides taking up more memory than necessary, one problem in using these three separately computed data structures is the effort to keep them consistent. See below for an example of what happens when the information from the collision detection structure differs from the rendering structure.
I'll give him kudos for taking what is one of the biggest limitations of ray tracing (the need for a deep, "high precision" acceleration structure to be maintained) and somehow twisting that into a big problem with rasterization...?? Surely this guy has marketting experience ;)

And seriously, what does using separate acceleration structures for different queries (visibility, collision, etc) have to do with ray tracing vs. rasterization? In reality: nothing, but he manages to again make it sound like rasterization is at some sort of disadvantage here.

Even after he sort of begrudgingly acknowledges that rasterization can benefit from scene acceleration structures (read between the lines above... it is there! ;)), he still manages to throw up a rediculous O(n) vs O(logn) graph to make the eventual victory of ray tracing seem inevitable.

And he still completely ignores the fundimental problem that if you have so many polygons per camera pixel, you have a big mess of noise/aliasing on your hand and you need LOD anyways. We don't need to render any more polygons IMHO (GPUs can already do enough), we just need to find better ways to distribute them dynamically around the scene. True, continuous LOD is the problem here, and raytracing does nothing to solve that... it merely turns the scene into a big mess (check out the sunflower scene :S).

His argument about not needing hybrid renderers is along the same lines as our discussion thread here: once you need tons of rays/pixel the primary ray gets amortized anyways. However note that he used the argument that we don't have very many extra rays per pixel to justify why ray tracing isn't much slower than rasterization a few pages earlier... marketting propoganda to the max it seems! (Furthermore he uses terrible examples of why we'd want lots of rays per pixel.)

And I'd just gotten my blood pressure down after the last article... oh well ;)
 
From what I've gleaned from that article, Intel's goal is for us to be playing progressively more polished yet still dated versions of Quake4 for another 10 years.

The slide showing the frame rates for the 4-core and 8-core systems on Quake4 is also provides a counterexample for the earlier slide showing ray tracing's near-perfect scaling.

Doubling the number of cores gave equivalent frame rates, but the number of pixels is only 1.56 times that of the earlier example.

Without any kind of explanation as to what factors play a role in the difference, the scaling falls short.
 
Without any kind of explanation as to what factors play a role in the difference, the scaling falls short.
Right - memory bandwidth/access patterns are the only real bottlenecks to raytracing nowadays... if you're computation limitted then you're doing something wrong. Surprise, surprise: multi-core machines are still limitted by the same memory bus and until that problem gets solved it's not gonna scale far enough. Memory hierarchies, control and structures are what is important nowadays TBH, and Cell is arguably a lot more interesting on that front than Intel's current offerings.
 
Look on the bright side guys. at least in future gaming worlds we will have lots of shiny tori. i mean.... its not all bad ;-)
 
*sigh*

It's amazing that all Intel talks about is the theoretical limits of polygon counts on static objects...as if faceting is the biggest problem facing games today and for the next 10 years, and making every object get that chrome spaceship-look. Hoorah for the 1994 raytracing look!

I'd rather see most games try to get their gamma correction situation in order. The feature at the top of my wishlist is to get 4x multisampling to an fp16 render target fast enough for a console.
 
(As context, I think that general competition between rasterization and ray tracing is great--I'm a big fan of both approaches (I'm actually a fan of anything that makes a CG picture in the end. :) ), and it's very healthy to have people pushing hard from both sides--competition is what leads to progress!)

And he still completely ignores the fundimental problem that if you have so many polygons per camera pixel, you have a big mess of noise/aliasing on your hand and you need LOD anyways. We don't need to render any more polygons IMHO (GPUs can already do enough), we just need to find better ways to distribute them dynamically around the scene. True, continuous LOD is the problem here, and raytracing does nothing to solve that... it merely turns the scene into a big mess (check out the sunflower scene :S).

This is a really important point to keep in mind. Coupled with good culling structures, the complexity of a good rasterization-based engine really is something along the lines of num pixels * depth complexity. And the nice thing about rasterization is that you don't need to spend so much work building good acceleration/culling structures versus ray tracing--you can be a bit more sloppy and still get good performance.

Another thing that rasterization has going for it is the efficiency gain to be had from MSAA. The key thing about that is that you generally only run the pixel shader once per pixel, but you can have a larger number of point samples against the geometry. As shaders get more and more complex, this is an increasingly big win--the MSAA samples are increasingly cheap (relatively speaking), or conversely, the win from not shading once per sample gets bigger and bigger. I am not aware of a ray tracing architecture that has been able to exploit this well; maybe there is a clever way to do it. But that ends up being another case where rasterization keeps running ahead giving ray tracing more of a gap that it needs to close to be competitive. :)

His argument about not needing hybrid renderers is along the same lines as our discussion thread here: once you need tons of rays/pixel the primary ray gets amortized anyways. However note that he used the argument that we don't have very many extra rays per pixel to justify why ray tracing isn't much slower than rasterization a few pages earlier... marketting propoganda to the max it seems! (Furthermore he uses terrible examples of why we'd want lots of rays per pixel.)

The way I like to think about this problem is that at the end of the day, it's a competition for what gives the most visual bang for the buck for the FLOPS and bandwidth used. Ray tracing offers a certain trade-off there, and in return gives some great visual effects. On the other hand, lots of smart people out there are doing great research about other ways to use those FLOPS to make amazing images--people like Ravi Ramamoorthi, Peter-Pike Sloan, etc, have done all sorts of great work using clever math to develop computationally efficient ways to generate really nice imagery. The bar that ray tracing needs to pass is that the FLOPS it requires must give a better visual result (however you quantify that), than other ways you could use those FLOPS in rendering. That is a higher bar to get across than the "can it generate an effect interactively in the first place"--rather, for the FLOPS burned, ray tracing also has to show that was the best use of the FLOPS.

Anyway, like I said, I think this competition to maximize image quality per FLOP is what makes all this stuff so much fun.

-matt

(The above are my personal opinions only and are not the positions of Intel.)

(Please forgive the following advertisement.)

PS: We are hiring! Send me a note at "matt.pharr" at the domain of intel.com if you've got expertise with advanced graphics algorithms, compilers, or low-level high-performance programming and are interested in working on some really interesting projects on really interesting architectures--there are some really fun opportunities to change the world in a big way.
 
Last edited by a moderator:
(As context, I think that general competition between rasterization and ray tracing is great--I'm a big fan of both approaches (I'm actually a fan of anything that makes a CG picture in the end. :) ), and it's very healthy to have people pushing hard from both sides--competition is what leads to progress!)
Indeed I agree whole-heartedly! I think the reason that I'm most bothered with some of the stuff coming out of Intel is lately regarding raytracing is that they seemingly want to dismiss rasterization entirely by making a largely dogmatic argument about the relative "purity" of the algorithms. Rasterization is presented as a "necessary evil" that we've had to deal with up until this point that Intel is going to save us from. Of course I exaggerate, but I'd have no problem with an article that was phrased more like "look at all the cool stuff we can do now that we can do some raytracing in real time" rather than "forget everything you've ever been doing, we're here to revolutionize real-time graphics and show everyone how things are *really* supposed t be done!" :)

Now perhaps that sort of thing is what you refer to as "pushing hard from both sides" but I'm much more convinced by an fair, well-researched argument than something one-sided. This is particularly true since the only relevant information coming "officially" out of Intel right now seems to be from Daniel.

The bar that ray tracing needs to pass is that the FLOPS it requires must give a better visual result (however you quantify that), than other ways you could use those FLOPS in rendering. That is a higher bar to get across than the "can it generate an effect interactively in the first place"--rather, for the FLOPS burned, ray tracing also has to show that was the best use of the FLOPS.
Exactly. Certainly there are things that are more efficiently done with raytracing - and I have no problem accepting this - but I don't buy the hand-wavy complexity arguments that "prove" that raytracing will eventually be better for everything. It seems to me that each algorithm has its strengths and weakness and both are useful. Thus I find it a bit naive for Daniel to dismiss hybrid rendering entirely.

Anyways thanks for your input Matt - it's always good to hear from someone with lots of experience with both algorithms.
 
Another thing that rasterization has going for it is the efficiency gain to be had from MSAA. The key thing about that is that you generally only run the pixel shader once per pixel, but you can have a larger number of point samples against the geometry. As shaders get more and more complex, this is an increasingly big win
Unfortunately, as tris get smaller it's an increasingly small win ... even worse, as shading gets more "non-linear" it does an increasingly poor job at AA. As for doing the equivalent on a raytracer ... you could simply start with subsampled rays, then do the remaining rays and if the intersections are on the same tri as subsampled ones interpolate between their shaded results.
 
Tris are already as small as they should be. As already noted you just can't render a scene without LOD and trillions of polygons. It would be a flickering mess.
 
If I can spot one it isn't small enough.
And if you spot aliasing they're too small ;) The point is that we need to work on better LOD algorithms, not uselessly throw tons of triangles per pixel at the graphics card.
 
Last edited by a moderator:
As for "one year later", really if you think about it for STATIC scenes both ray tracing (RT) and rasterization (RZ) can scale the same.

RT depends on off-line pre-build acceleration structures for finding ray intersections. Likewise you can easily build RZ acceleration structures for static geometry to pre-cull hidden geometry given a viewpoint/region. One obvious current example of this, http://www.insomniacgames.com/tech/articles/1107/occlusion.php.

For anything useful, ie highly dynamic, RT looses its scalability do to having to rebuild the acceleration structures for the ray traversal (a process which doesn't scale well). A few characters running around in a static indoor scene (quake) is not dynamic, try ray tracing an outdoor scene with trees where the wind is moving the branches and leaves.

What I don't understand about Intel's efforts thus far is why they haven't tapped into all the excellent research being done on unconventional methods of speeding up ray tracing. Such as adaptive frameless rendering, http://www.cs.virginia.edu/~luebke/publications/pdf/afr.egsr.pdf .... it is brutally obvious that during animation there is tremendous temporal coherence, simply compare the compression ratios of motion-jpeg (spatial only) to mpeg (spatial+temporal).
 
As What I don't understand about Intel's efforts thus far is why they haven't tapped into all the excellent research being done on unconventional methods of speeding up ray tracing. Such as adaptive frameless rendering, http://www.cs.virginia.edu/~luebke/publications/pdf/afr.egsr.pdf .... it is brutally obvious that during animation there is tremendous temporal coherence, simply compare the compression ratios of motion-jpeg (spatial only) to mpeg (spatial+temporal).
Doing something similar, entirely on the GPU:

http://ati.amd.com/developer/gdc/20...g_with_Reverse_Reprojection_Caching(GH07).pdf

The video is useful:

http://ati.amd.com/developer/gdc/20...g_with_Reverse_Reprojection_Caching(GH07).avi

Jawed
 
Every time you talk about it in these terms a REYES fairy cries... :(.
REYES subdivision handles the silhouettes ... but it won't handle something like say gratings or aliasing caused by shading or displacement mapping (which is why it also used stochastic supersampling). To handle that sort of stuff without just throwing samples at it you need imposters (which will be hard to generate automatically when there is animation or tricky shaders are used).
 
Back
Top