SSAOP

Renders ambient occlusion based on world position and normal passes. (And camera, optionally)

Updated: 30 June 2014

Author: sh4dow

Compatible Nuke versions: 6.3 or later

Compatibility: Windows 64, Source

Generates an ambient occlusion pass based on an screen space ambient occlusion algorithm (the name of the plugin is merely a play on a short form of my own name - SSAO + AOP = SSAOP).

You should always save before using this plugin, as adjusting parameters or zooming into the viewport can sometimes cause Nuke to crash or freeze. But most of the time, it is very usable and fast. And the crashes don't matter that much once you got it set up and prerender the SSAO pass anyway. Which is why I decided to release it regardless.

If somebody with experience in plugin development knows why, I would appreciate any piece of advice, as this is the first plugin I have ever written.
(How funny that the SSAO plugin by Sebastian Elsner was also his first one and was what prompted me to program this one. I REALLY could have used this during a project but unfortunately only had the time to create it in the vacation afterwards...)

 


 

Usage:

If you want to use the 2D algorithm of the plugin, you need to input world position and normal passes.
For 3D, the camera with which the world position and normal passes were rendered is required as well.
 
This plugin doesn't do any anti-aliasing, so if you want to have an anti-aliased result, I recommend rendering the world position and normal passes at twice their resolution and then scale down the SSAO render. Maybe throw in an AA matrix before scaling down for good measure.

You can see the difference between 2D and 3D below. 3D seems to provide better 'occlusion consistency' between objects regardless of their distance to the camera. It is also easier to get the occlusion to spread out nicely. However, if the 2D look works in your scene and you don't need a high spread, 2D sampling will provide a noise-free result at lower sample rates and thus render time.

 

Algorithm 3D, rendered in 1280x960, AA matrix applied before scaling down to 640x480, 256 samples:

SSAOP MQ

 

Algorithm 3D, rendered in 1280x960, AA matrix applied before scaling down to 640x480, 2048 samples:

SSAOP HQ

 

Algorithm 2D, rendered in 1280x960, AA matrix applied before scaling down to 640x480, 2048 samples:

SSAOP 2D

 

The 2048 samples result using algorithm 3D in motion, with Vector Blur applied:

http://www.variations-of-shadow.com/nukepedia/SSAOP_HQ_MB.mov

Sign in or register to download or rate.