Tracking with the VisionLib SDK also works on Microsoft HoloLens. This tutorial will show you how to use and customize the HoloLens model tracking example scenes of the VisionLib SDK in Unity.
We recommend testing the tracking on your own model in a basic (non-HoloLens) project before moving on to HoloLens. You may want to use our ModelTrackingSetup
example scene for this purpose (see Using the Model Tracking Setup Scene). This scene offers specialized troubleshooting and tracking parameter setup functionality.
For more information on how to optimize your VisionLib HoloLens Tracking, please refer to HoloLens Optimizations.
Please ensure you have installed the required tools and adjusted the settings for HoloLens and Unity Development:
VisionLib.SDK-Unity
package from the customer areaVisionLib.SDK-Unity.tgz
as well as the VisionLib.SDK.HoloLens-Unity.tgz
via the package manager.VisionLib.SDK.HoloLens.Examples-Unity.unitypackage
via Assets > Import Package > Custom Package
.Assets/StreamingAssets/VisionLib
.VisionLib HoloLens Examples/ModelTracking/Scenes
If you intend to use the VisionLib mini car model, you can skip directly to Deploying to HoloLens.
After you verified that tracking of your object works in general, you can try out the tracking on HoloLens. Follow the steps in this section to set up a separate scene with your specific content.
TrackingConfiguration
component of the VLTracking
GameObject.Copy your model into the Models
folder of your Unity project. Drag it from the project panel into the hierarchy of your scene as a child of the GameObject SceneContent/TrackingAnchor
and remove the mini car model.
Important: The metric
of the provided 3D model is very important in HoloLens scenes. The metric
describes the length of one unit in model dimensions. HoloLens itself uses a world defined in meters
. Your model must also be defined in meters
! If the 3D model is scaled for a different unit, the interaction between the VisionLib SDK and HoloLens does not work properly. If you are unsure about the metrics of your 3D model, please see Mandatory Initial Parameters for help.
SceneContent/TrackingAnchor
and press the button "Add TrackingMesh components to all models". This will mark the meshes of the model to be used by VisionLib tracking. Center Object in Slam Camera
button on the GameObject SceneContent/TrackingAnchor
. This will center your object in the view of the Camera which is used to initialize the tracking.SceneContent/TrackingAnchor
GameObject. For more information, see Setting an Init Pose.