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

Rendered as flat 2D texture.

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. There is no separate instance of the subscene for each container.

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.

image-20240919-084441.png

image-20240812-100424.png This adds a subscene icon to your container. Click on the subscene icon and drag a scene from Asset View to the placeholder.

image-20240919-084505.png

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

Information: If you hover over the scene icon in the Scene Tree, the tooltip shows the name and uuid of the assigned scene.

Subscenes are the successor of merged geometries and are optimized for workflows (used in, for example, Transition Logic scenes). Instead of splitting up merged geometries, modify, merge and save again. Any existing scene can be brought into the current scene, modified and saved again with a single click. 

Grouping and Ungrouping

Like merge geometries, the structure of a subscene can be expanded into the active scene by ungrouping the subscene. This makes the subscene's Scene Tree as well as the Stage Directors available inside the host scene and allows for modification on its structure. Click on the Group button to collapse the Scene Tree and the Stage Animation again.

Information: If you save an ungrouped subscene, all of its data becomes part of the original scene!

Save to Database

If you have modified your subscene and regrouped it, you can save all the changes in the subscene by clicking on the Save to Database button. This updates the original scene on Graphic Hub and reloads the data into the scene pool.

Re-Establish a Subscene

The Re-Establish button reloads the object from the scene pool. This reverts any modifications and replaces the current part of the Scene Tree with the original loaded from Graphic Hub.

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 Viz Artist or the command MAIN_SCENE*TREE*/1*SUBSCENE*REQUESTED_FORMAT SET <name of format>.

image-20240916-144849.png

Note 1: The requested format needs to be set before assigning the subscene.

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

Note 3: 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 4: BoxTransformation and Flexbox layouts Supports Subscene boundaries and considers Subscene containers in FlexBox calculations.

Shared Memory Support in Subscenes

Registering a Scene.map within a subscene also reflects in the main scene's shared memory map. 

Workspace Items Support in Subscenes

The workspace items (Texture Renderers and Runtime Shaders) are cloned with subscene and accessible from workspace tab of Viz Artist.

Known Limitations

Global Illumination is not supported in subscenes.