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. Do not 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, as the rendered spheres are not perspective-correct because no real ray-sphere intersection is calculated.
This only becomes visible if 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
¶ Defines 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 Scale Factor¶
-
name:
radiusScaleFactor
, type:
Float
, default:
1
¶ Sets a scale factor that scales the radii that are provided as vertex attribute.
Radius Vertex Attribute¶
-
name:
radiusVertexAttribute
, type:
String
, default:
sphereRadius
¶ Sets the name of the
SoVertexAttribute1f
vertex attribute that is used for the sphere radii. The default is “sphereRadius”.