You can define different configurations for your scene and switch between configurations at runtime using the "UVR Variants" components. The variants are components that list a set of options for an element in the scene, the available variants are :
UVR Material Variants : to change the materials of a Mesh Renderer,
UVR Skybox Variants : to change the skybox of a Camera,
UVR Geometry Variants : to change the mesh of a Mesh Filter,
UVR Setup Variants : to activate/deactivate GameObjects in the scene,
UVR IES Variants : to change the IES file of an Area light with a Photometric EDF,
UVR Display Variants : to change the directory holding the measure of an Area light with a Measured Display EDF,
UVR Transform Variants : to change the transform of a GameObject,
UVR Spinner Transform Variants : to rotate a transform around a pivot.
The UVR Variants components can be instantiated/added in the scene via the “GameObject/PredictSuite/Scenarization” menu.
Apart from the materials or the camera transform that can be edited interactively, the Predict Engine scene must be reloaded every time the Unity scene is edited by script, manually or using a variant. The reloading of the Predictive Engine scene is automatically performed if the "Auto Reload" option is enabled in the preferences, or by the variant manager when you pick a new option.
Variants are the main tool to define configurations for the Batch Renderer. See the Outputs section for more details.
The component must be added to the GameObject that should be modified : the light for the IES and Display Variants, the geometry for the Geometry and Material Variants, the camera for the RGB Environment Variants.
The Material Variants can also be added to a GameObject that is the parent of a group of geometries. In that case, the Concerned Meshes and the Selected Submesh fields of the picker enable you to choose which renderers and sub meshes should be affected by the variants. See example 1 bellow.
The Setup Variants can be placed anywhere in the scene.
Example 1 : consider a Material Variants placed on the "Spheres" GameObject.
Concerned Meshes = "This Game Object" : the Material Variants will affect the "Spheres" GameObject only,
Concerned Meshes = "This Game Object And All Childs" : the Material Variants will affect the "Spheres" GameObject and all three child GameObjects,
Concerned Meshes = "Childs Only" : the Material Variants will affect the three child GameObjects but it will not affect the "Spheres" GameObject.
There should never be any static geometries in a setup used in a Setup Variants or a Geometry Variants.
The Variant Manager window contains a list of all Variants components in the scene. It enables you to edit them, copy or delete them, create new ones, and enable/disable them.
The window can be found under the menu "PredictSuite/Variant Manager".
The left part of the window contains a list of all the Variants component in the scene, grouped by category :
Variants that are placed on an enabled GameObject can be enabled/disabled using the toggle on the left,
Variants can be edited by clicking on their name or one the arrow on the right. The selected component can be edited on the right part of the window,
Variants can be deleted using the "-" button,
Variants can be duplicated using the "+" button : a "Select GameObject" window appears to choose on which GameObject the new component should be placed.
For each category, the "+" button next to the category name enables you to create a new Variants component of this type : a "Select GameObject" window appears to choose on which GameObject the component should be placed.
You can use variants to define scene configurations and render them using the Batch Renderer window. The button on the top right corner of the window enables you to switch easily between the variant manager and the batch renderer.
On every Variants component :
The Key To Switch Option is a keyboard shortcut to switch between the different options when using the engine overlay,
The Initialize On Awake field defines whether the first option should be assigned when the application is started,
The Load Options from command line field defines whether assets dropped on the application *.exe file should be included in the variant options. This option has no effect in the Unity Editor environment, it is only active once the application has been deployed. The supported assets are :
textures for the RGB Environment Variants,
directories for the Display EDF Variants (main directory holding the "red", "green" and "blue" directories),
*.ies files for the IES Variants,
*.xml material files for the Material Variants(materials in the OMEN format),
directories holding any of the previous assets.
Two buttons on the bottom ("<" and ">") enable you to switch between the selected options. Caution : using these buttons, the current state of the GameObject will not be saved and will be overridden.
Each Variants component contains a field to define the list of possible options : materials, setups, ies files, directories, geometries, environments.
The Transform Variants also contains an "Add Variant" button. This button creates a new variant with the current GameObject's Transform.