This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated.
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 as 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.
STATIC works best with objects that are immobile, such as cars and large machinery.
Select the ADAPTIVE motion hint if you expect the object to be moved while tracking. 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. ADAPTIVE 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 Type tab.
Select one of the following model types from the 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. In particular, this mode improves recognition for Model Targets created from 3D scans that include a texture. For untextured scans, this mode will not have a strong effect.
NOTE: If the scan includes a photorealistic texture, make sure to select the Realistic Appearance Mode before training an Advanced Model Target database:
Also note that selecting the 3D Scan 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 defaults to Tracking Mode DEFAULT.
For applications that are migrating to recent Vuforia Engine versions, it is recommended to set the Tracking 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:
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.