Screen space ambient occlusion

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.

Screen space ambient occlusion

Postby Falagard » Fri Sep 14, 2007 1:54 am

I don't think this has been discussed here yet.

Crytek published a course paper about the technologies they used in Crysis. One that came up is Screen Space Ambient Occlusion.
Basically it is calculating ambient occlusion in realtime using the z buffer and some fancy tricks, or rendering the scene to a floating point texture and storing depth. No need to precalculate ambient occlusion maps, and works well for large scenes.

http://delivery.acm.org/10.1145/1290000 ... EN=6184618

There's a thread about it here on GameDev.net and some developers have actually started getting results with it:

http://www.gamedev.net/community/forums ... _id=463075

Screenshot below from one of the Gamedev.net posts:

http://www.rgba.org/iq/trastero/ssao6.jpg

I'm guessing within the next couple months some source code will materialize that we can look at and implement in Ogre.

Clay
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 2191
Kudos: 3
Joined: 26 Feb 2004
Location: Toronto, Canada

Postby Alexander » Fri Sep 14, 2007 7:36 am

This is the first time I've seen the technique. Very interesting.
User avatar
Alexander
Gremlin
 
Posts: 175
Kudos: 0
Joined: 05 Aug 2006

Postby Fiesch » Fri Sep 14, 2007 8:44 am

yup, nifty bit. Thanks for pointing that out
From all the things I've ever lost i miss my mind the most
S.Tyler, Aerosmith
User avatar
Fiesch
Gremlin
 
Posts: 159
Kudos: 0
Joined: 10 Oct 2005
Location: Bavaria, Germany

Postby PolyVox » Fri Sep 14, 2007 9:02 am

Cool! The paper is a bit short on details but the results are nice.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1316
Kudos: 18
Joined: 21 Nov 2006
Location: Groningen, The Netherlands

Postby beaugard » Fri Sep 14, 2007 10:26 am

This is so cool! My heart rate actually sped up when I read this :shock: . One of those ideas that seem so obvious once you hear it - those are always the best ones.

Shouldn't be too hard to implement, no?
beaugard
OGRE Contributor
OGRE Contributor
 
Posts: 265
Kudos: 2
Joined: 25 Mar 2007

Postby jjp » Fri Sep 14, 2007 10:56 am

I just wonder how this looks like when the camera is moving around. Because obviously you only get occlusion from things that are visible on the screen.
Enough is never enough.
jjp
Silver Sponsor
Silver Sponsor
 
Posts: 597
Kudos: 0
Joined: 07 Jan 2007
Location: Cologne, Germany

Postby Falagard » Fri Sep 14, 2007 2:48 pm

jjp wrote:I just wonder how this looks like when the camera is moving around. Because obviously you only get occlusion from things that are visible on the screen.


If Crysis is using it, the results have to be pretty decent.

This is so cool! My heart rate actually sped up when I read this Shocked . One of those ideas that seem so obvious once you hear it - those are always the best ones.

Shouldn't be too hard to implement, no?


Me too. If it works as well as I hope, this is THE solution I've been waiting for for large outdoor games where there is a dynamic moving sun.

It doesn't have anything directly to do with casting shadows from a sun, of course, but my problem is that I've been banging my head on how to implement a combination of ambient occlusion + dynamic shadows on a large scene. For example, if I had to baked ambient occlusion textures for all stuff outside it was going to be a nightmare, but if this is just a post process and it works quickly - wow. It's right up there with the invention of parallax mapping as a cool technology.

That's assuming that someone can get it working, and running fast.

There's another paper out there that implements something similar here:

http://www.cs.utexas.edu/~perumaal/FINAL-paper121.pdf

I saw this one quite a while back but the speed was far too slow for real games (15 to 30 fps on an 8800 GTX). However, the Crysis guys got it working, and that GameDev.net has some other developers playing with the technique and getting between 30 and 150 fps.

How easy will it be to implement? It depends if someone releases some source code :-)
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 2191
Kudos: 3
Joined: 26 Feb 2004
Location: Toronto, Canada

Postby milliams » Fri Sep 14, 2007 3:14 pm

