Dynamic Objects

The Dynamic Object component allows you to track the positions and states of actors during the user's session. These can be used to track controllers, AI characters, interactive objects and even environments.

This page covers using the Dynamic Object component, Recording Engagements, Uploading meshes and Aggregating data.

Currently Unsupported

  • Visualizing material or texture changes on Dynamic Objects
  • Custom scale for Dynamic Objects in SceneExplorer
  • Display custom properties on Dynamic Object snapshots

Dynamic Object Component

dynamic

Buttons

  • Generate Mesh Name and Unique ID - Quickly set a Mesh Name from a Static Mesh Component on this actor. Also sets a unique Custom Id.
  • Take Screenshot - Takes a screenshot from the Unreal viewport to represent this mesh on the Dashboard.
  • Export Mesh and Upload - Export a Dynamic Object Mesh to represent this Actor on SceneExplorer and uploads that mesh to the current level (if the level has been uploaded to SceneExplorer).

Basic

  • Use Custom Mesh Name - Enables a mesh to represent this actor on SceneExplorer. See SceneExplorer below.
  • Mesh Name - The name of the mesh to represent this actor on SceneExplorer.
  • Track Gaze - Allows heatmaps to be generated on this object in SceneExplorer. This actor must have collision to correctly track the user's gaze on the object.

Advanced

  • Common Mesh Name - If you have not enabled 'Use Custom Mesh Name', you can select one of these common VR meshes. You do not need to upload this to SceneExplorer.
  • Snapshot On Begin Play - When BeginPlay is called on the component in Unreal, this will create a snapshot of the actor at the current position and rotation.
  • Snapshot On Interval - This will continually check if the object has moved and needs to create a snapshot to record the position and rotation.
  • Release Id on Destroy - Allow other Dynamic Objects to use this Id when this actor becomes destroyed. This can optimize performance on SceneExplorer and should generally not be modified.
  • Use Custom ID - This identifies a specific object.
  • Custom ID - This identifies a specific object.
  • Group Name - This identifies groups of similar objects.
  • Snapshot Interval - Used if 'Snapshot On Interval' is true. This is the delay in seconds before checking if the object moved beyond its threshold.
  • Position Threshold - Centimeters the object must move to write a new snapshot. Checked each SnapshotInterval.
  • Rotation Threshold - Degrees the object must rotate to write a new snapshot. Checked each SnapshotInterval.

Advanced Dynamic Objects

Custom ID

GUIDs are used to uniquely identify the same object across multiple session. These are set in the Unreal Editor. If you are spawning Dynamic Objects at runtime, a new Custom Id will be generated at runtime - data will not be aggregated because the Id will be different.

Group Name

Group Names are used to identify similar items. If you have a number of interactive products that share a Group Name, each will still behave as seperate unique objects. However, when you view heatmaps on any product, you can also see a heatmap aggregated from all products heatmaps.

Blueprint Reference

In most cases the options on the component will be sufficient. However, you can also send 'snapshots' of the Dynamic Object manually. This is mostly useful if you are not automatically updating the position and rotation using the SnapshotOnInterval option. This can also be useful if you are setting custom parameters before sending the first snapshot.

dynamic custom start

C++ Reference

//.h
#include "DynamicObject.h"

//.cpp
void AMyCustomActor::StartupComplete()
{
    TArray<UDynamicObject*> Comps;
    GetComponents(Comps);
    if (Comps.Num() > 0)
    {
        UDynamicObject* FoundComp = Comps[0];
        FDynamicObjectSnapshot snapshot = FoundComp->MakeSnapshot();
        FoundComp->SnapshotFloatProperty(snapshot, "initproperty", 5.0);
    }
}

Engagements

Custom Engagements allow you to record precise information about how a user manipulates the scene. An Engagement could represent a state such as grabbing an object, proximity to an object, or pointing at an object.

BeginEngagement and EndEngagement are static functions in UDynamicObject. They can be implemented using Blueprint.

dynamic engagement

Alternatively, you can implement Engagements in C++.

    UDynamicObject* dynamic = AActor::FindComponentByClass<UDynamicObject>();

    UDynamicObject::BeginEngagement(dynamic, "Grab");
    UDynamicObject::EndEngagement(dynamic, "Grab");

Engagement statistics are available on SceneExplorer for both aggregated viewing and session-by-session statistics.

engagement stats

SceneExplorer

Dynamic Objects on SceneExplorer

Each Actor with a Dynamic Object component needs a visual representation for SceneExplorer. Each Dynamic Object with a different Mesh Name is uploaded during the Scene Setup. You can add new Dynamic Objects, upload new meshes and replace existing meshes without uploading a New Scene Version.

Uploading Dynamic Meshes - Component

upload component

Using the Dynamic Object component, you can set automatically or manually set a Mesh Name. Taking a Screenshot from the Unreal Editor Viewport will allow you to quickly identify the Dynamic Object on the Dashboard. This screenshot is shared between all Dynamic Objects with the same Mesh Name.

Uploading Dynamic Meshes - Preferences

From the CognitiveVR section in Project Settings, the Dynamic Mesh Upload section has options to quickly export multiple Dynamic Object meshes.

upload settings

You can either Export Selected Dynamic Object Meshes, or Export All Dynamic Object Meshes.

Next is a list of directories - each holds the files of one exported mesh. This is useful for checking which Dynamic Object Meshes will be uploaded to your current level.

Upload X Dynamic Object Meshes to YourScene version Y will upload each the contents of each directory (that is, each exported Dynamic Mesh) to your level. This also happens automatically when you upload a New Scene or New Scene Version from the Cognitive Scene Setup Window.

Aggregating Data

Dynamic Object Gaze Data, and Dynamic Object Engagements can be aggregated per Actor across multiple sessions. This happens automatically based on a list of all Unique Dynamic Object Ids in the level.

upload settings

If you add new Dynamic Objects to your level, you should press Upload Dynamic Object Ids to SceneExplorer for Aggregation.