The (Almost) Perfect HoloLens Development Environment
The (Almost) Perfect HoloLens Development Environment
In true Microsoft fashion, the HoloLens is an incredibly interesting piece of technology that is hamstrung by a thick layer of jank smeared over the device and development process, especially for those on a Mac. After shaving numerous yaks that I thought I would never have to revisit (DirectX drivers? Really Microsoft??), here’s a relatively sane tutorial on getting your HoloLens environment and emulator up and running.
Hardware
- MacBook Pro (Retina, 13-inch, Mid 2014)
- OSX 10.11.5
Software
- Windows 10
- VMWare Fusion 8.1.1
- HoloLens Tools (Visual Studio, HoloLens Emulator, and Unity for HoloLens)
Yo Cortana what up with dat hypervisor?
Installation
Begin by installing Windows 10 inside VMWare Fusion. I set my Virtual Disk size to be 85GB, which is 70GB for Windows, HoloLens tools, and associated cruft + extra space for future expansion. It’s probably worth setting up a shared folder that lives on the host OS for storing your source code and binaries without bloating the VM.
With the VM powered off, you’ll want to tweak the following settings within VMWare’s Virtual Machine Settings.
- Under General, set the OS type to Hyper-V from the Windows dropdown, which will allow you to run the HoloLens Emulator inside VMWare.
- Under Processors & Memory use at least 2 cores and 8GB of memory. In Advanced options check the box next to Enable hypervisor.
- Under Display, uncheck Accelerate 3D Graphics. I know this is confusing. When this option is selected Windows uses DirectX 9 and Unity crashes when I try to add a Cube to the scene. When this option is unselected I am able to run DirectX 11 and Unity behaves just fine. You can check your DirectX version by running dxdiag.exe. This might have something to do with the Intel Iris GPU in my Macbook. Note that the latest version of Blender requires 3D acceleration so you will want to install version 2.76b instead.
- Under Compatibility, make sure you are running Hardware Version 12.
Next, fire up Windows 10 and
- Enable Hyper-V
- Install all available Windows Updates
- Install the HoloLens Tools
Now you’re ready to get down to business. Start with Holograms 100 which will walk you through creating a project in Unity, exporting it to Visual Studio, previewing it in the emulator, and exporting the code to a HoloLens. I would suggest in Chapter 3 that you place the Cube at a Z position of 3 so that it appears directly in front of the user rather than at the origin. This makes the Cube much easier to find when using the emulator. You’ll also want to take a peek at the emulator documentation to learn how to navigate with the keyboard.
As a final note, you may want to consider setting up the entire Windows dev environment on EC2 and avoid VMWare altogher.
Happy hacking!