documentation

Workflow for Setting Up The Model Tracking on HoloLens

Level: Basic

This section outlines a workflow allowing you to customize the tracking parameters for a new model on HoloLens and consequently use these parameters in your own application. Each step in the workflow is described in its own subsection in the following.

Replacing the Model in the Tracking Setup Scene and the Corresponding vl-File

As a first step, you must add the model you intend to track to the HoloLens2ModelTrackingSetup scene and make it usable as a tracking target:

  1. Open the HoloLens2ModelTrackingSetup scene and import your object.
  2. Replace the GameObject VLMiniCar (under MixedRealitySceneContent > VLSceneContent in the scene hierarchy) with your model.
  3. Select the GameObject MixedRealitySceneContent/VLSceneContent and press the button "Add TrackingMesh components to all models". This will mark the meshes of the model to be used by VisionLib tracking.
  4. Ensure the GameObject with your model is enabled at all times, keeping it visible and available as a guide, both for tracking as well as for adjustment of the initial pose (see the following section).

Adjusting the Init Pose

The default init pose does not work for all objects and generally requires adjustment. For details see Setting an Init Pose.

Deploying and Starting the Scene on HoloLens

Deployment and starting of a scene on HoloLens is described in the general tutorial (see HoloLens Model and Poster Tracker Tutorial).

Adjusting the Parameters

Having started the scene, look at the palm of your hand. In the menu, press the Parameters On button. Adjust the parameters so the tracking of your object works well. Our Optional Tracking Parameters page gives an overview over these parameters and their function.

Saving the Current Configuration

After you finished adjusting your parameters, look at the palm of your hand again. In the menu, press the Save Configuration button. A notification appears after the configuration has been saved.

Copying the Saved vl-File to a New Scene

To make use of the saved vl-file in your own scene you have to do the following steps:

  1. Open the HoloLens file system via the Windows explorer.
  2. Copy the file Internal Storage/Videos/Captures/VisionLib/savedTrackingParameterConfiguration.vl into the StreamingAssets folder of your Unity project and give it an adequate name.
  3. Drag the model into the hierarchy of your scene as a child of the MixedRealitySceneContent > VLSceneContent GameObject.
  4. Reference the .vl file in the VLTracking > TrackingConfiguration script under the Tracking Configuration File parameter.

For details on setting up tracking for your own model on HoloLens see Deploying to HoloLens.