GVRDeepShadowMapping

MacroModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition GVRDeepShadowMapping.def

Purpose

The GVRDeepShadowMapping implements deep shadow mapping. The implementation is based on the paper “GPU-accelerated deep shadow maps for direct volume rendering” by Markus Hadwiger et. al. (see http://portal.acm.org/citation.cfm?id=1283908). Many thanks go to Markus Hadwiger for providing the GLSL shaders that are used in the module.

The module has high hardware requirements (it requires floating point textures and FBO rendering to 3D textures) and will be quite slow if not used on up-to-date graphics cards. It has not yet been tested on ATI cards.

Clipping planes are supported, but the shadow volume does not take them into account, the shader turns off shadowing near the clip planes. Mask volumes, Tag volumes and other secondary volumes are supported for the shadow creation. The classification step of the shadow creation can be manually modified using the SoGVRShaderFunction in the scene below this module.

Usage

The module needs to be placed in front of a SoGVRVolumeRenderer module. The LUT and the SoGVRRayCastSettings need to be placed in front of this module, otherwise the shadow map generation will fail. The SoGVRVolumeRenderer needs to be connected to the input of this module as well, this is used for the shadow generation pass.

Details

A screenshot of a segmented brain, rendered with shadow mapping:

../../../Modules/Macros/GVR/mhelp/Images/DeepShadowMapping.png

Windows

Default Panel

../../../Modules/Macros/GVR/mhelp/Images/Screenshots/GVRDeepShadowMapping._default.png

Input Fields

nodeIn0

name: nodeIn0, type: SoNode

Output Fields

nodeOut0

name: nodeOut0, type: SoNode

Parameter Fields

Visible Fields

Attach Light To Camera

name: attachLightToCamera, type: Bool, default: TRUE

If enabled, the light is positioned in camera/view space, if disabled it is positioned in world-space.

Azimuth

name: lightPolarPhi, type: Float, default: 45, minimum: -180, maximum: 180

Polar coordinate Phi of the light.

Altitude

name: lightPolarRho, type: Float, default: -45, minimum: -180, maximum: 180

Polar coordinate Rho of the light.

Compression Epsilon

name: compressionEpsilon, type: Float, default: 0.0099999998, minimum: 0, maximum: 0.5

Alpha compression epsilon used for DSM creation.

Shadow Map Layers

name: shadowMapLayers, type: Integer, default: 16

The number of layers the DSM texture uses.

Shadow Map Size

name: shadowMapSize, type: Integer, default: 1024

The size used for width and height of the shadow map.

Interactive Shadow Map Layers

name: interactiveShadowMapLayers, type: Integer, default: 4

Depth of interactive shadow map.

Interactive Shadow Map Size

name: interactiveShadowMapSize, type: Integer, default: 512

Size of interactive shadow map.

Interactive Mode

name: interactiveMode, type: Enum, default: GVR_USE_STATIC_SHADOW

Defines what to do while rendering interactively.

Values:

Title Name Description
Lowres Shadow GVR_USE_LOWRES_SHADOW Use the Interactive Shadow Map Layers and Interactive Shadow Map Size fields for shadow creation.
Hires Shadow GVR_USE_HIRES_SHADOW Use the Shadow Map Layers and Shadow Map Size fields for shadow creation.
Static Shadow GVR_USE_STATIC_SHADOW Use the shadow that was created on the last static rendering step (so the light will rotate with the volume).

Shadow Fetch Mode

name: shadowFetchMode, type: Enum, default: Nearest

Defines how the attenuation values of the shadow are fetched.

Values:

Title Name Description
Nearest Nearest Only fetch one value.
Bilinear Bilinear Fetch 4 shadow samples and interpolate bilinear.