Optimizing Model Target Tracking

Vuforia provides ways to optimize tracking and in some cases also recognition performance on Model Targets that can be enabled depending on the use case. By adjusting the tracking mode and motion hint of your Model Target, you can specify the utilization of your AR application’s CPU usage as well as improving the tracking robustness. 

Model Target Motion Hint

Vuforia provides a STATIC motion hint, ideal for tracking stationary objects, that improves Model Target tracking. Setting the Model Target to STATIC optimizes device performance. This is because the tracker does not need to update the trackable position on every frame.

A STATIC setting allows for longer AR experiences and for less powerful devices, especially eyewear, to more efficiently run the application. This setting, however, only provides power savings when device tracking is activated.

The behavior of STATIC differs from ADAPTIVE. STATIC works best with objects that are immobile, such as cars and large machinery. If you expect the object to be moved, select the ADAPTIVE motion hint. Moving an object set to STATIC will likely break the tracking, forcing the user to wait for the object to be recognized again.

In ADAPTIVE mode, Vuforia Engine automatically selects the optimal tracking behavior, depending on the current situation. However, ADAPTIVE does not permit the same power optimizations compared to STATIC mode. As in previous versions, ADAPTIVE still only allows limited motion of Model Targets.

All Model Targets generated before the 8.5 release default to STATIC mode when used in Vuforia Engine 8.5 or newer.

In the Model Target Generator (MTG), the motion hint can be set to STATIC or ADAPTIVE. During the creation of a Model Target database, the MTG stores the value in a .xml dataset file. The motion hint value can be changed later in Unity or native.

To adjust the motion hint value in Unity, change the value in the Model Target GameObject component. For native development, declare the value through an API call.

For each platform, the following articles contain more detail on how to set the motion hint:

Platform Article
Model Target Generator How to Create a Model Target
Unity Introduction to Model Targets in Unity
Native development Model Targets API Overview

Model Target Tracking Mode

Model Targets can be configured in 3 different modes for different model types. Choose between modes that are optimized for different scenarios. Switch the mode for applications that tracks for example car exteriors or reflective objects where the user will inspect the object from different views, or for model targets created from 3D scans.

Choosing the right tracking mode for your use case can help reduce drifting of the digital content as well as improving the alignment between the Model Target and the real-life object. For Advanced Model Targets that are created from 3D scans, selecting the “3D Scan” mode can also improve target recognition.

Setting the Model Target Tracking Mode in the Model Target Generator

The Model Target Tracking Mode can be configured for each model in the Model Target Generator in the “Model Attributes” tab.

Vuforia Image

Select one of the following modes from the Tracking Mode dropdown menu:

  • The DEFAULT mode can be used in many scenarios and will deliver consistent tracking on a broad range of object types.
  • The CAR mode is useful for car exteriors and similar highly reflective large objects. It optimizes the tracking performance to reduce drift in certain situations at the cost of higher CPU load. For optimal performance on cars, we recommend using this mode together with the ADAPTIVE motion hint on more powerful devices.
  • The 3D SCAN mode should be set for model targets created from 3D scanned objects, e.g. if the model was created from scans with the Structure Sensor or using Photogrammetry.
    NOTE: If the scan includes a photorealistic texture, make sure to check the Realistic Appearance Mode before training an Advanced Model Target:

Vuforia Image

Also note that selecting this mode is only supported in the Model Target generator, this mode cannot be set or changed later in Unity or at application runtime.

All Model Targets generated before the Vuforia Engine 9.2 release default to Tracking Mode DEFAULT.

NOTE: The global MODEL_TARGET_MODE_CARS hint introduced in Vuforia Engine version 8.6 has been deprecated with version 9.2 and replaced with the per-model target setting described here. The global hint will be removed in a future Vuforia Engine release, until then it will override the per-model target DEFAULT setting.
For applications migrating to recent Vuforia Engine versions, it is recommended to remove the global hint and instead set the CAR mode in Unity or through a runtime API as described below.

Setting the Model Target Tracking Mode in Unity

In some cases, the Model Target Tracking Mode can also be changed after creating the model target database. Model Targets created with Mode DEFAULT can be changed to mode CAR and vice versa. Please note though that the 3D SCAN mode can only be set before creating and training a dataset. Therefore, this mode cannot be set or changed later.

In Unity, a dropdown is available in the Model Target inspector that can be used to select the mode for this target, if applicable:

Vuforia Image

Setting the Model Target Tracking Mode at runtime

Use the ModelTarget::setTrackingMode(TRACKING_MODE mode) API before activating the corresponding dataset to change the Model Target tracking mode for a particular target.
This runtime method is available both in the Unity C# scripting API as well as in the native C++ API.

Please note that the same restrictions apply as for changing the mode in the Unity inspector. Model Targets created with mode DEFAULT can be changed to mode CAR and vice versa, but the 3D SCAN mode cannot be changed or set at runtime.

Calling setTrackingMode with an incompatible mode or after the dataset has been activated will return false.