User Tools

Site Tools


HTC Vive "Hello World" Tutorial

Author: Keitaro Nishimura Email: [email protected]
Date: 01/04/17
Keywords: Virtual Reality, HTC Vive, Unity, User Interface (UI)

This tutorial will guide the reader through the steps needed to create a unity project where they can pick up and throw, drop, and push a sphere around using the HTC Vive controllers, and how to set up a simple menu button that the reader can interact with using a laser point coming from the controller.

The steps for interacting with the sphere were adapted from the Vive Developer Mini Course and the laser pointer with the interactive button menu was done thanks to Brandon Hjelstrom.

Motivation and Audience

This tutorial is aimed at students who are interested in utilizing VR elements into their research or future projects. The readers of this tutorial will be expected to have had experience or interest in:

  • Virtual Reality
  • Coding
  • Gaming

However, this tutorial is made with beginners in mind. Thus, those inexperienced in any of these aspects are welcome to follow as well.

The rest of the tutorial will follow this order:

  • Bill of Materials
  • Initial Setup
  • Playing with a Sphere example
  • Using laser pointer and UI button.
  • Final Words

Bill of Mateirals

As stated in the title this tutorial will utilize the HTC Vive. Thus it is important to use a computer with the appropriate hardware specifications to power it. The minimum specs as of 01/04/17 are:

-Processor: Intel Core i5-4590 or AMD FX 8350 or better.
-Graphics: NVIDIA GeForce GTX 1060 or AMD Radeon RX 480 or better.
-Memory: 4 GB or more
-Video Output: 1 x HDMI 1.4 or DisplayPort 1.2 or newer.
-USB: 1 x USB 2.0 or newer.
-Operating System: Windows 7 SP1 or later.

For the most recent specs please visit the Vive website.
The computer used for this tutorial was an Alienware 17 R2 and was a little underpowered.

Initial Setup

For the initial setup, the reader will need to clear a relatively square space near their computer. Although there are no minimum space requirements it is recommended that the reader makes enough space to be able to take more than a couple steps in every direction. The space used for this tutorial is 2.5m x 3.5m (or~8.2ft x 11.5ft) and felt a little small.

Once space has been cleared, follow the instructions found in the Vive box and install the two sensors on diagonally opposing corners of the room. Making sure that the sensors can see each other. Although there isn't any need to place the two sensors at exactly the same height a large difference could affect the size of the playable area or the tracking of the headset or controllers. Also, make sure that the sensors are placed near outlets, the power cable can only reach so far.

Connect the Vive headset to the powerbox and the powerbox to your computer (taking care to connect the HDMI or DP into your graphics card) and outlet. Then download steam if you don't already have it on your computer. Open Steam VR and start the room setup and steam vr tutorial. If your headset doesn't connect to Steam VR just quit Steam VR and disconnect the power and USB from your computer and outlet to the powerbox. Wait a few minutes and reconnect the power and the USB into a different port. You may need to repeat this a few times until the headset is finally found by Steam VR. I would also recommend that you secure the powerbox onto your desk to prevent it from falling off due to the movement of the wire.

Once through with the setup, you can finally start with developing your own uses for it. Most people use Unity or UnrealEngine to develop for the Vive, with each having their own pros and cons. For this specific tutorial, we will be using Unity 5.5. However, after going through making this tutorial I may recommend using the UnrealEngine for further development. However, Unity is more than enough to get a taste of what is possible with the Vive.

Go download Unity from their website and be sure to download the personal version. Once done it is time to move on to the next step.

Playing with a Sphere example

Now that you have Unity downloaded make sure to go to the Asset Store within Unity to download and import the Steam VR plugin. This is the plugin that allows the semi-seamless development for the Vive through Unity.

htc_vive_hello_world.txt · Last modified: 2017/01/04 04:45 by keitaronishimura