Sirius_H

How to achieve a better SSAO effect?

Recommended Posts

Hi,

i have tried SSAO but found it really hard adjusting parameters...the shadow part is either too noisy or too unapparent, and anti-alias is gone when SSAO is enabled. So is there a perfect parameter setting or something? And is it possible to have both SSAO and anti-alias at the same time?
by the way, is the parameter ssaoRatio related to performance? it seems that bigger ssaoRatio leads to lower performance.

var ssao = new BABYLON.SSAORenderingPipeline('ssaopipeline', scene, { ssaoRatio: 0.5, combineRatio: 1.0 }, [camera]);
 
here is my code below:
 
Thanks!

Share this post


Link to post
Share on other sites

With SSAO 2 and defaultpipeline 's fxaa antialiasing it looks slightly better:
https://playground.babylonjs.com/#FUMYH5#3


But, SSAO is one of the effects (like chromatic aberration or Depth of field) in my opinion, that you just can't 'enable' and you are OK, it has to have an artistic value, or a good setting that means something in that scene, like with a low poly setting it emulates a bit of global illumination (darker in cavities) or enhances cavity or details of vegetation.
Most of the time it just makes things worse than before. (For me :) )

ssaoRatio is the size of the effect, so 0.5 means half resolution.

Share this post


Link to post
Share on other sites

But I think SSAO2 is much more time-consuming than the SSAO right? I used to have scene which ran 60 fps with SSAO but only with 48 fps with SSAO2. BTW, do we have plan to implement SAO (scalable ambient obscurance)? I think THREE.js has it.

Share this post


Link to post
Share on other sites

I suggest turn SSAO off.

Bake SSAO and apply it.
The improvement will be HUGE, and the performance will be faster.

P.S: On the other hand, SAO would be really nice. I second that for scenes with moving objects. 

Share this post


Link to post
Share on other sites
On 2018/3/26 at 9:30 PM, BitOfGold said:

With SSAO 2 and defaultpipeline 's fxaa antialiasing it looks slightly better:
https://playground.babylonjs.com/#FUMYH5#3


But, SSAO is one of the effects (like chromatic aberration or Depth of field) in my opinion, that you just can't 'enable' and you are OK, it has to have an artistic value, or a good setting that means something in that scene, like with a low poly setting it emulates a bit of global illumination (darker in cavities) or enhances cavity or details of vegetation.
Most of the time it just makes things worse than before. (For me :) )

ssaoRatio is the size of the effect, so 0.5 means half resolution.

Thanks a lot for your SSAO 2 demo! I like that scene :D Of course this scene is not really what I'm working with, but the parameters do help a lot.

Share this post


Link to post
Share on other sites

@BitOfGold is there any other way of tweaking the performance of SSAO2? I've tried adjusting the params, but it doesn't really seem to affect performance much, while still giving me a considerably worse SSAO effect. Also does SSAO2 require Webgl2? At least my iPhone throws and refuses to run. I have a pretty low poly scene, and love the depth fake GI gives, even better than what actually shadows can do.

I also tried SSAO(1), which does seem to perform well, but in now way gives a good enough effect (lots of artifacts, and either too strong an effect or not visible at all). 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.