SoGVRLitSphereShading¶
-
InventorModule¶ genre VolRendExtensionsauthor MeVis Medical Solutions AGpackage MeVisLab/Standarddll SoGVRdefinition soGVR.def
Purpose¶
The SoGVRLitSphereShading module implements 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 for modelling 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 different lit sphere.
Usage¶
Just add this module to 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 that can be used, 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¶ Sets a list of per-tag index into stack of 2D lit spheres. This is only used if per tag shading is enabled and the input lit sphere image is a 3D image.
Enable Contours¶
-
name:enableContours, type:Bool, default:FALSE¶ If checked, contour rendering is enabled (see paper for details).
Contour Thickness¶
-
name:contourThickness, type:Float, default:0.2¶ Sets the thickness of the contours.
Enable Enhancement¶
-
name:enableEnhancement, type:Bool, default:FALSE¶ If checked, the gradient based enhancement is enabled (see paper).
Enable Lit Sphere Alpha¶
-
name:enableLitSphereAlpha, type:Bool, default:FALSE¶ If checked, using the alpha value of the lit sphere is enabled.
Use For First Hit¶
-
name:useForFirstHit, type:Bool, default:FALSE¶ If checked, the lit sphere shading affects the
SoGVRFirstHitRayCastSettingslighting instead of the normal lighting.