SoPostEffectAmbientOcclusion

InventorModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoRenderers
definition SoRenderers.def

Purpose

The SoPostEffectAmbientOcclusion module offers screen space ambient occlusion (SSAO) for the
SoPostEffectRenderer module.

This module only works on opaque geometry, so it should be placed before any transparent geometry rendered by SoPostEffectAdditionalGeometry modules.

It makes use of the depth and normal buffers to calculate the ambient occlusion in screen space.

Details

The algorithm contains various parameters, the best setting for the parameter highly depends on the concrete geometry that is rendered.

Example screenshots:

Normal Rendering:

../../../Modules/Inventor/SoRenderers/mhelp/Images/AmbientOcclusionOff.png

With Screen Space Ambient Occlusion turned on:

../../../Modules/Inventor/SoRenderers/mhelp/Images/AmbientOcclusionOn.png

Only the ambient occlusion term:

../../../Modules/Inventor/SoRenderers/mhelp/Images/AmbientOcclusionOnly.png

Parameter Fields

Field Index

Angle Bias: Float Mode (mode): Enum Show Ambient Only: Bool
Attenuation: Float Mode (blurMode): Enum  
Contrast: Float Num. Directions: Integer  
debugTextures: Bool Num. Steps: Integer  
Enable: Bool Radius: Float  
Enabled: Bool Sample Radius: Float  
Half resolution ambient occlusion: Bool Scale: Float  
Intensity: Float Sharpness: Float  

Visible Fields

Enabled

name: enabled, type: Bool, default: TRUE

Enables/disables the effect.

Angle Bias

name: ambientAngleBias, type: Float, default: 30, minimum: 0, maximum: 60

All angles below this threshold (in degrees) will be discarded when calculating ambient occlusion. Thus, the higher this value, the lesser self-occlusion will happen. The best value for this parameter depends on the coarseness of the triangle mesh, the coarser the mesh, the bigger the bias should be.

Sample Radius

name: ambientSampleRadius, type: Float, default: 30

Defines the radius of the SSAO sampling.

Intensity

name: ambientIntensity, type: Float, default: 8, minimum: 0.1, maximum: 16

Scales the intensity of the AO.

Scale

name: ambientScale, type: Float, default: 0.1, minimum: 0.0001, maximum: 1

Scales the distance term of the algorithm, lower values generate more occlusion.

Num. Directions

name: ambientNumDirs, type: Integer, default: 16, minimum: 1, maximum: 25

(High Quality only) Defines how many occlusion directions are considered for each screen pixel.

Num. Steps

name: ambientNumSteps, type: Integer, default: 8, minimum: 1, maximum: 32

(High Quality only) Defines how many steps are sampled on each direction.

Attenuation

name: ambientAttenuation, type: Float, default: 1, minimum: 0, maximum: 1

(High Quality only) Defines the attenuation of the ambient occlusion term.

Contrast

name: ambientContrast, type: Float, default: 1.25, minimum: 0, maximum: 3

(High Quality only) Defines the contrast of the ambient occlusion term.

Enable

name: blurPass, type: Bool, default: TRUE

Enables an additional blur pass.

Half resolution ambient occlusion

name: useLowResAO, type: Bool, default: FALSE

Switches the SSAO calculation and blur pass to a half-resolution buffer.

Show Ambient Only

name: showAmbientOnly, type: Bool, default: FALSE

Renders the SSAO term if enabled.

Mode (mode)

name: mode, type: Enum, default: SSAO_HIGH_QUALITY

Allows to switch between high quality and low quality algorithms. High quality is recommended, but is substantially slower.

Values:

Title Name Description
Low Quality SSAO_LOW_QUALITY Implements a simplified version of the original NVidia algorithm, which is much faster but less precise/correct.
High Quality SSAO_HIGH_QUALITY

Implements “Horizon Based Ambient Occlusion” as given by http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/ScreenSpaceAO/doc/ScreenSpaceAO.pdf

For more details, see the paper at http://rdimitrov.info/HBAO_SIGGRAPH08.pdf

This software contains source code provided by NVIDIA Corporation.

Mode (blurMode)

name: blurMode, type: Enum, default: BILATERAL_BLUR

Selects the blur mode.

Values:

Title Name Description
Bilateral Blur BILATERAL_BLUR Uses a bilateral blur filter which is edge preserving. See http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/ScreenSpaceAO/doc/ScreenSpaceAO.pdf for details.
Gaussian 9x9 GAUSSIAN_9x9 Uses a simple 9x9 Gauss filter to blur the ambient occlusion term.

Radius

name: blurRadius, type: Float, default: 9, minimum: 2, maximum: 16

Defines the radius of the blur filter.

Sharpness

name: blurSharpness, type: Float, default: 1, minimum: 0.1, maximum: 2

Selects the sharpness of the filter, trying not to blur edges with a large depth difference.

Hidden Fields

debugTextures

name: debugTextures, type: Bool, default: FALSE