Viewports
- Last UpdatedMar 12, 2025
- 2 minute read
The AVEVA™ XR engine supports multiple viewports that can be placed inside windows.
-
Each viewport can be any size inside that window.
-
The viewport is rendered using one or more layers, each of which is the same size as the viewport.
-
The engine looks for a RenderSetup XML file to create the initial layout. This file is specified inside config.xml.
-
At startup, the XR engine creates a Viewport node for each one found in the RenderSetup XML.
-
At startup, the XR engine creates and assigns a VisualContext to each Viewport that features a scene layer, based on the defined visual context in the RenderSetup XML or, if not found, by assigning the default visual context.
Limitations
Please note that, even with custom viewports definition, there are some limitations:
-
A Viewport named DEFAULT_VIEWPORT must exist in the RenderSetup XML. This viewport must have a Scene Layer named DEFAULT_SCENE_LAYER and a 2D layer named DEFAULT_2D_LAYER with a layer2dName of DEFAULT_2D_LAYER_MAIN.
-
In dualhead rendering, a Viewport named RIGHT_VIEWPORT must exist in the RenderSetup XML. This viewport must have a Scene Layer named RIGHT_SCENE_LAYER and a 2D layer named RIGHT_2D_LAYER with a layer2dName of DEFAULT_2D_LAYER_MAIN.
-
Some of the fields of Global node refer only to DEFAULT_VIEWPORT.
-
Interaction and 2D rendering is bound to DEFAULT_VIEWPORT only.
-
Some manager nodes, such as Fgi and PostProcess, only affect DEFAULT_VIEWPORT.
-
Billboarded objects and other features that need rendering pose might not work properly on custom viewports.
-
A maximum of eight (8) visual contexts can be active concurrently. Rendersetup configurations that feature more than eight (8) visual contexts will create the first eight and assign the DEFAULT_VIEWPORT Visual Context to the remaining Viewports.
-
Viewport cave logic cannot coexist with Camera cave logic. You should either use a viewport with caveEnable set to true or a camera with caveEnable set to true, but never both at the same time. It is recommended to prefer the viewport cave to the Camera cave, as the Camera cave is still supported for backward compatibility only.
-
At startup, the XR engine creates and assigns a VisualContext to each viewport that features a Scene Layer based on the defined visual context in the RenderSetup XML or, if not found, by assigning a default visual context.
What is a Viewport?
|
In computer graphics, a viewport is a viewing region or window of the graphical world. Sometimes, the viewport is larger than the available screen. In such cases, the user needs to scroll to see the entire viewport. |