You can define different configurations for your scene and switch between configurations at runtime using the "UVR Picker" components. The pickers are components that list a set of options for an element in the scene, the available pickers are :
UVR Material Picker : to change the materials of a Mesh Renderer,
UVR Skybox Picker : to change the skybox of a Camera,
UVR Geometry Picker : to change the mesh of a Mesh Filter,
UVR Setup Picker : to activate/deactivate GameObjects in the scene,
UVR IES Picker : to change the IES file of an Area light with a Photometric EDF,
UVR Display Picker : to change the directory holding the measure of an Area light with a Measured Display EDF,
UVR Transform Picker : to change the transform of a GameObject.
The UVR Picker components can be instantiated/added in the scene via the “GameObject/PredictiveSuite/Engine/Scenarization” menu.
Apart from the materials or the camera transform that can be edited interactively, the Predictive Engine scene must be reloaded every time the Unity scene is edited by script, manually or using a picker. The reloading of the Predictive Engine scene is automatically performed if the "Auto Reload" option is enabled in the preferences, or by the picker when you pick a new option.
Pickers 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 pickers, the geometry for the Geometry and Material picker, the camera for the RGB Environment picker.
The Material Picker 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 picker. See example 1 bellow.
The Setup Picker can be placed anywhere in the scene.
Example 1 : consider a Material picker placed on the "Spheres" GameObject.
Concerned Meshes = "This Game Object" : the Material Picker will affect the "Spheres" GameObject only,
Concerned Meshes = "This Game Object And All Childs" : the Material Picker will affect the "Spheres" GameObject and all three child GameObjects,
Concerned Meshes = "Childs Only" : the Material Picker 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 an Setup Picker or an Geometry Picker.
On every picker :
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 picker 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 picker,
directories for the Display EDF picker (main directory holding the "red", "green" and "blue" directories),
*.ies files for the IES picker,
*.xml material files for the Material Picker (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 picker contains a field to define the list of possible options : materials, setups, ies files, directories, geometries, environments.
The Transform Picker component is a little bit different from the others : the possible options can be defined either with a list of Transforms (Definition = "List") or by a parent GameObject (Definition = "Parent"). If the options are defined by a parent GameObject, the list of options will be made of all direct child Transforms of the parent (not the parent itself and not the indirect childs).
The Transform Picker also contains an "Add Target" button. This button changes the Definition to "List" and create a new target with the current GameObject's Transform.
When drawing an in game interface for the picker (see section bellow), icons are required to represent each possible option. The materials' and the RGB environments' icons are computed automatically from the asset. For other pickers, icons must be given for each option and the picker contains a field to define these icons.
To be able to call the pickers from within the application (using the engine overlay), you can add an in-game interface for your pickers. Prefabs with basic in game interfaces are available by right-clicking on the GameObject holding the Picker in the Hierarchy tab and selecting the "PredictiveSuite/Engine/UI/Arrows Picker UI" or "PredictiveSuite/Engine/UI/Side Picker UI" menus.
The Arrows Picker UI prefab draws arrows on the side of the screen to switch between the picker options, and dots on the top part of the screen to see which option is currently selected and access quickly every possible option.
The Side Picker UI prefab draws a side window with the picker name and a button for each option. The option currently selected is highlighted.
The icons for each options of the picker can be defined in the Icons field of the Picker (see section above).
If you edit the Picker options, the drawer will not be automatically updated. The drawer will be re-initialized when the application is started or if you call the "Initialize" button in the drawer interface.
You can place the UVR Picker Drawer component anywhere on a custom canvas of your own and set it manually. The UVR Picker Drawer fields are the following :
Picker : the Picker component to draw,
Previous button : (optional) UI button to switch to the previous picker option,
Next button : (optional) UI button to switch to the next picker option,
Buttons parent : (optional) GameObject that will hold the buttons to select each option,
Use Icons : (Buttons parent not null) defines whether the buttons for each option contains the option icon or a custom sprite,
Buttons Sprite : (Buttons parent not null and Use Icons is false) the custom sprite used on each option's button,
Unselected Option Color : (Buttons parent not null) multiplicative colour for the unselected options' buttons,
Selected Option Color : (Buttons parent not null) multiplicative colour for the selected option's button,
Title : (optional) UI text containing the name of the picker.
Drawer set up for an arrows picker UI
Drawer set up for a side picker UI