SoDepthPeelRenderer

InventorModule
genre Visualization
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoRenderers
definition SoRenderers.def
see also SoGVRDepthPeel
keywords framebuffer, fbo, offscreen, transparency, alpha

Purpose

The module SoDepthPeelRenderer allows to render transparent geometry with correct transparency blending (without the need of sorting triangles).

For a modern implementation of this module, you should use SoPostEffectTransparentGeometry instead.

It is an image-space algorithm, so it has pixel precision and even allows intersecting transparent triangles. It works by rendering the connected scene in a multiple passes and peels one RGBA layer per pass (front-to-back) using a double depth test.

The SoDepthPeelRenderer module can be used together with the SoShaderPipeline, so most shader extensions of the shader pipeline are also supported in depth peeling rendering.

The algorithm was first described by Cass Everitt, his original paper can be found here.

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

Details

This module requires the following OpenGL extensions:

  • ARB_depth_texture
  • ARB_fragment_program
  • EXT_framebuffer_object

These features are typically present on any graphics board that supports at least OpenGL 2.0.

Windows

Default Panel

../../../Modules/Inventor/SoRenderers/mhelp/Images/Screenshots/SoDepthPeelRenderer._default.png

Input Fields

child

name: child, type: SoNode

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Supports Depth Peeling

name: supportsDepthPeeling, type: Bool, persistent: no, deprecated name: supportsFBO

Shows whether framebuffer object are supported by the graphics card driver.

Use Stencil Buffer

name: useStencilBuffer, type: Bool, default: FALSE

If checked, a stencil buffer is created which is needed for some modules e.g. SoSilhouette.

Layers

name: layers, type: Integer, default: 4, minimum: 1, maximum: 16

Sets the number of layers that are peeled.

Typically, 4 layers are enough, memory requirement and performance inc/decreases linearly. When no extensions are supported or you have disabled the use of depth peeling and FBO the method uses a fix number of 4 layers.

Simulated Alpha

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

If checked, transparency is added to opaque geometry. Multiplied with the alpha values of the layers.

Opaque Background Pass

name: opaqueBackgroundPass, type: Bool, default: TRUE

If checked, an extra opaque geometry pass is rendered.

Scene Depth Compare

name: sceneDepthCompare, type: Bool, default: FALSE

If checked, the correct depth values of the peeled objects are used.

Note: Always enabled when only depth peeling is enabled.

Not applicable when no hardware support is available.

Compares the layers being drawn with the current main depth buffer, so correct z-ordering is established.

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

debugLayers

name: debugLayers, type: Bool, default: FALSE