Horde3D

Next-Generation Graphics Engine
It is currently 28.03.2024, 09:47

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Faking SSAO
PostPosted: 16.01.2008, 14:32 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
So I am having some fun trying to fake some SSAO using only the depth buffer (as described in the Journal of Ysaneya). As is to be expected, my results so far are somewhat less than I would have desired :?

Here is a (very preliminary) screenshot of just the AO term that is to be multiplied with the scene - At the moment it looks more like an edge-blur than an AO term, but with time:
larger image
Image

Currently I take the depth buffer, take the absolute difference of a pixel's depth and its neighbours, and use that factor to set the radius of 12-sample Poisson disk blur, multiplying the sample distance by the radius, and running 2 passes. This is giving fairly decent results, with out a huge performance hit, but I think a better blur might be possible, so if anyone has suggestions on that, they would be most welcome...

Also, I really need a more complex scene to test with this - but I am no artist :)
If anyone has an indoor scene I could borrow for these tests, I would be overjoyed!


Last edited by swiftcoder on 16.01.2008, 15:03, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 16.01.2008, 14:58 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Nice to see that you are working on that!
In fact the results resemble an edge detection filter at the moment but this doesn't necessarily have to be wrong since the model is relatively convex and so you wouldn't have much ambient occlusion.

For my quick SSAO test I have created a simple but useful test scene with several boxes lying on a heap. If you want I can send you the scene and also my SSAO shader version.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 16.01.2008, 18:59 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
marciano wrote:
For my quick SSAO test I have created a simple but useful test scene with several boxes lying on a heap. If you want I can send you the scene and also my SSAO shader version.

The scene would be very handy — I haven't quite got the kinks out of my Blender -> Collada -> Horde workflow yet :) — and it wouldn't hurt to compare shader approaches, especially since I am fairly new to all this.

Do you want to email it to me? swiftcoder@gmail.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 22.08.2008, 05:28 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Ive been working on a SSAO with horde3D!

Its a "work in progress" and I'm currently trying different idea about how to realise it:


Some images rendered with the Deferred lighting:
1) With SSAO
2) Without SSAO
3) Occlusion
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 22.08.2008, 06:52 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Impressive!


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 26.08.2008, 20:15 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Great! Personally I love ssao for its simple idea, although it is still very tough to make it look really good.

From time to time I'm also experimenting a bit with my implementation. I really hope that we will get a nice reference implementation for Horde through a joint community effort.


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 27.08.2008, 02:19 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
The Advances in Real-Time Rendering in 3D Graphics and Games paper has some good SSAO tips from blizzard in it - might be worth a look over ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 27.08.2008, 02:57 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
The article about SSAO in SC 2 is really good since Ive already used a lot of their tips in my work about SSAO. Since the picture in my previous post, Ive been working a lot and Ive got a better result now. Ive been able to deal with self-occlusion, but Ive got an another problem at this time. I'm working on it, and I expect to get something really great one day! :p

A screenshot from my early SSAO ( with some self-occlusion issues ):

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 04.07.2009, 18:18 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
Have a look for a slight improvement on SSAO, called screen space directional occlusion. Its a really neat little idea and builds on SSAO code pretty simply. Plus its not a whole lot more work (perhaps 3% time, without the additional light bounce). It adds directionality to the occlusion so you get a bit more "shadow" in your occlusion shadows. Plus it can produce light bleed where one object bounces coloured light to another object.


Top
 Profile  
Reply with quote  
 Post subject: Re: Faking SSAO
PostPosted: 26.09.2009, 23:59 
Offline

Joined: 09.09.2009, 18:58
Posts: 107
Incredible work, although I can see in a game situation the performance hit would be game breaking... if Crys's implimentation is any indication. :lol:


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group