Scene Port | This node provides the possibility to load a complete Ventuz scene as a hierarchy sub-tree. |
Every Ventuz scene can be loaded by the Scene Port node and integrated into an existing scene tree. The loaded scene acts as a sub-tree. The Scene Port node makes it possible to split one large scene in smaller sub-scenes and load the necessary parts on demand. A big advantage of such an approach is that scenes which are nested in a Blocked Scene Port do not have any negative effect on the scene performance. The performance would be the same as if the Scene Port would be empty. But note that the blocked Scene Port still consumes memory corresponding to the loaded scene. Only if the Scene property is reset, the memory will be freed. The Scene Port node is also a fundamental part of the Ventuz Scene Management and especially the Layout Scene system.
The Lock property has two functions:
Note that the Lock property is automatically enabled if the Scene property is bound to another node!
Enabling the LoadAsync property causes the Scene Port to load the scene in a background thread. This reduces and under certain circumstances even completely eliminates rendering stalls of the master scene during loading. The master scene, which contains the Scene Port, must be in a certain condition to minimize rendering stalls. It should not create or request new resources during asynchronous loading of a Scene Port. New resource are e.g. created if a text changes (Example: displaying 0% to 100%) or the length of a progress bar changes by animating the SizeX property of a Rectangle node. Ventuz has one single Resource Manager for all scenes. During scene loading new resources are created and must be added to the Resource Management. Only one scene at the time can access the Resource Manager. Concurrent access to the Resource Manager of two scenes will cause stalls of one of these two scenes. If the loading scene is stalled, this is not a big problem - the loading just takes a little bit longer. But if the rendering master scene is stalled, this will be visible in animation and rendering stalls.
The ValidateIfBlocked method allows a blocked Scene Port to process its properties on user-demand.
This node provides some outputs to inform about the loading status. The Progress property provides a value between 0 and 100 which represents the loading progress in percent. The Loaded event is fired if the loading succeeded. If the scene loading did not succeed for any reason, the Failed event is fired. ValidatedWhileBlocked is fired whenever the forced validation of a scene is fininshed.
To access Exposed Data items from the scene click on the Scene Port node this will select the root node and the exposed properties are visible in the Property Editor.
The Scene Port Node is only able to properly load a scene with a single 3D Layer. All other layer types are ignored and if there is more than one 3D Layer only the first one will be displayed and validated.