Skip to main content

Concept and Use Cases

Control Concept

Controls are template scenes created for later reuse via control nodes. They are meant to be interactive. To make them interactive they can be filled with Behaviors. A control collects a part of the scene graph and Behaviors into a single entity, which can be instantiated in another scene. All the controls are written in a special section which belongs to the asset library. When the solution is loaded from the asset, the content of the value of the control properties from the control node is set on the associated Behaviors in the control. Also the anchor nodes inside the user scene are added to the associated nodes in the control.

Created controls will include Behaviors with the observation that the Behaviors will be included only if they are bound to a node from the created control.

The interface of a control is defined by its control properties and anchors. The control properties are linked to the Behaviors inside controls and allow to change the value of the exposed properties. The anchors are linked to nodes inside controls and allow adding new children to those nodes.

Main differences of controls compared to regular scenes:

  • Controls can be used in regular user scenes by dragging them into the scene like imported or Toolbox nodes
  • Child nodes of a control (on any level) can be marked as anchors, if they are empty
  • Controls have no cameras or lights
  • Controls are meant to be interactive
  • Controls can have public properties

Each scene node is uniquely identified by its parent using the type and the name. To identify a node globally its path to the scene should be used (for example /Scene:MyScene/Group:RootNode/Mesh:MyMesh).

The Scene Tree panel of a scene using a control will treat it as a single entity with all available anchor nodes as children. It is not possible to change the content of the control node, only the content of the anchors can be changed.

The following impact has to be considered: Cross-references (nodes or behaviors) to different scenes may occur. For details see Cross-Reference Implications.

Control Use Cases

  • Add new control content to all scenes: Imagine a control containing a car used in several scenes. To add a specific car accessory, simply link the accessory from the Imports panel to a proper anchor of the control. All scenes will be updated immediately.
  • Add Behaviors to controls to make them interactive.
  • Customize control nodes in specific scenes: In above car example, to use different car wheels in several scenes remove the initial meshes representing the wheels from the control and replace them with anchors to be customized in a scene.

A conflict situation appears when two or more nodes have the same path (for example 2 billboards with the same name are added to a group). To avoid name conflicts when the controls are used, it is recommended to link anchors only to empty nodes and also to not link more than one anchor to a node.