This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated. We recommend migrating to the Vuforia Engine 10 API before this page is removed in February 2022. The equivalent of this page or topic can be found here: Area Targets Test App User Guide.
To see and test the Area Target feature in action and try out your own scanned environment quickly, a pre-built Area Targets Test App for Android ARCore enabled devices is provided on the Vuforia download page. We also provide the same app as a Unity project for iOS/Android and HoloLens. The test app allows you to load your generated Area Target Device Databases and overlay outlines of the scanned space once localization occurs.
The test app supports adding multiple Area Targets onto the device’s SD card, each in their own unique folder under the folder AreaTargetData. You can switch between – or activate multiple of your Area Target databases in the menu settings of the test app. The test app can also be a good starting template for your Area Target projects.
In extension of the distributable Android application and Unity project app solution for Android/iOS devices and HoloLens, a Vuforia Area Target Creator App is available for iOS >devices with the LiDAR scanner. The Vuforia app lets you create, generate, and test Area Targets all contained in a single application. In addition, you may import other Area Target Databases into this app for testing as well. Visit Vuforia Area Target Creator app for more information.
If it so happens that you do not have access to the environment for testing your Area Target, you can instead use the simulation mode that is available in the Vuforia Engine SDK for Unity. See Unity Play Mode for more information.
Installing and Testing the Pre-built App on Android Devices
You can install the pre-built app vuforia-unity-android-areatargetstest-X-Y-Z.apk on an ARCore supported device by connecting the device to a PC with a USB cable, and then using the Android Debug Bridge (ADB).
- Connect the device to the developer desktop environment using a USB cable.
- Open a Cygwin bash shell or Windows Command Line and execute:
you will see:
List of devices attached [ID] device
If the device list is empty, or a given device is not listed, kill the ADB server by executing:
3.To install the application, navigate to the folder containing the downloaded APK (in our example, C:\Temp) and install APK using
$ cd /cygdrive/c/temp $ adb install vuforia-unity-android-areatargetstest-X-Y-Z.apk
NOTE: Make sure to install on the Android device’s SD card so the subsequent steps remain applicable.
As an alternative approach, you can copy the APK file to your device's Download folder and install it from a File Manager application directly onto the device.
- Start the app once, so it creates the default data directories. Close the app.
- Connect the device to your PC and add your folder(s) with the name(s) of your Area Target database(s) that you wish to test under the following directory: /sdcard/Android/data/com.vuforia.engine.AreaTargetsTest/files/AreaTargetData/YourAreaTarget/
NOTE: If the folder AreaTargetData does not yet exist, it must be created manually using the file explorer.
- Copy the following files that you have generated from the ATG and save them into the folder(s) created in the previous step.
- YourAreaTarget/YourAreaTarget.xml – Vuforia Dataset XML.
- YourAreaTarget/YourAreaTarget.dat – Vuforia Dataset binary container.
- YourAreaTarget/YourAreaTarget_occlusion.3dt – converted 3D model of scanned space. (Area Targets created before Vuforia Engine 9.7 contain instead a YourAreaTarget.glb).
Start the app again and choose the Area Target you wish to test by pressing the DataSets icon to access the menu and select the Area Target database you wish to test. When the Area Target is loaded, and the space is recognized, you will notice that the provided model of the scanned space is rendered as a white outline over the physical environment. We recommend providing similar or other shaders on the space, or gridlines on the floor as UX elements to provide feedback to the users indicating that tracking is present. See Using a Navigation Mesh with Area Targets and Using Area Targets in Unity for more information.
NOTE: If you instead receive a missing Platform Sensor Fusion message as depicted below, then your device does not support Area Targets. For Area Targets to work, you will need an Android device that supports ARCore or an iOS device with ARKit. The Close button will return you to the introduction screen.
Installing from Unity to iOS/Android
The Area Targets Test App is also distributed as a downloadable Unity project. Download and import the Unity package into an empty project that is set up with the Vuforia Engine. See here on how to do this. Build the app directly onto an iOS or Android device to quickly test your generated Area Target. Start the app once, so it creates default data directories. Close the app.
Use iTunes or another file explorer to create a folder named AreaTargetData in the app’s Documents folder.
Navigate to /sdcard/Android/data/com.vuforia.engine.AreaTargetsTest/files/ and create a folder named AreaTargetData.
Navigate inside the just created AreaTargetData folder and create folders named according to the names of your Area Targets. Proceed to copy the following files to the new folders:
- YourAreaTarget/YourAreaTarget_occlusion.3dt (YourAreaTarget.glb for Area Targets created before Vuforia Engine 9.7).
Start the app and access the menu by pressing the DataSets icon on the right. Select the desired database and wait for it to load. When the Area Target is loaded, slowly pan around the space to start recognition and tracking. You will notice that the provided model of the scanned space is rendered as a white outline over the physical environment when it is detected.
In cases where current view at the space does not provide enough visual features to establish accurate location, the outline is rendered as orange to indicate that tracking is only available as a limited pose. One should slowly pan around the space to resume accurate tracking, which is indicated by outline turning white again.
NOTE: It is often helpful to step a bit away from the scene and get more visual features in view to achieve first recognition and/or resume accurate tracking faster.
If you happen to completely lose tracking on an iOS device, e.g. after app pause and resume, the Test App will show a message and reset the experience after a given timeout so that you can recognize the target again. You can also choose to reset the experience anytime yourself by pressing the Reset icon on the right.
Multiple Active Area Targets
The Test App and your future applications can track multiple Area Target datasets simultaneously. Such a scenario is useful for tracking very large areas or if you wish to manage rendered augmentations based on active Area Targets. The image below demonstrates two active Area Targets where one target is tracked, covering the closer part of the hallway, and the second Area Target near the end of the hallway is in a limited state because it is too far to be accurately tracked.
Installing and Testing on HoloLens
Your Area Targets can also be tested on HoloLens devices by using the available Unity Project from the Vuforia Download page.
Execute the following steps to get started:
- Import the Unity package into an empty Unity Project that is set up with the Vuforia Engine and UWP platform.
- Build the project to your HoloLens device.
- Start the app once, so it creates the default data directory. Close the app.
- Connect to the device again and use File Explorer to navigate to: User Folders\LocalAppData\AreaTargetsTestHoloLens_<version>\LocalState\AreaTargetData\Dataset_X\
NOTE: The folders Dataset_[X] is where your generated dataset files should be individually placed into.
- Take your generated dataset outputs and copy them to one of the folders. Each Dataset_[X] folder should only contain one dataset consisting of the files listed below:
- YourAreaTarget.xml – Vuforia Dataset XML.
- YourAreaTarget.dat – Vuforia Dataset binary container.
- YourAreaTarget_occlusion.3dt – converted 3D model of scanned space. (Area Targets created before Vuforia Engine 9.7 contain instead a YourAreaTarget.glb).
Start the app from the HoloLens’ menu and your available Area Target databases will automatically appear as a list.
- Dark grey indicates that a dataset is registered.
- Green indicates the active datasets.
- An empty circle indicates that no dataset was found in that registry.
Activate one or more of your datasets and look around with your HoloLens in the environment to start tracking. Take a step or two in case tracking does not start immediately. If tracking has been established, you will see an outline rendered on-top of the environment as well as a notification window stating which dataset was activated.
You can use a set of specific voice commands to control and activate your Area Targets on the HoloLens devices. Below is a list of available voice commands and their function.
|Show List||Renders the list of datasets that you can choose to activate/deactivate|
|Hide List||Hides the list of datasets.|
|Activate Dataset [X]||Activates the dataset where X is a number between 1 and 9. A confirmation will appear in your view when the dataset is activated and tracked.|
|Deactivate Dataset [X]||Deactivates the dataset where X is a number between 1 and 9. A confirmation will appear in your view listing the deactivated dataset.|
|Reset||Resets all Trackers.|
Exits the application.