Jump to content

  • Log In with Google      Sign In   
  • Create Account


Screen Space Ambient Occlusion?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 dvds414   Members   -  Reputation: 124

Like
1Likes
Like

Posted 13 June 2013 - 10:08 PM

So I have been reading up up SSAO and have been learning how to do it from a depth texture and so far I am stuck. I rendered a depth texture. DepthMap and it is rendered from the camera point of view. Should it be rendered from the camera point of view, or should I put a light source in the sky? Can someone please point me in the right direction here on where to go from making this depth texture. Thanks.



Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 12232

Like
2Likes
Like

Posted 13 June 2013 - 11:03 PM

It is from the camera’s point of view and goes well with early-Z.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 Ashaman73   Crossbones+   -  Reputation: 6691

Like
1Likes
Like

Posted 13 June 2013 - 11:04 PM


Should it be rendered from the camera point of view, or should I put a light source in the sky?

SSAO  is a light independent effect, therefor you don't need to setup any light sources.


Edited by Ashaman73, 13 June 2013 - 11:05 PM.


#4 dvds414   Members   -  Reputation: 124

Like
1Likes
Like

Posted 13 June 2013 - 11:19 PM

 


Should it be rendered from the camera point of view, or should I put a light source in the sky?

SSAO  is a light independent effect, therefor you don't need to setup any light sources.

 

So the depth map is just rendered from the camera point of view? Then what after that?



#5 Hodgman   Moderators   -  Reputation: 27643

Like
4Likes
Like

Posted 13 June 2013 - 11:25 PM

You draw a full-screen quad, rendering to a colour buffer, using the depth-map as input, and using a shader that computes SSAO...

This shader takes a bunch of depth samples for each pixel, and uses them to calculate occlusion.

 

Is there any particular SSAO tutorial or article that you're using?



#6 dvds414   Members   -  Reputation: 124

Like
0Likes
Like

Posted 14 June 2013 - 04:53 PM


Is there any particular SSAO tutorial or article that you're using?

 

No I don't really have a tutorial to use. I have taught myself all the graphics knowledge I know to here, I have never accomplished something like this though. Is there a really good tutorial anywhere?



#7 cowsarenotevil   Crossbones+   -  Reputation: 1943

Like
0Likes
Like

Posted 15 June 2013 - 03:25 AM

 


Is there any particular SSAO tutorial or article that you're using?

 

No I don't really have a tutorial to use. I have taught myself all the graphics knowledge I know to here, I have never accomplished something like this though. Is there a really good tutorial anywhere?

 

 

Yes. Keep in mind that that particular implementation uses both a normal buffer and a depth buffer. It's also possible (and fairly common) to achieve an ambient occlusion-like effect using only a depth buffer, but I think the results are generally unsatisfactory; it highlights sharp changes in depth, but it doesn't necessarily "feel" like real shading, at least to me.

To be honest, I think that SSAO in general is an effect that should be used quite sparingly; in real life, sharp corners only show localized dark areas when they receive only a small amount of light from random directions (which is what ambient light is supposed to be, really). This can be mitigated/improved to some degree by making each "occluder" also act as a light, but this requires another buffer with only direct light, from which the color/brightness of the occluder/light is read, making the effect slower still.

 

In most cases, I think SSAO looks like SSAO, and not really much else.


-~-The Cow of Darkness-~-

#8 kalle_h   Members   -  Reputation: 1276

Like
0Likes
Like

Posted 15 June 2013 - 06:44 AM

SSAO is only one part in to faking ambient occlusion. Lower frequency big scale ambient occlusion is lot more important but also lot harder and expensive to generate. Voxel engines usually excel at that part.

 

There is nice article how to combine nice ambient occlusion look using three different scales and different method for each. http://www.iquilezles.org/www/articles/multiresaocc/multiresaocc.htm



#9 MJP   Moderators   -  Reputation: 10231

Like
0Likes
Like

Posted 15 June 2013 - 05:28 PM


In most cases, I think SSAO looks like SSAO, and not really much else.

 

Amen to that!



#10 Styves   Members   -  Reputation: 944

Like
0Likes
Like

Posted 16 June 2013 - 01:55 PM

True true, but if you follow a proper, more physically based approach you can get very accurate results. It's all about the implementation. ;)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS