SoPathTracerMesh

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

Purpose

The SoPathTracerMesh module allows to render triangle meshes in a SoPathTracer. It supports opaque and transparent meshes and offers correct integration/blending with the rest of the scene. Transparent meshes are much slower than opaque meshes, since the rays need to traverse the complete mesh when triangles are transparent.

The inMeshScene can contain any number of SoPathTracerMaterial nodes. A SoPathTracerMaterial affects all meshes that are behind it in the Open Inventor scene. This allows fast update of material properties without full mesh recreation, by setting Mesh Update Mode to UpdateColors.

The meshes are gathered from the inMeshScene. The meshes are converted to a BVH (bounding volume hierarchy) to allow fast ray tracing on the GPU.

Texturing is available via SoPathTracerMaterial, direct support of SoTexture2 is not yet implemented.

Model transformations below the SoPathTracerMesh module are statically applied into the BVH. Model transformations above the SoPathTracerMesh module are applied to the rays directly, so that the BVH does not need to be recreated. Since the SoPathTracer module itself does not support transformation, you need to use SoTransformSeparator or SoResetTransform so that the model transformation at the SoPathTracer is identity (I hope we will fix that in the future).

../../../Projects/MeVisPathTracer/SoPathTracer/Modules/mhelp/Images/liverclip.jpg

In this rendering, meshes are used for rendering the liver segments and the vessels. Note the usage of a clipping plane and the possibility to enable/disable clipping on individual meshes.

Windows

Default Panel

../../../Projects/MeVisPathTracer/SoPathTracer/Modules/mhelp/Images/Screenshots/SoPathTracerMesh._default.png

Input Fields

inMeshScene

name: inMeshScene, type: SoNode

The input scene that is scanned for triangle meshes.

Parameter Fields

Field Index

Cast Shadow: Bool
Enable Clipping: Bool
Enabled: Bool
Flip Clipping: Bool
Mesh Update Mode: Enum
Receive Shadow: Bool
Update Meshes: Trigger

Visible Fields

Enable Clipping

name: enableClipping, type: Bool, default: TRUE

If enabled, Open Inventor clipping planes affect the mesh rendering.

Flip Clipping

name: flipClipping, type: Bool, default: FALSE

If enabled, the Open Inventor clipping planes are flipped before being applied to the mesh.

Cast Shadow

name: castShadow, type: Bool, default: TRUE

Receive Shadow

name: receiveShadow, type: Bool, default: TRUE

Enabled

name: enabled, type: Bool, default: TRUE

Enables the rendering.

Mesh Update Mode

name: meshUpdateMode, type: Enum, default: AutoUpdateAll

Selects the update mode.

Values:

Title Name Deprecated Name Description
Off Off   The meshes are only update when Update Meshes is pressed.
Auto Update All AutoUpdateAll AutoUpdateColors Auto updates the scene when only colors/transparency of materials have changed, otherwise no update.

Update Meshes

name: updateMeshes, type: Trigger

Updates the meshes from the input scene.