Viewport

Viewport/Background This node acts as a 2D layer in the scene.

The Viewport/Background Node restricts rendering of the elements beneath it to a sub-portion of the render output. It is used to composite the rendering result from multiple independent parts of a scene. Their closest equivalent in 2D media is a layer in Photoshop. The Position and Size properties specify percentages based on the currently active viewport which match the full render output if no parent Viewport node exists. This allows Viewports to be nested inside other Viewports, giving it the name Relative Viewport.

In computer graphics, a viewport usually only scales the render output to a portion of the screen. The Viewport/Background however also contains aspects that are otherwise only associated with the render window. It can clear the Color, Depth and Stencil Buffers for its portion of the window. Pixels also used by other viewports can be reset.

The Texture and StretchMode can be used to assign a background image to the area occupied by the defined viewport. The advantage of using the Viewport/Background instead of an Overlay Rectangle is that the StretchMode can be used to change the behavior how the used texture reacts on output size changes.

The Output properties provide information about the size and position of the current viewport and background
texture in pixel respectively in percentage.

The Viewport/Background is often used to split a scene into multiple parts that are sent to different display devices. For more information, see Multi Display Setups And Shaping.