Setup

Note

This section assumes you know the hardware requirements and features of the Vive Hand Tracking SDK. Please read Vive Hand Tracking SDK Overview section before this section.

Vive Hand Tracking SDK provides an Unity3D plugin as a unity package. You can import the plugin in Unity3D from Assets -> Import Pacakge -> Custom Package… Menu. Samples are included in the plugin. Please refer to the test scenes in Assets\ViveHandTracking\Sample folder for samples.

  • Minimum supported Unity3D version is 5.4, including all 5.5, 5.6, 2017, 2018 and 2019 series.
    • Plugin is tested on Unity3D 5.6.4p3 and 2017.4.16f1
    • Unity version 5.4 and 5.5 series are not tested, though the plugin should work
    • A Unity version that supports Android ARMv8 library is required if you what to use ARMv8 version of Vive Hand Tracking SDK
      • This means Unity 2018 or later, plus Unity 2017.4.16f1 or later
      • ARMv8 version is preferred over ARMv7 version if possible

Based on different platform, process of setup may be different. Please refer to the sections below to setup each platform you use.

Windows

Note

SteamVR disables camera by default. This means a fresh installed SteamVR cannot use Vive Hand Tracking SDK without manual setup. See Camera Setup in SteamVR for how to setup SteamVR and check camera availability before using Vive Hand Tracking SDK.

  • Make sure OpenVR is loaded as current VR before start detection.
    • Goto Player Settings and set VRSettings (5.x) or XRSettings (2017+) to include OpenVR.
  • SteamVR plugin is NOT required for the plugin to function.
  • The library DLL requires Microsoft Visual C++ Runtime 2015
  • Make sure to test camera frame rate in SteamVR settings before start application.

Note

Starting from Unity 2018.2, Unity ships an OpenCL.dll in its installation, which might not work with some graphics drivers. If you encounter OpenCL error when running inside Unity editor, please consider upgrade your Unity to 2018.3.3f1 or newer, which seems to include fix for this related issue. Alternatively, you can remove the OpenCL.dll which is in the same folder with Unity.exe.

WaveVR (Vive Focus)

  • You need to import WaveVR SDK v2.1.8 or later into your Unity project
  • Camera permission declaration and request are handled in the plugin using WaveVR API.
  • Both ARMv7 and ARMv8 binaries are provided in Vive Hand Tracking SDK. The binaries are selected by Unity based on your actual archietecture setup in PlayerSetings.
    • WaveVR 3.1.1 or later is required for ARMv8 support.

Android Phones

  • The android phone library works for non-VR, Cardboard and Daydream.
  • The native library is tested on Pixel.
  • Camera permission declaration is included in plugin.
  • Camera permission runtime request is not included in the plugin. You need to make sure camera permission is granted before starting detection.
    • The runtime permission on Daydream is handled using GoogleVR plugin.
    • For Unity 2018.3+, camera permission is handled using Android runtime permission API
  • Both ARMv7 and ARMv8 binaries are provided in Vive Hand Tracking SDK. The binaries are selected by Unity based on your actual archietecture setup in PlayerSetings.
  • The app must be in landscape left orientation.

Selecting Android Binary (Advanced Users Only)

Vive Hand Tracking SDK provides different binaries on Android for Android phones and WaveVR platform. This is due to using different APIs to get camera frames, which requires different native libraries.

Note

Skip this section if you don’t plan to build both Android phone and WaveVR binaries from the same project.

Editor scripts in Assets/ViveHandTracking/Editor folder are used for easier Android binary selection. The scripts detect if WaveVR plugin is imported in your project to decide which binary is selected at build time. This should be enough for most use cases, unless you want to support both Android phones and WaveVR in the same Unity project.

You can manually control the process by modifying/removing the two scripts to suit your need. Required steps for each platform are listed below.

  • If you need to build Android phone app:
    1. Enable Assets/ViveHandTracking/Plugins/Android/libs/armeabi-v7a/libaristo_interface.so and Assets/ViveHandTracking/Plugins/Android/libs/arm64-v8a/libaristo_interface.so
    2. Disable Assets/ViveHandTracking/Plugins/Android/libs/armeabi-v7a/libaristo_interface_wavevr.so and Assets/ViveHandTracking/Plugins/Android/libs/arm64-v8a/libaristo_interface_wavevr.so
    3. Remove VIVEHANDTRACKING_WITH_WAVEVR and VIVEHANDTRACKING_WITH_WAVEVR3 from Script Define Symbols in Android player settings.
    4. If you are using Daydream with GoogleVR plugin, add VIVEHANDTRACKING_WITH_GOOGLEVR to Script Define Symbols in Android player settings.
  • If you need to build WaveVR app:
    1. Enable Assets/ViveHandTracking/Plugins/Android/libs/armeabi-v7a/libaristo_interface_wavevr.so and Assets/ViveHandTracking/Plugins/Android/libs/arm64-v8a/libaristo_interface_wavevr.so
    2. Disable Assets/ViveHandTracking/Plugins/Android/libs/armeabi-v7a/libaristo_interface.so and Assets/ViveHandTracking/Plugins/Android/libs/arm64-v8a/libaristo_interface.so
    3. Add VIVEHANDTRACKING_WITH_WAVEVR to Script Define Symbols in Android player settings.
    4. If you are using WaveVR 3.x or later, add VIVEHANDTRACKING_WITH_WAVEVR3 to Script Define Symbols in Android player settings.
    5. Remove VIVEHANDTRACKING_WITH_GOOGLEVR from Script Define Symbols in Android player settings.