This technique really does look impressive, it would be a killer feature for OGRE to have. Maybe a SoC project for next year?
User avatar
milliams
Gremlin
 
Posts: 172
Kudos: 0
Joined: 16 Feb 2007
Location: Portsmouth, UK

Postby Praetor » Fri Sep 14, 2007 4:00 pm

It looks slightly difficult to do, but not really hard. There seem to be some quality tweaking issues. The results look better than just local lighting which is the point. We don't need full ambient occlusion, just enough to fool our own brains, and this looks like it does that.
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 3335
Kudos: 3
Joined: 21 Jun 2005
Location: Rochester, New York, US

Postby jjp » Fri Sep 14, 2007 4:19 pm

Falagard wrote:If Crysis is using it, the results have to be pretty decent.


That's what I thought. I guess as they are using it only for the ambient component artifacts aren't really noticable. Still... I'd be interested if there are scenarios where this technique would not be usable.
Enough is never enough.
jjp
Silver Sponsor
Silver Sponsor
 
Posts: 597
Kudos: 0
Joined: 07 Jan 2007
Location: Cologne, Germany

Postby Dom » Fri Sep 14, 2007 4:53 pm

It's probably not that easy to get it running without too much artifacts as not all the details are disclosed. A buddy of mine tried it and there's also a discussion running on the gamedev list about it.
Dom
Halfling
 
Posts: 57
Kudos: 0
Joined: 14 Jul 2004
Location: Berlin

Postby Falagard » Fri Sep 14, 2007 4:58 pm

Dom wrote:and there's also a discussion running on the gamedev list about it.


Linked in my original post.
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 2191
Kudos: 3
Joined: 26 Feb 2004
Location: Toronto, Canada

Postby milliams » Fri Sep 14, 2007 11:39 pm

Flavien Brebion (A.K.A. Ysaneya, developer on the Inifinity Engine) managed to get this technique running with framerates at around 150 (http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350). It's not the fastest but it's certainly a good speed tradeoff considering the payback. Given the speed with which people seem to have developed early prototypes, it doesn't seem difficult to get working in a simple fashion.
User avatar
milliams
Gremlin
 
Posts: 172
Kudos: 0
Joined: 16 Feb 2007
Location: Portsmouth, UK

Postby Vectrex » Sat Oct 20, 2007 9:30 am

The guy from the gameDev forums (first post) just released a demo of his own SSAO screenspace ambient occulusion with realtime fractals here in **4**k :D
There's a video of it for lower gfx cards otherwise SM3.0 is needed and it's pretty slow, not for the SSAO but the fractals.
http://rgba.scenesp.org/iq/demoscene/pr ... noiser.zip
from http://rgba.scenesp.org/iq/ demo section

Anyone trying to implement this technique yet?

Image
Last edited by Vectrex on Sat Oct 20, 2007 1:59 pm, edited 2 times in total.
Vectrex
Troll
 
Posts: 1354
Kudos: 1
Joined: 12 Aug 2003
Location: Melbourne, Australia

Postby beaugard » Sat Oct 20, 2007 11:51 am

beautiful!
Impossible to say what the performance hit is, but it can't be too bad since he's rendering fractals at the same time on the gpu...
beaugard
OGRE Contributor
OGRE Contributor
 
Posts: 265
Kudos: 2
Joined: 25 Mar 2007

Postby cybereality » Wed Oct 24, 2007 8:36 pm

Vectrex wrote:Image


Wow! That demo is amazing. It runs like a dog on my machine, I'm barely getting 1 fps, but man does it look good. I'd be very interested in experimenting with this technique at some point.
User avatar
cybereality
Orc
 
Posts: 446
Kudos: 6
Joined: 12 Jul 2006

Postby Falagard » Wed Oct 24, 2007 8:45 pm

Yeah, that demo is great. Runs at a decent clip on my machine, and the dude said that the screen space ambient occlusion is fast but it's the fractal stuff that's slowing things down.

He didn't release any code or shaders so I sneakily tried to use GLIntercept to grab the shaders (out of curiosity only of course) but it wouldn't run - exiting immediately. Darn :-)
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 2191
Kudos: 3
Joined: 26 Feb 2004
Location: Toronto, Canada


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests