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:
This image is then used for lit sphere shading:
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.
Input Fields¶
Output Fields¶
self¶
-
name:
self
, type:
SoNode
¶ To be placed in front of a
SoGVRVolumeRenderer
.
Parameter Fields¶
Field Index¶
Contour Thickness : Float |
Enable Contours : Bool |
Enable Enhancement : Bool |
Enable Lit Sphere Alpha : Bool |
Enabled : Bool |
Per Tag Lit Sphere : IntegerList |
Use For First Hit : Bool |
Visible Fields¶
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.