Scenes

The puzzles from this category perform loading/unloading operations with scenes.

Contents

Puzzles Reference

load scene + percentage

When this puzzle is triggered, the current scene is unloaded and a new scene is loaded from a specified .gltf file. After loading is finished, the puzzles in the "when loaded do" slot are triggered. Also there can be enabled the "on progress do" slot. Puzzles placed in this slot are continuously triggered during the loading and can utilize the "percentage" puzzle. Once the scene is loaded it's assigned a name which can be used to access and manipulate the scene via various object-related puzzles. By default the assigned name equals to the specified scene URL (e.g. 'path/to/scene.gltf'). The "alias" option if enabled allows to set the name manually.

append scene + percentage

When this puzzle is triggered, a new scene is loaded from a specified .gltf file and appended to the current scene. After loading is finished, the puzzles in the "when loaded do" slot are triggered. Also there can be enabled the "on progress do" slot. Puzzles placed in this slot are continuously triggered during the loading and can utilize the "percentage" puzzle. The "append scene" puzzle doesn't load cameras and lights from a new scene by default. This behavior can be changed in the puzzle's options. Once the scene is appended it's assigned a name which can be used to access and manipulate the scene via various object-related puzzles. By default the assigned name equals to the specified scene URL (e.g. 'path/to/scene.gltf'). The "alias" option if enabled allows to set the name manually.

unload scene

Unloads the specified scene or its part from the application. Use the empty text value in order to unload all scenes.

enable rendering

Resumes previously disabled rendering.

disable rendering

Disables rendering. The graphics won't be updated but the user events will be captured and animation timelines will progress.

You can use disable rendering for the purpose of saving batteries on mobile devices or laptops, and getting rid of cooler noise on desktops. You can also enable the anti-alias option to significantly increase the rendering quality and compensate the loss of performance. This option targets the next frame after the rendering stops.

create environment

Create a new image-based lighting and assign a background to the scene. This puzzle also creates a new material with the name specified as the first parameter and adds it to the scene. You can use this material to replace textures or colors of the environment.

The second parameter can be ether:

export to gltf

Export your scene, model or a group of models to glTF 2.0 format. Specify the only visible option to export only visible objects while the binary option is used to export to GLB (glTF Binary) format.

For best results, as well as for creating standard glTF files (without Soft8Soft/Verge3D extensions) that can be viewed by third-party glTF viewers (such as Microsoft Windows 10’s default glTF viewer), we recommend you to use glTF-compatible materials. See how to create them in Blender, 3ds Max, or Maya.

raycast

Cast a ray from the source point (or object) in the given direction and return a list of all intersections (if any). The third parameter of the puzzle is used to reduce a set of the intersected objects. Leave none or specify the name of your scene to intersect all objects located in the loaded scene.

The returned list contains a sequence of dictionaries with the following information:

The list of intersections is sorted by distance, closest first.

add fog

Add the fog effect to the scene. Use zeros either for RGB or for density to disable the added fog.

Having Troubles with Puzzles?

Seek help on the forums!