Unreal Marker

Introduction

The overall introduction are in the Marker chapter of Tutorial for MR Contents .

Note

The Marker feature is current in Beta.

In Unreal, the marker relative functions are provided by Blueprint and C++ header. Based on your design, you can choose one method of them to make your project. We use blueprint to make our Unreal sample, and it may be more familiar to most of Unreal developer.

In the next section, we will introduce the blueprints and the basic workflow. We will also show some tools and tips for you.

After your survey this introduction, you can also take a look of our practice in the sample levels:

  • Content/VRTestApp/MarkerTest/

In these level’s handle actors, they create the meshes according to trackable marker’s pose and size, and manager the tracking state of them.

Contents

Requirement

Uses Feature

If you want to use any Marker feature here, you need declare a <uses-feature> in AndroidManifest.xml. In Settings -> Plugins -> Wave VR page, check the Enable Marker will help you declare it.

../_images/Unreal_TrackableMarkerUseFeature.PNG

Check Supported Feature

You can use Check Supported Feature to check if the Marker feature is supported.

../_images/Unreal_TrackableMarkerCheckSupport.PNG

Blueprint Functions

The functions here will list by order of usage. You can read it as a tutorial.

All Blueprint Functions

Here list all functions of trackable marker.

../_images/Unreal_AllMarkerAPIs.PNG

Marker Detection

If you want to track any new markers, the following blueprint shows the flow of start, detect, and stop.

We currently only support ArUco Marker as target.

../_images/Unreal_DetectionAndCreateTrackableForEachDetected.PNG

ArUco Marker Data

Use GetArUcoMarkers function to get the detection result. You need enter your tracking origin model and let the returned pose match it.

../_images/Unreal_ArUcoMarkerData.PNG

In the ArUco Marker Data struct:

  • Uuid The unique name generated by system for this marker. Used as the marker’s identification.
  • Tracker Id The ArUco’s id in 4x4 (100) dictionary.
  • Size The marker’s size in cm.
  • State The marker’s tracking state.
  • Position The marker’s position in tracking space.
  • Rotation The marker’s rotation in tracking space.
  • Marker Name The marker’s name set by developer.

These data will be cached by system, and the observer system didn’t update it every frame. If you get the data again in another frame, the same data might return. If you moved the marker, you should keep polling it until updated.

Create Trackable Marker

The detected markers can keep tracking its pose, but you need create it as trackable first. Call Create Trackable Marker and enter the Uuid and a random name. System will keep its tracking data.

Destroy Trackable Marker

Call Destroy Trackable Marker and enter the Uuid to free the tracking information in marker’s tracking system.

../_images/Unreal_DestroyTrackableMarker.PNG

Clear Trackable Markers

Call Clear Trackable Markers set all trackable markers non-trackable. Equals to Destroy Trackable Marker all Uuid s from Enumerate Trackable Markers .

../_images/Unreal_ClearTrackableMarkers.PNG

Trackable Marker

If not in detection mode, only the trackable marker will keep their tracking information in the system. Only the created trackable marker can be retrieved.

Here is the flow to start and stop the tracking of all trackable markers.

../_images/Unreal_TrackingAllTrackableMarkers.PNG

Use Enumerate Trackable Markers to list all you created markers. Start to tracking them by call Start Trackable Marker Tracking. Then monitor the marker’s tracking state by Get Trackable Marker State.

Tracking Data

The TrackableMarkerState has the tracking pose. If you want to known its tracker Id and Size. Use Get Ar Uco Marker Data to get it. Make sure he Target is ArUco Marker.

../_images/Unreal_TrackableMarkerData.PNG

Get Marker Observer State

Call GetMarkerObserverState when observer started to get the observer’s state. The state would be one of following value:

  • Idle
  • Detecting
  • Tracking
../_images/Unreal_GetMarkerObserverState.PNG

Points to take note of and Known Issues

  1. It take a long time to detect and tracking.