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

If checked, the effect is enabled.

Angle Bias

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

Sets an angle threshold.

All angles below this threshold (in degrees) will be discarded when calculating ambient occlusion.

Thus, the higher this value, the less self-occlusion will occur. The optimal value for this parameter depends on the coarseness of the triangle mesh: the coarser the mesh, the greater the bias should be.

Sample Radius

name: ambientSampleRadius, type: Float, default: 30

Sets the radius of the SSAO sampling.

Intensity

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

Sets the intensity of the ambient occlusion.

Scale

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

Sets a scaling factor for the distance term of the algorithm; lower values produce more occlusion.

Num. Directions

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

Sets how many occlusion directions are considered for each screen pixel.

This value is considered only if Mode is set to SSAO_HIGH_QUALITY.

Num. Steps

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

Sets how many steps are sampled on each direction.

This value is considered only if Mode is set to SSAO_HIGH_QUALITY.

Attenuation

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

Sets the attenuation of the ambient occlusion term.

This value is considered only if Mode is set to SSAO_HIGH_QUALITY.

Contrast

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

Sets the contrast of the ambient occlusion term.

This value is considered only if Mode is set to SSAO_HIGH_QUALITY.

Enable

name: blurPass, type: Bool, default: TRUE

If checked, an additional blur pass is enabled.

Half resolution ambient occlusion

name: useLowResAO, type: Bool, default: FALSE

If checked, the SSAO calculation and blur pass is using a half-resolution buffer.

Show Ambient Only

name: showAmbientOnly, type: Bool, default: FALSE

If checked, the SSAO term is rendered.

Mode (mode)

name: mode, type: Enum, default: SSAO_HIGH_QUALITY

Defines the quality mode.

Using high quality is recommended, but it 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”

For more details, see here

This software contains source code provided by NVIDIA Corporation.

Mode (blurMode)

name: blurMode, type: Enum, default: BILATERAL_BLUR

Defines the blur mode.

Values:

Title

Name

Description

​Bilateral Blur

​BILATERAL_BLUR

​Uses a bilateral blur filter that is edge preserving.

​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

Sets the radius of the blur filter.

Sharpness

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

Sets the sharpness of the filter, aiming to avoid blurring edges with a large depth difference.

Hidden Fields

debugTextures

name: debugTextures, type: Bool, default: FALSE