Jump to content
  • Advertisement
Sign in to follow this  
rouncED

please explain ssao for me

This topic is 3071 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I looked around the net but only could find a little information how to implement ssao.

I know it involves a view space position render and a normal render - but what do you do with these two things to get ssao?

Share this post


Link to post
Share on other sites
Advertisement
Ok, I looked a little further and I even read you can do it WITHOUT a normal render! How useful is that! say to view a heightmap, I dont even need to compute the normals anymore! Does anyone know anymore about this version of the algorythm?

Share this post


Link to post
Share on other sites
Id rather implement it without the normal calculation, cause I have reasons...

So, can I ask if this would work?

Take point P(x,y) on the depth render of the scene.

I then sample around this point in a circle like selection of samples, and I measure the depth difference, if its in front of P, then I record the distance, the further away it is in front in distance the more black it adds to the pixel.
I then average every single sample (if it was behind it just adds white, 0), and this will be the blackness of P, which I then write to the AO buffer.

Is that right?

Share this post


Link to post
Share on other sites
Since any real-time AO approach will make some assumptions about the spatial layout or local geometry of the scene it will *not* be physically correct. But - depending on the actual look that you want to achieve - could fit your needs. Why don't you just try it out in a couple of minutes using ShaderDesigner or something similar?

Cheers,
Guenther

Share this post


Link to post
Share on other sites
The problem is with columns for example. Columns shouldn't have the dark hallow (hollow?) around them, because there isn't a real corner there. How is this usually handled?
I can imagine that the front faces and the back faces are rendered to two different buffers, and somehow it does some additional comparisons using the front- and back-face depth.
Maybe it's stupid, I never did anything with SSAO, haven't looked into it.

Share this post


Link to post
Share on other sites
Cheers boys!

I guess ive got the basic idea, its time for a bit of experimentation on my behalf I guess, Ill test all sorts of sampling conditioning schemes.

I guess the main thing is to darken the corners of a dungeon box, if it does that, thats a start, the idea is relatively simple, ill test something out and come back with a screenshot or two when ive actually got something together.

Share this post


Link to post
Share on other sites
I didn't have much luck implementing SSAO without normals. Perhaps I missed something obvious, but in the end I found using normals to be an essential ingredient. If Crytek's SSAO doesn't use normals at all, color me impressed.

Share this post


Link to post
Share on other sites
The first one - that was shipped in Crysis didn't use normals, only depth. Now they use normals for ssao in Crysis 2. You can do ssao without normals, obviously you get self occlusion with it, but it can actually give you a better filling of depth if it properly used.

Share this post


Link to post
Share on other sites
The problem I see is that without normals, you have to use tricks to increase brighness in self occlusion areas (in Crysis they use accesibility * accesibility + accesibility). Also, you will get highlights in the edges of the geometry. The net result is that the shading will change a lot, which may or may not be a good thing (not to say the inefficiency of taking samples that are inside of the geometry).

[Edited by - IrYoKu1 on July 14, 2010 6:47:47 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!