Volumetric Ambient Occlusion (VAO) is our Screen Space Ambient Occlusion for Unity 5 (5.6.0 or higher)
You can buy VAO at Unity Asset Store.
Please rate our plugin on Asset Store to support its development.
You can give AO a color tint using Color Tint option.
VAO improves realism and depth perception of the scene by simulating soft ambient light shadows. It accentuates details and produces shadows in the corners, cracks, holes, rough surfaces etc.
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. Volumetric approach calculates volume of occluding geometry around given point, providing more accurate shadows than traditional SSAO technique.
Please rate our plugin on the asset store and contact us with issues or feature suggestions.
VAO occlusion component only. Corridor Scene by Unity Technologies
Our adaptive sampling and downsampled pre-pass optimizations (recently published in our paper) don’t waste processing time on areas with little or no occlusion - using saved processing power to make the effect even more detailed where needed.
We have fine-tuned the algorithm to work equally well for both interior and exterior scenes, so you can enjoy this effect in many types of projects.
You can give occlusion shadows a color tint to match desired atmosphere or make use of color bleeding feature for even more believable result.
VAO provides option to remove occlusion from bright areas using versatile and easily controllable function.
Now also implemented with optimizations for VR devices (including SPSR) - you can take immersion experience of your customers to the new level.
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 and is set in world-space units. Therefore it is highly scene dependent and can vary from very small to large numbers. Higher radius means longer shadows caused by objects further away.
Power variable controls the intensity 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, especially when using tone mapping.
You can also try increasing presence rather than radius to make effect more visible and save performance.
Enhances occlusion on finely detailed features by using more samples for these areas - note that increasing slider above 0.0 costs some performance and increasing above 0.5 costs even more performance. Slider can be set independently for VAO and Raycast algorithm.
You can choose from two algorithms - standard VAO and raycast. We recommend using VAO unless you are not satisfied with the results. Raycast algorithm gives results closer to classic SSAO approach but may be more noisy and blurry.
Thickness of occlusion behind what is seen by camera - controls halo around objects and ‘depth’ of occlusion behind objects (VAO algorithm only).
Bias adjustment for raycast algorithm - use to prevent self occlusion.
Amount of occlusion on screen borders - too much can cause flickering or popping when objects enter the screen.
Number of samples used to calculate VAO. Choose lower settings if you need faster performance.
These settings control how VAO effect looks depending on surface’s distance from the camera.
Limit Max Radius
Enable to limit maximal radius on screen. Use this to avoid performance drops when objects come close to the camera.
Maximal radius given as a percentage of screen area considered for occlusion (e.g. 0.33 means the sampled area will never exceed third of the screen).
This gradually decreases occlusion effect after a certain distance. For example when you don’t want occlusion on your background objects. This can also save performance.
Both approaches have second parameter that controls the speed of the falloff.
Uses information from previous frames to calculate ambient occlusion - greatly improves performance and visual quality.
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 down-sampling the parts without occlusion. Results in performance boost, especially for higher resolutions.
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 down-sampling enabled is not recommended. Alternatively, use this option if you have some sort of super-sampling enabled - as high pixel density would have adverse effect on performance without much visual impact.
Uses lower resolution inputs for areas close to camera to save performance with low to none impact on visual quality. Auto option decides automatically whether this should be turned on based on selected Radius. You can try turning this on/off manually to see if you get better performance for your configuration.
Number of samples used to calculate ‘detailed shadows’ set by ‘Detail’ control.
Insert effect via command buffer - recommended way of using VAO, but you may turn this off for compatibility with other post processing effects.
Normals will be taken either from Unity’s built-in G-Buffer (preferred way) or recalculated from depth buffer. Recalculation can fix incorrect normals but may be less accurate.
Cmd. Buffer Integration Stage
(Applicable only for deferred rendering path and command buffer enabled). Decides where in the rendering pipeline will be VAO calculated. Note that for color bleeding mode only Before Image Effects Opaque event is supported.
(Applicable only for deferred rendering path). Take depth and normals from G-Buffer textures, use this for better precision. This option will be sometimes automatically enabled for compatibility with other settings - especially SPSR VR rendering and some integration stages.
High precision depth buffer
(Applicable only for forward rendering path). Uses higher precision depth buffer texture. This can fix problems with some materials not contributing to AO (see-through grass etc.).
Far Plane Source
Source of Far Clipping Plane values. Some effects (notably Post-processing Stack’s TAA - Temporal Anti-aliasing) alter the _ProjectionParams variable which may cause flickering. If you are planning on using TAA or similar effect enable the Camera option to fix this.
Reduces occlusion on bright surfaces - such as light sources or strongly lit areas. Use this to prevent occlusion on lamps, windows, screens etc. Especially when using non-HDR rendering pipeline.
Color Bleed has its own set of parameters.
Similar to the AO Power setting - controls the intensity of the color bleed part.
Presence makes the color-bleeding more pronounced towards the crease.
Intermediate Texture Format
This lets you specify texture format for mixing VAO command buffer with scene. Auto is recommended (handles switching between HDR by default).
Same Color Hue Attenuation
Provides a set of options to control color contribution based on color of source and target surfaces.
Sets the size of the sample set used for the color bleed (relative to AO samples). Options are ‘Normal’, ‘Half’ and ‘Quarter’.
Limits casting color on itself.
Makes surfaces cast color only in front of them - unlike shadows, that are cast both to the front and to the back.
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.
This has possibly highest performance and is very sharp, but may fail to hide some aliasing on low quality settings.
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.
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