SoScreenSpaceAmbientOcclusion

InventorModule
genre Visualization
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoRenderers
definition SoRenderers.def
keywords framebuffer, fbo, render, shadow

Purpose

This module is deprecated. Please consider using SoPostEffectAmbientOcclusion instead, since this allows combination with other screen space effects.

This module implements “Screen Space Ambient Occlusion” (SSAO). Being a screen space algorithm, it renders the scene to several offscreen buffers (a so called G-Buffer) and applies a SSAO detection filter and an optional blur pass. The final ambient occlusion term is then applied to the rendered scene.

The SoScreenSpaceAmbientOcclusion module can be used together with the SoShaderPipeline, it will add a custom fragment write that stores color, normals and depth in a GBuffer.

Usage

Place the whole opaque Inventor scene below this module. If you want to render transparent geometry, you need to render it after this module.

NOTE: Please place things like SoBackground, SoAnnotation, SoText2 etc. in front or behind this module, NOT below this module, since they will cause wrong depth values to be written and would create strange occlusion effects.

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

Input Fields

child

name: child, type: SoNode

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

Angle Bias: Float Intensity: Float renderCaching: Enum
Attenuation: Float Is supported: Bool renderCulling: Enum
boundingBoxCaching: Enum Mode (mode): Enum Sample Radius: Float
Contrast: Float Mode (blurMode): Enum Scale: Float
Debug Textures: Bool Num. Directions: Integer Sharpness: Float
Enable: Bool Num. Steps: Integer Show Ambient Only: Bool
Enabled: Bool pickCulling: Enum Use Linear Depth: Bool
Half resolution ambient occlusion: Bool Radius: Float  

Visible Fields

Enabled

name: enabled, type: Bool, default: TRUE

Enable the SSAO rendering. If disabled, the scene is rendered normally.

Is supported

name: supported, type: Bool, persistent: no

Shows if the module is operational on the current hardware.

Use Linear Depth

name: useLinearDepth, type: Bool, default: FALSE

Enables the usage of a 32bit floating point linear depth buffer instead of using the default 24bit fixed-point non-linear depth buffer.

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.

Debug Textures

name: debugTextures, type: Bool, default: FALSE

Renders debug textures which show all buffers.

Hidden Fields

renderCaching

name: renderCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

boundingBoxCaching

name: boundingBoxCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

renderCulling

name: renderCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

pickCulling

name: pickCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO