SoGVRLitSphereShading

InventorModule
genre VolRendExtensions
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoGVR
definition soGVR.def

Purpose

The SoGVRLitSphereShading module implement lit sphere shading, as described in Style Transfer Functions for Illustrative Volume Rendering by Stefan Bruckner. Instead of using a traditional Blinn-Phong lighting model, this model projects the gradient to a 2D sphere in view space. This allows to model complex lighting situations or styled rendering by loading different 2D lit sphere images. In combination with tagged volume rendering, a stack of 2D lit spheres can be connected and each tag can use a differnt lit sphere.

Usage

Just add this module a SoGVRVolumeRenderer scene and enable the illumination of the renderer. The lit sphere shading then replaces the traditional lighting. The contour mode only works when used together with SoGVRRayCastSettings, since it detects changes in the gradient along the ray.

Details

For more details, read the paper Style Transfer Functions for Illustrative Volume Rendering by Stefan Bruckner or have a look at the example network.

The example network renders a lit sphere using Open Inventor and the OffscreenRenderer:

../../../Modules/Inventor/SoGVR/mhelp/Images/LitSphereExample1.png

This image is then used for lit sphere shading:

../../../Modules/Inventor/SoGVR/mhelp/Images/LitSphereExample2.png

Tips

For a nice collection of lit sphere images which can be used, see Ashraf Aiad lit sphere collection:

http://www.pixelcg.com/blog/?p=165

or use google image search with search term lit sphere.

Windows

Default Panel

../../../Modules/Inventor/SoGVR/mhelp/Images/Screenshots/SoGVRLitSphereShading._default.png

Input Fields

image

name: image, type: Image

2D RGB or RGBA image (or a 3D stack of 2D images), used for lit sphere shading

Output Fields

self

name: self, type: SoNode

To be placed in front of a SoGVRVolumeRenderer.

Parameter Fields

Visible Fields

Enabled

name: enabled, type: Bool, default: TRUE

Enable the lit sphere shading

Per Tag Lit Sphere

name: perTagLitSphere, type: IntegerList, default: 0

List of per-tag index into stack of 2D lit spheres, only used when per tag shading is enabled and the input lit sphere image is a 3D image.

Enable Contours

name: enableContours, type: Bool, default: FALSE

Enable contour rendering (see paper for details)

Contour Thickness

name: contourThickness, type: Float, default: 0.2

Defines the thickness of the contours, if enabled

Enable Enhancement

name: enableEnhancement, type: Bool, default: FALSE

Enables gradient based enhancement (see paper)

Enable Lit Sphere Alpha

name: enableLitSphereAlpha, type: Bool, default: FALSE

Enables using the alpha value of the lit sphere.

Use For First Hit

name: useForFirstHit, type: Bool, default: FALSE

If enabled, the lit sphere shading affects the SoGVRFirstHitRayCastSettings lighting instead of the normal lighting.