vuforia-engine
vuforia-engine copied to clipboard
Possibility to stop / reset all AR tracking features while still using the Vuforia Camera for video capture, to save performance and battery life
Describe your feature Hello, I have been working on the Vuforia integration on our project for some time now, and I have questions regarding the continuous use of tracking features of Vuforia. In our project, the user can choose between using Image Targets, Ground Plane, or nothing (only using the camera to render the video).
However, we noticed that as soon as the Vuforia Camera (Vuforia Behaviour) is enabled, the system starts trying to detect features and tracking in the video (the Android's Logcat console is flooded with messages, probably coming from ARCore ?), even if all AR-related objects (Image Target, Plane Finder, Observers...) are disabled in the scene. The same goes after using a particular AR Mode, for example Ground Plane, then disabling it, Vuforia will keep trying to track the World and Targets even if their objects are disabled in the scene.
This raises a big concern about battery life and performance that might be negatively impacted even if the user does not want to use any AR feature.
P.S: we still want to use the Vuforia Camera to render the video when not using any AR feature for multiple reasons: smooth transition between AR / no-AR, code maintainability...
Use-case description Applications where the AR features are not always required.
Business impact
Workaround
Additional context
Hi @tsoen, I totally understand your concerns and have asked our team for clarification. Thanks.
On Android devices supporting ARCore we use the ARCore camera API which automatically enables the device tracker on initialization and there is no API to disable it. A pause session API exists in ARCore but this also pauses the camera feed.
A possible workaround would be to switch between the PLATFORM fusion provider and the VUFORIA provider. The second uses the standard Android camera and thus does not initialize ARCore tracking. Note that switching requires deinitializing and reinitializing engine and is not an instantaneous operation.
I link below the reference to the relevant VuforiaProviderOption:
https://developer.vuforia.com/library/sites/default/files/references/unity/group__VuforiaApplicationGroup.html#ga247a4d24f56f9b41c42bbf8c78c8a554