Viz Artist User Guide

Version 5.2 | Published March 20, 2024 ©

Subscenes

Like GFX channels, you can attach a scene directly into your scene tree and its scene tree is automatically traversed and rendered like it is part of the main scene. Subscenes are integrated as part of the scene tree, similar to merged geometries, whereas GFX Channels or Viewport Tiles are rendered as flat 2D objects.

Scene as GFX Channel

SubScene

images/download/attachments/105100780/image2021-6-21_16-14-39.png

Rendered as flat 2D texture.

images/download/attachments/105100780/image2021-6-21_16-15-37.png

Rendered as part of the scene.

The attached scene inherits all global settings from the main scene, only its scene tree is merged into the main scene. The scene is loaded using the instancing mechanism described at GFX channels, so there is a separate instance of the subscene for each container where it is set to.

Subscenes can replace merged geometries used in Transition Logic scene. The Toggle plug-in automatically loads the scene as subscene if supported, otherwise the merged geometry is used.

Tip: The old behavior can be enforced by using TransitionLogicUseMergedGeometries = 1. This is only needed in some rare cases to keep compatibility with scenes that used for instance Scripting within the Transition Logic Tree structure.

Important: While GFX Channels render their content in the scene's pipeline, Subscenes are always rendered in the Main Render Pipeline (Classic or Viz Engine).

To Add a Subscene

Create new container, click on the Plus (+) icon and select Subscene.

images/download/thumbnails/105100780/image2022-9-15_9-27-4.png

images/download/thumbnails/105100780/image2021-6-21_15-50-19.png This adds a subscene icon to your container. Drag a scene into the placeholder of the Subscene Widget.

images/download/thumbnails/105100780/image2022-8-11_15-56-12.png

The scene is now rendered as part of the Master Scene. The Animation has been added to the stage.

To Remove a Subscene

Drag the subscene to the trash bin.

To Select a Container of Subscene

By default, the whole scene tree of the subscene is merged into the main scene. However, you can also specify a specific container which should be merged into the main scene:

' select container by level
MAIN_SCENE*TREE*/1*SUBSCENE SET <uuid> /1/1
 
' select container by name
MAIN_SCENE*TREE*/1*SUBSCENE SET <uuid> $ContainerName
 
' select container by property, search for container with ControlObject and use it as root for the subscene handling
MAIN_SCENE*TREE*/1*SUBSCENE SET <uuid> %BUILT_IN*FUNCTION%ControlObject

Note: Subscenes added to the Scene Overview to have a better overview of the assigned scene.

Accessing "Main" Containers from within a Subscene

By default, subscenes keep their tree structure inside their scene from a scripting perspective. To access other scenes outside your subscene, you need to call the MergedParentContainer function.

dim topcontainer = this.MergedParentContainer
dim bContinue = True
 
Do
if topcontainer.MergedParentContainer<>Null then
topcontainer = topcontainer.MergedParentContainer
Else
bContinue = false
end If
 
loop while bContinue

Adaptive Scene Design Formats Support for Subscene

Subscenes can be set to render a certain format using the command or Viz Artist:
images/download/attachments/105100780/image-2023-6-19_15-34-42.png

MAIN_SCENE*TREE*/1*SUBSCENE*REQUESTED_FORMAT SET <name of format>

Note 1: By default, the requested format is empty, which means the Subscene follows the main-scene format.

Note 2: If the requested format is set and it is not supported by the Subscene, then we fall back to the default format as active format, and the active format and requested format differ.

Note 3: BoxTransformation and Flexbox layouts Supports Subscene boundaries and considers Subscene containers in FlexBox calculations.

Known Limitations

  • Global Illumination is not supported in subscenes.