OffscreenRenderer

MLModule

genre

Visualization

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

MLOffscreenRender

definition

MLOffscreenRenderer.def

see also

SoFramebufferRenderer, SoFramebufferTexture

keywords

Inventor, rendering, fast, image

Purpose

The module OffscreenRenderer renders an Open Inventor scene to an ML image.

In contrast to the Viewer modules (e.g., SoExaminerViewer), the render area is not visible and may be much larger than the physical screen space (e.g., 3000x3000 pixel depending on the graphics card capabilities).

Usage

Just like any other OpenGL renderer, the OffscreenRenderer module requires a virtual camera and at least one light source in the scene.

For simplicity, you can use the module SoCameraInteraction to provide a camera and a light source.

Have a look at the example network.

Details

Internally, the OffscreenRenderer uses OpenGL p-buffers to render the scene.

It is therefore quite fast, but the transfer of the frame buffer’s content to the ML image highly depends on the OpenGL implementation, which may be quite slow for large images.

Windows

Default Panel

../../../Modules/ML/MLOffscreenRenderer/mhelp/Images/Screenshots/OffscreenRenderer._default.png

Input Fields

sceneGraph

name: sceneGraph, type: SoNode

Output Fields

output0

name: output0, type: Image

Parameter Fields

Field Index

Background Color: Color

Type: Enum

Buffer Type: Enum

Update: Trigger

Enable Multi Sampling: Bool

Use stencil: Bool

Multi Sampling: Integer

Pixel Scale: Float

Size: Vector2

Supported: Bool

Transparency: Enum

Visible Fields

Transparency

name: transparencyType, type: Enum, default: BLEND

Defines the transparency to be used during the rendering of the scene graph.

Values:

Title

Name

​Screen Door

​SCREEN_DOOR

​Add

​ADD

​Delayed Add

​DELAYED_ADD

​Sorted Object Add

​SORTED_OBJECT_ADD

​Blend

​BLEND

​Delayed Blend

​DELAYED_BLEND

​Sorted Object Blend

​SORTED_OBJECT_BLEND

Type

name: imageType, type: Enum, default: RGB

Defines the type of ML output image (the c-dimension).

A change to this parameter will result in the creation of a new OpenGL p-buffer.

Values:

Title

Name

​Rgb

​RGB

​Rgba

​RGBA

​Rgba Float

​RGBA_FLOAT

Buffer Type

name: bufferType, type: Enum, default: AUTO

Defines the used buffer type.

Values:

Title

Name

​Auto

​AUTO

​Pixel Buffer

​PIXEL_BUFFER

Supported

name: supported, type: Bool, persistent: no

Shows whether the hardware supports p-buffers.

Use stencil

name: stencilBuffer, type: Bool, default: TRUE

If checked, the offscreen renderer uses a p-buffer with a stencil buffer.

This is needed for, e.g., SoSilhouette.

Size

name: size, type: Vector2, default: 64 64

Sets the size of the offscreen render area.

Pixel Scale

name: pixelScale, type: Float, default: 1

Sets the scale factor that is applied to pixel sizes and fonts in order to maintain readability on high-resolution images.

Background Color

name: bgColor, type: Color, default: 0 0 0

Sets the background color that is used to clear the frame buffer before rendering.

Update

name: update, type: Trigger

When pressed, the connected Open Inventor scene is rendered anew into the p-buffer and its content is written to the ML output image.

Enable Multi Sampling

name: enableMultiSampling, type: Bool, default: FALSE

If checked, multi-sample anti-aliasing (MSAA) is enabled.

This feature only works if framebuffer objects are supported and if Buffer Type is set to Auto.

Multi Sampling

name: multiSampling, type: Integer, default: 16

Sets the number of multi-sampling samples used.

If the hardware supports fewer samples, the module will use the maximum supported number of samples.