Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

ssao_crytek

4: Adsense

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
5 replies to this topic

#1 aashish24   Members   

100
Like
0Likes
Like

Posted 18 May 2011 - 07:31 PM

Folks,

I have been trying to implement various ssao and now I am trying to implement crytek ssao and applying some form of bilateral blur. The images looks convincing but I see lot of bands and some halos (though I think thats expected with crytek ssao)..

Attached are some screenshots any comment or help is appreciated.

Thanks

Attached Thumbnails

  • sponza1.png
  • sponza2.png


#2 Ashaman73   Members   

13714
Like
0Likes
Like

Posted 18 May 2011 - 11:53 PM

The effect looks too dark, even large,plane surfaces have a high occlusion value. This could also explain the banding effect because you seem to use mostly a small portion of the available value range.

Ashaman

 

Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log


#3 aashish24   Members   

100
Like
0Likes
Like

Posted 19 May 2011 - 08:02 AM

The effect looks too dark, even large,plane surfaces have a high occlusion value. This could also explain the banding effect because you seem to use mostly a small portion of the available value range.


Well yes, according to the shader in ShaderX7 I was doing this..

calculateSSAO(...)
{
...
..
ao = (ao / actualNumberOfSamples);// ao = (ao * ao + ao); --> Saturation.. ao = clamp(ao, 0.0, 1.0);return ao;}
If I don't do that that.. I still bet banding but now not noticeable as much.. (attached is updated screenshost)

Attached Thumbnails

  • sponza3_noamp.png


#4 Yours3!f   Members   

1532
Like
-2Likes
Like

Posted 19 May 2011 - 09:31 AM

I dont know if you remember, but when this year Crysis 2 was about to hit the shelves, someone (probably a Russian) stole an early build of the game. Now what's interesting is that it contained the shader source codes.
I haven't seen the source code, but it might be interesting and might help you with what you're missing. Note that it will probably be written in DX HLSL language.

#5 Ashaman73   Members   

13714
Like
0Likes
Like

Posted 20 May 2011 - 01:20 AM

The effect looks too dark, even large,plane surfaces have a high occlusion value. This could also explain the banding effect because you seem to use mostly a small portion of the available value range.


Well yes, according to the shader in ShaderX7 I was doing this..

calculateSSAO(...)
{
...
..
ao = (ao / actualNumberOfSamples);// ao = (ao * ao + ao); --> Saturation.. ao = clamp(ao, 0.0, 1.0);return ao;}
If I don't do that that.. I still bet banding but now not noticeable as much.. (attached is updated screenshost)

I think you still got lot of self-occlussion (i.e. a plane surface like the floor is shaded by itself). But this seems to be a problem of the initial crytek SSAO shader. To get rid of it you need to restrict the test rays only to the hemisphere which is pointing away from the surface. This could be done by using the surface normal and mirror all rays which are pointing "inside" the surface.

Gamedev.net has a good article about SSAO over here.

Ashaman

 

Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log


#6 aashish24   Members   

100
Like
0Likes
Like

Posted 20 May 2011 - 08:42 PM

The effect looks too dark, even large,plane surfaces have a high occlusion value. This could also explain the banding effect because you seem to use mostly a small portion of the available value range.


Well yes, according to the shader in ShaderX7 I was doing this..

calculateSSAO(...)
{
...
..
ao = (ao / actualNumberOfSamples);// ao = (ao * ao + ao); --> Saturation.. ao = clamp(ao, 0.0, 1.0);return ao;}
If I don't do that that.. I still bet banding but now not noticeable as much.. (attached is updated screenshost)

I think you still got lot of self-occlussion (i.e. a plane surface like the floor is shaded by itself). But this seems to be a problem of the initial crytek SSAO shader. To get rid of it you need to restrict the test rays only to the hemisphere which is pointing away from the surface. This could be done by using the surface normal and mirror all rays which are pointing "inside" the surface.



Yes like I said crytek implementation has that issue. I am not trying to make any improvements (other than clamping texture fetch). I just wanted to make sure that I can implement the algorithm using my framework and in OpenGL..

Gamedev.net has a good article about SSAO over here.

Yes, I have implemented this algorithm too. Actually I had to tweak 1-2 things to get it to work on OpenGL. Thanks for your feedback..











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.