Understanding scenes
This page describes the concept of Scene in Substance Model graphs.
What is a scene?
A Scene is the main object type of Substance Model graphs. It is a container which holds information about a 3D scene such as 3D objects and materials, arranged using a tree hierarchy. Scenes are the most common objects input into nodes and output by nodes, since most nodes perform operations on the content of a Scene, such as transforming or instancing Elements.
A Scene is a tree of Elements:
- Elements which cannot have children are Items (3D objects, materials)
- Elements which can have children are Groups
When exporting a Substance Model, the exported Scene is the result of all Output scene nodes combined.
In this hierarchy tree, all operations applied on a parent – such as transformations – will carry over to all its children recursively (i.e. including groups and sub-groups).
This means managing this hierarchy is critical to maintaining an efficient workflow when authoring Substance Models.
All nodes in a Substance Model graph which take a Scene as an input will change the scene using its global world-aligned bounding box as a reference space, unless specified otherwise explicitly by a parameter.
Combining scenes
Scenes can be combined in two ways: grouped or ungrouped. This has an impact on how the merged Scenes can be transformed or instanced:
- Ungrouped (i.e. blank group name): In this case, the roots of all Scenes are merged, and hierarchies of the source Scenes are preserved in the combined Scene.
- Grouped (i.e. set group name): In this case, the roots of all Scenes are merged, and hierarchies of the source Scenes are preserved in the combined Scene, then the result is placed in a group under the root of the combined Scene.
Scenes in the 3D View
When viewing a Substance model graph in the 3D View panel, a Scene resulting from the cumulation of all Output scene nodes in the graph is loaded in the viewport.
When viewing a node, the Scene is the result of the cumulations of all the node's outputs of type Scene
.
The contents of the Scene are listed in the Scene Browser panel available in the toolbar on the left of the 3D View viewport by default.
The Scene and its content can be found in the Scene Objects column. The arrangement of the content follows the hierarchy of the Scene as built by the user in the Substance Model graph.
For each Item in the Scene, the material currently applied to it is displayed in the Material column. Materials can be changed to any other material currently existing in the current project, or the Default
material, by clicking LMB on the name of the material in the list.
When an Item or its material are clicked using LMB, the corresponding 3D object in the viewport is displayed as a wireframe for quick identification of the Item in the scene. This is also a convenient way to quickly check the topology of the mesh for this object.
Scene path naming, grouping and filtering syntax
Several nodes include an Output scene path parameter, which let you define the Scene path that the output Scene should be put under.
This path uses a standard folder hierarchy syntax such as the following: /MyGroup/MySubGroup/MyElements
The asterisk character (*
) is used as a wildcard, meaning it can be used to replace any character or series of characters so the path can apply to more than one specific Element.
The Filtering expression and Target to rename parameters, such as found in the Filter scene and Rename nodes respectively, use the same syntax.