• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
morgan3d

Ambient Occlusion Volumes

13 posts in this topic

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]
0

Share this post


Link to post
Share on other sites
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.
0

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
0

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

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
0

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

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

Share this post


Link to post
Share on other sites
Quote:
[i] 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

0

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


0

Share this post


Link to post
Share on other sites
Quote:
Original post by nullsquared
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.



I think it's quite obvious that Cryteks SSAO-implementation does indeed suffer from halos, self-occlusion and "non-scale-independence". Just look at the picture posted above that is from the original presentation by Mittring.

Self-occlusion occurs on basically every surface, their isn't a pixel in that image that is white! There are of course methods(using information about the normal(s) ) to remove self-occlusion, but Cryteks version did not use any of those.

Halos are also easy to spot around some the objects especially around the man in the foreground. The only way I know of to resolve this problem is to use more layers, i.e depth peeling.

Non-scale-independence mainly comes from the fact that they use the same sampling range regardless of the distance from the camera to the pixel. Sampling distance is in screen space and not world or camera space. It can be argued that this has some artistic value. For example, the mountains in the distance gets nicely shaded.

Im not saying that SSAO is without merits, on the contrary I think that when properly used it can improve some types of scenes greatly.

Ps.
And yes, Morgan3D is quite obviously already familiar with Luft et al.’s paper since he mention it in his paper as the paper that introduced SSAO.
Ds.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by morgan3d
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


I've had only time to skim through the paper but it really seems interesting and I'm gonna try and take a closer look this weekend.


A
0

Share this post


Link to post
Share on other sites
Looks really awesome, hope to use it in a game someday. The numbers are looking rough for real-time implementation, but as you said that's not even your target ATM. Maybe I will give this algorithm a hard look when I start coding a DX11 based rendering engine.

Also I believe the above Crytek SSAO image [ oddly enough, hosted on my webspace ] is from their "Reference" implementation of SSAO, which would have used a lot more samples, etc than the production version of the effect used in the final release of Crysis...maybe something to factor into these quality/speed comparisons? I've played enough multiplayer Crysis on modded day-night servers to see their SSAO reaaally falls apart in some situations with painfully obvious halo artifacts around sunset lighting conditions, etc. Much worse than the above image. Maybe that's why they disabled day-night cycle in multiplayer by default? So they could run a lighter weight SSAO/shaders?

Anyways, keep up the good work on this algorithm!
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0