Step 1: Setup the SDK plugin in Unreal¶
If you have not already done so, please install the plugin as explained here Get Started.
Step 2: Install Blender¶
Blender is used to reduce the geometry of the scene. This can dramatically reduce the load time of your scene at SceneExplorer.com. Blender is free and open source.
Simplygon is another tool to reduce your scene's geometry, but we do not automate and support this at this time.
Step 3: Export the scene¶
This process and interface will change in upcoming patches.
Open Project Settings... and scroll to the cognitiveVR settings near the bottom.
Use this popup will tell Unreal where the Blender.exe is located. If Blender was installed into Program Files, this may be completed automatically.
Select Export Meshes¶
Press this button to select all static mesh objects. There are options above, but the defaults should be fine for most projects.
- Min Polygons sets the lower threshold for meshes with few than this many faces. By default, meshes with <500 polygons are not reduced
- Max Polygons sets the upper threshold for meshes with more than this many faces. By default, meshes with >20000 polygons are reduced to 10%. Between these two thresholds is a linear scale of the amount the meshes will be reduced
- Static Only selects only non-movable actors. This is usually the correct behaviour
- Increase the Minimum Size option to ignore any small detail meshes you might have
- Maximum Size allows you to ignore any massive meshes you have, such as skyboxes
- Texture Resize Factor reduces the resolution of your textures. 2 reduces the resolution to half. 4 reduces the resolution to a quarter. This should be a power of two greater than zero.
Select any other meshes you wish to export. Text meshes are known to not work. See Troubleshooting if you need to export Geometry Brushes (BSP).
Change the export option to .obj and select a new empty folder. Press YES to export materials.
You should have a folder with
Export Transparent Textures¶
This will export diffuse textures used in materials that support transparency. Specifically, this will export textures connected to the BaseColor property in materials NOT set to Opaque Blend Mode. This functionality may be merged into the Export Selected and Export All buttons eventually.
This will run a python script within Blender to reduce the geometry. This will output a smaller version of the obj.
This will also run a python script in Blender. It will downsize textures and save them as pngs.
This script will also remove the folders with the _old suffix so these original assets are not uploaded to SceneExplorer
This step will take all the files in the Export Directory and upload them to SceneExplorer. This process may take some time. When it is complete, there should be a Log in the Unreal Editor Console indicating a success.
Copy this into the SceneData array in Project Settings. This value is the SceneKey and identifies where to send collected user data.
Step 4: Attach Player Tracker¶
The Player Tracker records where the HMD is positioned and the point the HMD is looking towards.
- Add the PlayerTracker component as a child actor to your character's camera
Step 5: Send Data¶
Transactions, Gaze and Sensor data can be automatically send to SceneExplorer when enough 'snapshots' of each have been collected. In the cognitiveVR Settings you can adjust the threshold of snapshots to send.
Sending player data to SceneExplorer can also be done manually using Flush Events. This is recommended when closing your application.
The Flush Events blueprint node will upload saved player data to SceneExplorer.
This example shows how to Flush the player's data to SceneExplorer 10 seconds after the level has begun.
To send the collected player data using C++, use this code:
TSharedPtr<FAnalyticsProviderCognitiveVR> cognitive = FAnalyticsCognitiveVR::Get().GetCognitiveVRProvider(); cognitive->FlushEvents();