Using the Windows Mixed Reality Platform
Here’s how to use Unity to see room-scale VR on the Acer MR Headset
As a long-time VR junkie (I own every Rift headset, from DK1 to Consumer), I was delighted to see another option appear, this time coming from my employers (a.k.a. Microsoft). These Windows Mixed Reality headsets (not Augmented Reality headsets, like the Hololens) have several very cool features, including the high-resolution display, and the built-in “inside out” motion sensors that do away with the need for additional cameras or sensors to get room-scale motion working. They were available to pre-order for several months, but at the time of writing, they seem to be sold-out.
Note: I am not on on the Microsoft AR/VR team, but I know people who are, so I can get your questions to them. This also means this is not official Microsoft documentation on MR development — it’s just my experience, as a VR fan.
Here’s a quick-and-dirty guide how I got the Acer headset up and running with Unity.
Install, install, install
First, make sure you have a Windows 10 PC, with a GTX 960 or better graphics card, and USB 3.0 port. You’ll need an Xbox One controller too. Full requirements are listed here.
Then update to a Windows Insider flight.
You will then install a Beta version of Unity, from the Unity site.
Be sure to include the Windows Store optional extras from the Unity installer, as you will be building UWP apps later on. The Microsoft Mixed Reality platform is based on UWP apps (yes, this means you can also run ordinary ‘flat’ UWPs apps inside your headset). Select Vuforia support too.
Part of the installation process will also include Visual Studio Community edition. You may need to go back to the Visual Studio installer and make sure the Universal Windows Platform Development tools, and the Desktop Development with C++ tools are included.
Now you’re ready to connect your headset to your PC. You’ll need to hook up the HDMI connection (here’s hoping that if you are already using a monitor that it’s connected via a Display Port or DVI connection). The other connection is to a USB 3.0 port. It must be USB 3.0, as there’s a lot of data coming through those wires.
Setting up the Mixed Reality Portal
Did you know Windows 10 already includes a Mixed Reality Portal app? You might have missed it, but it’s been there for a while now, just waiting for you to connect your shiny new headset. (If you don’t have a headset yet, there’s an emulation mode).
The portal should launch automatically once the headset is connected. If not, make sure you are running a recent Windows Insider flight, and try disconnecting and reconnecting the headset. All being well, your headset will be detected and start working right away — you should be able to start looking around a relaxing, Matrix-style space.
The portal has a menu option called Run setup, and this is important because it’s here you train the headset using the size of your room. You’ll be guided through defining your height and the perimeter of your surroundings: you must complete this to use room-scale VR experiences. If you skip it, you can still use the headset but it won’t change your point of view as you walk around your room.
I found that the most reliable way to scan the room was to walk around the edge of my office quite quickly, holding the headset so that it always faced it into the center of the room. With practice, I could do it in less than 10 seconds assuming I didn’t get the wire tangled around a chair / my legs / a cat.
Once the scan is complete, you’ll find you’re no longer in the Matrix, but in a fancy house on the edge of a cliff. It’s worth spending some time just looking around, and using the Xbox controller to see what you can get up to. You can even launch apps by making the pop-up Start menu appear — just press the XBox button on the controller. Your gaze is your mouse pointer, and the controller is the “click”.
Coding!
Now for the fun stuff: creating your own Virtual Reality experiences. Microsoft has worked closely with Unity to make this amazingly quick and relatively painless.
With your headset connected, start a new Unity project, and add a 3D GameObject — say a cube — and click on Play. Immediately you’ll spot that.. nothing has changed. What gives? Well, Unity doesn’t yet know you’re planning on making a VR app. Let’s tell it.
From File > Build Settings, make sure Universal Windows Platform is selected and then click on Switch Platform. Don’t forget the Switch Platform button, it’s easy to do.
Next click on Player Settings, and a new panel will appear in the Unity interface to the right. Under XR Settings, make sure the Virtual Reality Supported box is checked. You’ll see Windows Mixed Reality is listed.
Close the Build Settings, and click Play again. Now you’ll see that Unity is displaying the view from your headset. In fact, put the headset on, and you’ll see the view change as you move your head!
This is cool, and in fact, it’s genuine VR, baby! It’s just not room-scale VR. If you walk around, the view doesn’t change to reflect your position. You can’t walk up to the cube, and see the other side. However, it’s still perfectly good for many VR games and experiences.
Hmm. Wouldn’t it be cool to walk around a little though? Here’s how I did it.
Note: Before you can walk around in your Unity app, you must complete the headset Set Up process and scan your room.
Let’s take that cube and make it so you can walk around and examine from all sides. Adjust it’s location to be at (1,1,1) rather than the default (0,0,0). If you keep it at (0,0,0) you won’t be able to see it as you’ll be inside it. Yes, VR gets weird.
Then click on Add Component for that GameObject, select AR and finally World Anchor. When this component is attached to an object, it’s literally anchored in space.
Play your app: suddenly you are standing right beside that cube! And yes, you can walk around it, and see what’s behind it (nothing at the moment!). You might want to change the scale of the cube (the default is 1 unit by 1 unit by 1 unit, which is 1 meter by 1 meter by 1 meter, bottom line: it is quite large). You might also want to turn the camera’s Clear Flags from Solid Color (black) to Skybox to give things less of a void-like feel!
There are some great SkyBox textures (and of course models) to populate your new Virtual World in the Unity Assets store: the little video clip above demonstrates what I did in five minutes. Just remember that every new model you add must have the World Anchor component added.
For more details, go to the Windows Mixed Reality developer site. You can order the Windows Mixed Reality developer devices on the Microsoft Store now.