documentation

HoloLens Poster Tracker Tutorial

Level: Basic

Tracking with the VisionLib SDK also works on Microsoft HoloLens. This tutorial will show you how to use and customize our HoloLens poster tracking example scenes in Unity. We recommend testing your poster in the general smartphone/tablet tutorials before moving to HoloLens.

Preparation

Please ensure you have installed the required tools and adjusted the settings for HoloLens and Unity Development:

  • Windows 10, Windows 10 SDK, Developer Mode activated
  • HoloLens with activated Developer Mode
  • Visual Studio 2017 (with UWP Tools installed) or higher
  • Unity with IL2CPP Scripting Backend

Set Up the Unity Project

  1. Download the current VisionLib.SDK-Unity package from the customer area
  2. In a new Unity project, import the VisionLib.SDK-Unity.tgz as well as the VisionLib.SDK.HoloLens-Unity.tgz via the package manager.
  3. Import the VisionLib.SDK.HoloLens.Examples-Unity.unitypackage via Assets > Import Package > Custom Package.
  4. Copy your license file to Assets/StreamingAssets/VisionLib.
  5. Open the HoloLensPosterTracking example scene in Unity from VisionLib HoloLens Examples/PosterTracking

If you intend to use the default leaves poster, you can skip directly to Deploying to HoloLens.

Track your Own Poster on HoloLens

After you verified that tracking of your poster 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.

  1. Copy your image to the StreamingAssets/VisionLib/Examples/HoloLens/PosterTracking folder of your project.
  2. At the same location, make a copy of HoloLensPosterTrackingConfiguration.vl and adjust it:
    • Rename the file
    • Open it with a text editor and change the attribute imageURI from LeavesPoster.png to the filename of your own image (e.g. "test.jpg").
      Retain project-dir: in front of the name.
    • Adjust the attribute realWidth according to the physical size of your poster in meters. The default value matches ISO A4 (210 mm x 297 mm).
  3. Also make a copy of the Unity scene. There, reference your tracking configuration and license file in the TrackingConfiguration component of the VLTracking GameObject.
  4. Find and select the GameObject PosterQuad (as a child of SceneContent/Augmentation) in the hierarchy and enter the scale of your physical poster in meters in the transform component of the GameObject.
  5. If you would like to see a digital debug image of your poster (like the pink one in the picture below) copy your image to the Materials folder. Select the LeavesPoster material in VisionLib HoloLens Examples/Common/Materials in Unity's project panel and change the Albedo map to your image.
    If you do not want a debug image to be shown, disable the Mesh Renderer component of PosterQuad.
  6. Insert the 3D content that you would like to associate with the poster into the hierarchy as a child of the Poster_Content GameObject.
  7. To deploy this scene to HoloLens, please continue with Deploying to HoloLens.