Volumetric Ambient Occlusion (VAO) is our Screen Space Ambient Occlusion for Unity 5 (5.3.0 or higher)
Please rate our plugin on Asset Store to support its development.
VAO provides additional level of visual quality by simulating soft ambient light shadows. It accentuates local geometric detail and produces shadows by nearby occluding surfaces (in the corners, cracks, holes, rough surfaces etc.). Resulting scenes have more depth and appear more realistic.
Combining classic screen-space ambient occlusion (SSAO) algorithm with a more physically based approach lets us achieve better visual quality and performance compared to classic SSAO.
Effect is compatible with normal&bump mapping, so there is no need for complex 3D geometry to create shadows.
VAO is implemented as an image effect that gets attached to the camera. It features only a couple of user controlled variables, which makes it easy to control to produce the desired visual appearance - no magic variables (such as Bias).
Plugin is compatible with all Unity rendering paths (Forward, Deferred and Legacy) and anti-aliasing.
VAO effect behaviour is controlled by a couple of easy to use parameters.
Radius sets the distance of how far the algorithm reaches to calculate occlusion. Higher radius means longer shadows caused by objects further away.
Power variable controls the hardness of the shadow, lower value causes softer shadows.
Presence makes the effect more pronounced towards the crease.
Presence turned off is closer to “physically-based” solution, however, adjust this to suit your scene and desired appearance.
You can also try increasing presence rather than radius to make effect more visible and save performance.
Number of samples used to calculate VAO. Choose lower settings if you need faster performance.
Adaptive sampling means lower number of samples is used on more distant areas of the image. Ideally causes no loss of detail.
Speeds up the calculation by downsampling the parts without occlusion. Results in performance boost, especially for higher resolutions.
Insert effect via command buffer (BeforeImageEffectsOpaque event)
Take depth&normals from GBuffer of deferred rendering path, use this for better precision. Note that this feature will cause some performance drop.
Reduces resolution of output, use this to gain performance at the cost of quality. Try lowering quality parameter first as this reduces quality dramatically. Having high quality setting with downsampling enabled serves no purpose. Alternatively, use this option if you have some sort of supersampling enabled - as high pixel density would have adverse effect on performance without much visual impact.
Reduces occlusion on bright surfaces - either light sources or strongly lit areas. We recommend enabling this in combination with downsampling to reduce the most visible artifact caused by reducing of the occlusion texture. Also use this to prevent occlusion on lamps, windows, screens etc.
Color Bleed has its own set of parameters.
In case you are applying your own blur after VAO effect, you can try turning this off to save performance. Blur implementations included in VAO are fast and a part of its visual appearance, so you might consider keeping it on all the time.
Simple uniform 3x3 blur
If you need extra control over how is the occlusion blurred - with controls size and sharpness. Sizes of 3 or 5 can be faster than basic blur, but higher values will be slower. Sharpness does not affect performance.
Output AO only
Use for development to display only ambient occlusion component.
|low radius||high radius|
Unwanted interaction with other camera effects
You should place VAO Effect before any effects that change colors of the image such as tone mapping, vignetting, blur, chromatic aberration etc. As a rule of thumb, place VAO so that it is applied as soon as possible.
Disabling Ambient Occlusion for specific objects
If you don’t want some object to cast or receive occlusion - set Rendering Mode of its material to Fade or Transparent. Or use plugin’s Luminance Sensitivity option where possible.
When near and far clipping planes of the camera are too far apart, banding artifacts as seen on the picture occur. Should this happen, set the clipping planes to tightly envelop the visible scene - i.e. bring far plane as close as possible.
Note that range of possible settings is determined by precision of depth buffer.
When VAO effect is attached to the camera, its corresponding
VAOShader.shader file is automatically located and bound to VAOShader property. If this does not happen, make sure that
VAOShader.shader file can be found in the Project window under Assets/Shaders folder. Then bind this shader manually by drag&dropping it to VAOShader property in Inspector window.
Because VAO is screen-space based effect, there is a limited range of values that work correctly for radius setting. If radius is set too low, artifacts as seen on the picture will occur due to self-intersections. Thanks to its design this algorithm is not very susceptible to self-intersection problems, however when radius gets extremely low, no reasonable occlusions can be found.
To solve the issue, increase radius slowly until dark banded areas disappear and only correct occlusions are visible.
Because VAO is screen-space based effect, there is a limited range of values that work correctly for radius setting. When radius is too large, large dark areas will appear with no reasonable occlusions visible.
To solve the issue, lower radius setting until correct occlusions appear in the corners, cracks etc.
In case of questions or further issues, please contact us at firstname.lastname@example.org