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.
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:
HoloLens2ModelTrackingSetup
scene and import your object.GameObject
VLMiniCar
(under MixedRealitySceneContent > VLSceneContent
in the scene hierarchy) with your model.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. 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).The default init pose does not work for all objects and generally requires adjustment. For details see Setting an Init Pose.
Deployment and starting of a scene on HoloLens is described in the general tutorial (see HoloLens Model and Poster Tracker Tutorial).
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.
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.
To make use of the saved vl-file in your own scene you have to do the following steps:
Internal Storage/Videos/Captures/VisionLib/savedTrackingParameterConfiguration.vl
into the StreamingAssets
folder of your Unity project and give it an adequate name.MixedRealitySceneContent > VLSceneContent
GameObject..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.