Jump to content
  • Advertisement
Sign in to follow this  
morgan3d

Ambient Occlusion Volumes

This topic is 3090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just posted a report explaining my new Ambient Occlusion Volume technique. This is a pretty straightforward way of getting really accurate ambient occlusion using a method similar to shadow volumes: http://graphics.cs.williams.edu/papers/AOVTR09/ It runs in realtime for typical game scenes, but is much slower than SSAO. The tradeoff is that it is a lot better looking--indistinguishable from ray tracing in most cases. To use this practically you need a GPU with geometry shaders. Here's a sample image: -m [Edited by - morgan3d on December 6, 2009 9:20:32 AM]

Share this post


Link to post
Share on other sites
Advertisement
For offline/non-interactive purposes, FLIPPIN' AWESOME! That level of image quality in just a second or so of processing is really damn great!

For real-time...eeeeeesh, one-to-several dozen ms/frame for decent results on a moderately complex scene? If it wasn't for the ridiculous amount of overdraw (the inset on figure 1 makes my eyes bleed!) that could actually work really well for a game!

Also, are you sure your implementation of regular SSAO is correct? I know that objects in the foreground have some halos due to the way the AO is computed, but I've never seen ones that look as bad as the one in your paper, e.g. here's a shot of Crysis's SSAO:



I mean, there are some halos, but it's not to the point that the results are practically unusable.


The implementation NV has in their SDK also looks fairly accurate and runs at a good framerate, and in fact, it runs better than your version of SSAO: http://developer.download.nvidia.com/SDK/10.5/direct3d/samples.html#ScreenSpaceAO



I mean, yeah, they're using depth AND normal data of the scene, but you referenced using this solution in a deferred renderer: even a light pre-pass and inferred renderer have at least that much info.

Share this post


Link to post
Share on other sites
Crytek has never published their exact algorithm (the version in RTR3 is not what they actually do). I reproduced it by discussing with many game developers and studying the handful of published AO-only algorithms out of Crytek.

The Crytek method really jumpstarted all of the fast AO research and was a great idea. But it is completely wrong and has since been eclipsed by methods that are both faster and higher quality. The halos, gray flat surfaces (they aren't occluded! They should be white), and scale-independence are all wrong. The Crytek method is basically a blurred result of edge filtering.

The Bavoil and Sainz method is quite good, and fast. Here's my rendering of that scene:



They also depend on upsampling for performance. Depending on how much upsampling and how large the AO extent is, the new Ambient Occlusion Volumes will be either faster (up to 2x) or slower (down to 1/10x) than their method. I'm not saying "at low resolution mine is faster"... for around a 10cm AO extent, AOV renders about 8 times faster per pixel at the same resolution, and at all sizes the AOV results are closer to ray tracing. I definitely recommend the NVIDIA SSAO implementation over AOV for a game, however.

Thanks for your comment about "offline rendering". That's exactly what I intended this algorithm for. I think the SSAO approach is great for games, especially on consoles. I wanted to get those beautiful Brazil/MentalRay pictures in modeling programs:



at interactive rates without waiting 10 minutes and having it be noisy. I think AOV is ideal for CAD and modeling packages, although if you run LOD first it is very competitive with SSAO for PC gaming and I could imagine it used there in a few years.

-m

Share this post


Link to post
Share on other sites
Quote:
Crytek has never published their exact algorithm
The guy who wrote it described it in ShaderX6.

Share this post


Link to post
Share on other sites
No... in ShaderX7 :) Thanks for the tip! I just got my copy of the book in last week, so I'll compare my implementation of the Crytek method and update the web page if it differs significantly from what is published.

-m

Share this post


Link to post
Share on other sites
Quote:
Original post by morgan3d
The halos, gray flat surfaces (they aren't occluded! They should be white), and scale-independence are all wrong. The Crytek method is basically a blurred result of edge filtering.


Crytek's implementation doesn't suffer from any of those, and it most definitely is not blurred edge filtering (see here for "AO" that is blurred edge filtering). Not only have I observed this in Crysis but I've implemented my own version according to their description.

That aside, your results look absolutely amazing. To me your results look indistinguishable from ray traced results. The only difference seems to be the darkness, I assume that's adjustable? The ray traced images seem less dark in occluded areas.

Share this post


Link to post
Share on other sites
Quote:
Original post by morgan3d
It runs in realtime for typical game scenes, but is much slower than SSAO.


I'm not following you. It does look good, indeed better than SSAO. But in that pdf, if you compare Crytek's method with AOV New 1/225 * 5x5, the results are pretty consistently faster AND the error lower (except for the trees scene). Where's the catch ?

Y.

Share this post


Link to post
Share on other sites
Quote:
To me your results look indistinguishable from ray traced results. The only difference seems to be the darkness, I assume that's adjustable? The ray traced images seem less dark in occluded areas.


I didn't mention or use it in the report, but I've since added a little 1D texture to remap the AO values, kind of like gamma correction. This fixes the over-darkening for most scenes where lots of tiny triangles line up.

-m

Share this post


Link to post
Share on other sites
Quote:
Original post by Ysaneya
Quote:
Original post by morgan3d
It runs in realtime for typical game scenes, but is much slower than SSAO.


I'm not following you. It does look good, indeed better than SSAO. But in that pdf, if you compare Crytek's method with AOV New 1/225 * 5x5, the results are pretty consistently faster AND the error lower (except for the trees scene). Where's the catch ?

Y.


If your GPU has the fill-rate to handle the algorithm, I don't think there is a catch. AOV's derivation makes the quality pretty close to ray tracing. In fact, it is better than ray tracing in terms of noise. And a GPU like GeForce 280 can handle millions of (tiny) polygons per frame without a problem.

There are drawbacks, however. Console GPUs don't have the fill-rate to push these kind of volumes every frame today, you get the AOV overdarkening, and when running with big (e.g., that 15x15 result) subsampling small-scale AO features will be aliased and blurred away. With proper LOD I think most of those drawbacks go away, but I don't have a sophisticated (well, or any...) LOD in my engine to run this test yet.

-m


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!