As the VR industry starts to grow, people are exploring new capabilities with VR technology. One of the key limitations is generally the systems are designed to track a single user within a small space (typically 4m x 4m).
An exciting new area is solutions that enable tracking multiple people in much larger spaces for a collaborative VR experience, and also the ability to track physical objects in that space. This kind of spaces are popularised by The Void and Zero Latency.
One strong vendor providing optical tracking solutions is Natural Point with the OptiTrack product set. Natural Point is the same company that brought us gamers the innovative TrackIR 10 years ago for a new way to interact with first person games.
Today, I’m going to look at one of the OptiTrack starter solutions for VR tracking spaces with a combination of hardware and software.
A key benefit of OptiTrack, over other systems such as the Vive Lighthouse system, is that OptiTrack uses passive markers which are inexpensive, completely wireless and requires no charging.
The OptiTrack Trio
I’ve just received the impressive single self-contained OptiTrack V120:Trio, as shown below:
Notable about the Trio is that it comes with 3 camera in a pre-configured arrangement that needs to calibration. You can plug it in and immediately start tracking objects in your space! The camera system runs at 120 FPS and the specs show a latency of 8.33 ms with Sub-millimeter accuracy.
A single Trio can track a volumetric space of around 3m x 4m from one direction – which isn’t much of an improvement over the Oculus constellation system and not as good as the Vive lighthouse – but you with OptiTrack you can expand the space by adding more cameras and calibrating them and OptiTrack provides an extensive range of cameras and mounting solutions.
The Trio is ideally setup for motion capture, but we’ll use it here to validate we can use the system for tracking.
I unpacked the Trio and set it up on a standard tripod mount. The trio comes with a decent length of cable that plugs into a small I/O breakout box which accepts power and a USB 2.0 output to a PC.
The Trio also comes with an assortment of passive tracking markers and mounts:
The first step is to download the OptiTrack Motive software, and install it.
Launch Motive, and you will see the Trio power up it’s beautiful IR (eyes) camera rings:
A simple quick test is to grab a marker and hold it in front of the Trio:
And in Motive (new default project) you will see the single marker being tracked by the Trio in real-time (LIVE mode):
As you move the marker around in front of the Trio it displays in Motive. By clicking on a marker in the Perspective View it will turn yellow (as above) and show the tracking paths from the cameras.
Creating 6DOF Rigid Body Markers
A single marker is not enough to track something in 6DOF space. You need at least 3 markers in a unique arrangement that Motive can remember and then detect that arrangement again in real-time.
Motive is able to detect both motion capture and rigid bodies. Motion capture, typically used in the movie and game industries, creates a skeletal rig from a series of tracking points on a motion capture suit.
For our application, we want to capture only rigid bodies – that is a single object that can be identified and tracked in space. We’re going to track first the rigid body we created in the above photo of the markers where we attached 3 or more markers together and then have Motive save that arrangement as our headset rigid body.
Here I have attached several markers so that it can be tracked from Motive. When held up in front of the Trio we see the points displayed in the Motive perspective view.
Using the mouse you can drag to select all the marker points, and then right click to create a rigid body from those points. It’s really that simple to create a trackable rigid body:
One you have created the Rigid Body asset(s) you can export them as a TRA file, which can then be reloaded for tracking these assets in the future (assuming the position of the markers does not change).
Rigid Body Streaming
Now, we want to stream the Rigid Body tracking position/rotation (6DOF) data into our Unity3d applications.
Generally, you’ll run Motive on a dedicated PC, loading the marker project to perform the tracking and then stream the data over the network. Motive supports several streaming protocols, which are their own OptiTrack protocol, the open source VRPN protocol, and Trackd.
The right one to choose depends on your application.
Initially, here we’ll use the OptiTrack streaming engine. This is the simplest to implement in Unity3d because OptiTrack have a Unity SDK with a sample project that is quick to test.
First, in Motive, you need to enable streaming. Do this via the menu View to display the Data Streaming panel. In that panel, checkmark the OptiTrack Streaming Engine Broadcast option. This will immediately start streaming data:
Special Note: The default option is to use Multicast, which for Unity3d applications on Windows works without any extra configuration. But if you are building for GearVR Android devices, you will need to use a native plugin to enable multicast support for your application.
Now, we switch to Unity3d and import the OptiTrack Unity SDK into a new project.
Download the SDK from http://optitrack.com/downloads/plugins.html.
Once you import it, you can open the sample scene: OptiTrackExample.
In the example you will find it by default is listening for data streaming on the OptiTrack streaming engine protocol. In the example, open the hierarchy under “Client – OptiTrack” and you will see a Sphere that is configured to track the rigid body marker configured with ID 1. In Motive, you can assign an ID number to any rigid body asset.
Here is the sphere in the example scene:
At this stage, simply press PLAY, and as you move the rigid body in your physical space in front of the Trio you will see the sphere move correctly in the Unity scene.
I used the OptiTrack V120:Trio hardware in this project:
I recommend the following article that Natural Point provides for using the OptiTrack Unity3d plugin: