Start a new topic

Pause AR Tracking to improve performance

Hello,


I'm using the Wikitude 9 plugin for Unity with AR Foundation. I'm working with Unity 2019.3, AR Foundation 3 with AR Kit 3 and AR Core 3.


For my app, I am detecting images and 3D objects targets to compute the relative position of the device to these targets. When the camera is not moving a lot, I would like to disable the trackers in order to save battery and CPU use. Reading other posts on this forum, I have looked into two options :




- one of the posts uses Cordova and you advised the user to disable the camera to stop the trackers but since I use Wikitude as a plugin, I believe the camera is handled by AR Foundation and disabling it would also pause all the rest of the tracking including the device's position in the world. This is not what I want because I only want to pause the Wikitude trackers.



- I have also tried disabling / renabling the trackers using the .enable=true/false property but for the object trackers, renabling it takes around 10 to 12 seconds and causes a large spike of memory use because I use a fairly large WTO file as a reference library. Same thing happens when I use GameObject.SetActive(true/false).




The second option seems more suited to my problem but the loading time of the WTO is really problematic. Is there any way of pausing the trackers without unloading the target collections from the memory?


Thank you for you help,


Arthur


That is a very good feature request. We will try to include it in the next release in approximately a month (so that disabling/enabling a tracker doesn't trigger a target collection reload).


There might be a workaround though. Disabling (and re-enabling) the WikitudeSDK script on the WikitudeSDK GameObject (in Expert edition) might also do the trick.


Kind regards,
Gökhan


2 people like this

Hi,


Temporally pausing wikitude, and only rely on ARKit / ARCore for a particular part of the AR experience, would be very interesting indeed. That would help to enhance performance & battery consumption.


Amaury.



1 person likes this

Hello Gökhan,

Thank you for your answer and your consideration.

Unfortunately, the workaround that you're suggesting has the same result as deactivating the trackers directly. The reference libraries are loaded/unloaded upon each activation/deactivation which takes up to 10-12 seconds for large WTO trackers.

I look forward to the next release.

Best regards,

Arthur

Login or Signup to post a comment