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 OffscreenRender module requires a virtual camera and at least one light source in the scene.

Have a look at the example network.

Details

Internally, the OffscreenRender 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
Buffer Type: Enum
Size: Vector2
Supported: Bool
Transparency: Enum
Type: Enum
Update: Trigger
Use stencil: Bool

Visible Fields

Transparency

name: transparencyType, type: Enum, default: BLEND

Defines the transparency to be used during rendering 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 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, default: TRUE

Shows whether the hardware supports p-buffers.

Use stencil

name: stencilBuffer, type: Bool, default: FALSE

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.

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

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