Real-time orthographic SSAO (GLSL)

Hey there,
I recently found this trick (might have been done before?). The other way of faking SSAO in real-time is by adding negative point lamps to objects, I’ve found what I believe to be a much better solution – only works properly for orthographic camera, mind you. It doesn’t require a tremendous amount of lamps – just one Sun lamp parented to the camera.




You can control the SSAO by adjusting the lamp settings:

  • Energy: Changes the intensity of the SSAO
  • Shadow colour: Changes the colour of the SSAO
  • Buffer Type: Use variance. Can use simple and a high size changes the quality of the outline.
  • Size: Inversely proportional to the radius of the SSAO (lower = greater radius).
  • Bias: SSAO is evident in front of the object, or within the object – not just behind it.
  • Clipping and Frustum settings: Use these to your advantage to enhance performance – don’t let it exceed the camera bounds too much.

Enjoy :slight_smile:

Attachments

fakeOrthoSSAO.blend (585 KB)

Hi @MrPutuLips,

thks for this discovery but I can you say that Gooseberry 'Blender (2.73 future here:


) has this kind of 3Dview display option:


Good, no? Thks BlenderFoundation

Does that work with the game engine? :confused:

Ha yes I have seen in Game engine too!

Goooood, not?

Nice, it should also work in perspective view using a spot light instead of a sun, untested.

It does work: Sun lamps are orthographic shadows. Spot lamps are perspective shadows. Also, I tried it before using the sun lamp :slight_smile:
It doesn’t work as well as the sun lamp in orthographic, because toward the edges of the screen it gets a bit faded unless you make a really big spot lamp. But it does work :wink: