SoPointSpriteRenderer

InventorModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoRenderers
definition SoRenderers.def
keywords spheres, instanced, multi

Purpose

The module:this module renders all provided SoPointSet point sets as shaded spheres using point sprite rendering.

It works by rendering each point as a screen space quad. In the fragment shader, the quad is shaded like a real 3D sphere, calculating the per-pixel normal and the correct depth.

This offers very fast rendering of per-pixel shaded spheres.

The SoPointSpriteRenderer module can be used together with the SoShaderPipeline, so most shader extensions of the shader pipeline work together with this module.

It can also be used for classic fixed-size point sprites with texturing, see the SoPointSpriteRendererTexturingExample example network.

Details

Any SoPointSet that is placed below this module is rendered as spheres instead of points. To provide per sphere radii, add a SoVertexAttribute1f to the scene, name it “sphereRadius” and fill it with per-sphere radii. Don’t forget to enable PER_SPHERE in the Radius Mode field.

The SoMarkerListPointSet can be used to render a marker list as a point set. In combination with this module, you can render a marker list with half a million markers as spheres interactively.

Tips

The module should be used with orthographic projections, since the rendered spheres are not perspectively correct, because no real ray-sphere intersection is calculated.

This becomes only visible when rendering wide angled perspective views, so a perspective view is still possible.

The SoPointSpriteRenderer module makes use of the GLSL Shader Pipeline.

The point sprite rendering can be extended. To see the involved pipeline steps, place a SoShaderPipelineDiagnosis and SoShaderPipeline into the scene below this module.

Parameter Fields

Field Index

boundingBoxCaching: Enum Write Sphere Depth: Bool
pickCulling: Enum  
Radius: Float  
Radius Mode: Enum  
Radius Scale Factor: Float  
Radius Vertex Attribute: String  
renderCaching: Enum  
renderCulling: Enum  

Visible Fields

Radius Mode

name: radiusMode, type: Enum, default: FIXED

Selects how the sphere radius is calculated.

Values:

Title Name Description
Fixed FIXED A fixed radius is provided.
Per Sphere PER_SPHERE Each sphere has its own radius, which is provided as a SoVertexAttribute1f.

Radius

name: radius, type: Float, default: 1

Sets a fixed radius.

Radius Scale Factor

name: radiusScaleFactor, type: Float, default: 1

Scales the radii that are provided as vertex attribute.

Radius Vertex Attribute

name: radiusVertexAttribute, type: String, default: sphereRadius

Specifies the name of the SoVertexAttribute1f vertex attribute that is used for the sphere radii. The default is “sphereRadius”.

Write Sphere Depth

name: writeSphereDepth, type: Bool, default: TRUE

Enables writing the correct sphere depth instead of the quad depth. This is needed when correct intersection is desired.

Hidden Fields

renderCaching

name: renderCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

boundingBoxCaching

name: boundingBoxCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

renderCulling

name: renderCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

pickCulling

name: pickCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO