Anyone implemented this SSAO technique?

Started by
6 comments, last by Ashaman73 13 years, 6 months ago
I just stumbled across this 2006 Paper:

Image Enhancement by Unsharp Masking the Depth Buffer (PDF)

Has anyone of you implemented this? It seems very simple with good looking results. Especially the tree and Skeleton rendering at the bottom of the document.

cheers
Advertisement
I implemented it, and if you tweak it for static scenes you can get some decent looking pictures. But you have to be aware that it is not really an AO technique. All it does is rendering a sort of 'drop shadow' around foreground objects. And from my experience it can look pretty bad if not properly adapted to the scene at hand. Maybe if you're aiming for stylized rendering it is not so bad (maybe even what you want), but I ended up with a 'real' SSAO post processor.

That said, I have not tried it for trees and similar 'semi-volumetric' objects. Maybe there it is a valuable addition to a classical AO technique.

But that's just my cents, considering the simplicity of the method I'm sure integrating it into an existing renderer is a matter of hours at most. So you can easily try it for yourself.

EDIT: An attempt to describe it in detail: You get a darkened halo around objects in the foreground. In still images this can aid depth perception and emphasize objects and really look good if tweaked to the point. The problem is that if you have an interactive scene with lots of moving objects all will have this strange screen-space halo around them and this really feels wrong (at least it did for me). Hence my conclusion: It can make sense in some cases but it is not a substitution for a physical plausible AO technique. (Like the authors say.)


[Edited by - macnihilist on October 24, 2010 11:51:46 AM]
Okay cool, I see.

I'm pretty enthusiastic trying out this technique :D
Have you compared it with your SSAO implementation performance-wise?
Quote:
Have you compared it with your SSAO implementation performance-wise?

I don't have any numbers left, but I believe it was significantly faster. But then again my SSAO is probably the slowest in the industry. ;)

(In case you haven't noticed: I have edited the post above and added some details.)
Quote:Original post by macnihilist
It can make sense in some cases but it is not a substitution for a physical plausible AO technique. (Like the authors say.)


Heh, must have missed that in the paper. =)

I think the interesting part is that they simply employ a blurred version of the z-buffer instead of randomly sampling it to achieve a similar effect to ssao. Maybe with a little tweaking and altering this could work out...

However, thanks for your insights...
I will do my own tests and post theme here.

cheers
Hi,

I implemented it, but found it only really practical for either highly dynamic scenes (poor quality not so noticeable) or for really small scenes (fill-rate not so much an issue).

Essentially, you'll need to convolve against the screen, which for large-ish framebuffers and modest kernel sizes is non-trivial.

An advantage of the technique is that it is comparatively simple to implement, and doesn't mess with your rendering pipeline so much. Plus, it works for dynamic scenes (like all the other SSAO techniques I can think of). Disadavantage: fairly slow. And not much room for improvement there.

-G

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

Ok, after reading Geometrian's comment on convolution speed I just skimmed through the paper and my code again. I wanted to add that I only implemented the 'depth darkening' variant; and to cope with the filter size I used a simple 4->1 downsampling + 2x gauss-blur of a linear depth buffer. This was comparatively fast, but probably not the best low-pass filter for the technique as far as quality is concerned.
Quote:Original post by macnihilist
Ok, after reading Geometrian's comment on convolution speed I just skimmed through the paper and my code again. I wanted to add that I only implemented the 'depth darkening' variant; and to cope with the filter size I used a simple 4->1 downsampling + 2x gauss-blur of a linear depth buffer. This was comparatively fast, but probably not the best low-pass filter for the technique as far as quality is concerned.

I used this approach in my engine, but it get really ugly when you have an object near the camera and the background is farther away, the resulting black halo effect is really annoying. If you tone down the darkening effect you also get rid of the AO effects.
Finally I switched to a more or less standard SSAO implementation in combination with a biliteral filter which improves the quality notable.
Thought you can use this paper to enchance the local contrast (done by l4d ?) of your rendered image, but you should consider using some other technique for SSAO.

Some papers:
SSAO in TwoWorld (good article !)
local contrast in L4D
google: SSAO in starcraft II (pdf)

This topic is closed to new replies.

Advertisement