How to develop for Microsoft's HoloLens

I just had a chance to try out HoloLens from the perspective of a developer, led through a mock 90-minute session where I was 'taught' how to code a Windows Holographic application, as well as a chance to try it out using the latest HoloLens hardware.

When we were given a chance to experience HoloLens in January, the hardware was Borg-like: tethered via cables, HoloLens was more like a scuba mask attached to a bicycle helmet. (In both cases, our eyes were measured to determine our inter-pupillary distance, to ensure that we would see the projected holograms clearly.) What Microsoft showed off under glass this week is the real deal: wireless, relatively comfortable, and much more polished.

The new HoloLens consists of two sturdy, plastic frames. An inner loop rests over your skull, connected to an outer frame that holds the hardware itself. At a guess, I'd say the hardware itself weighs about 500g or a little more, not uncomfortable but certainly noticeable. On either side, on top of the frame, are two sets of buttons; the left buttons control the brightness of the holograms, while the right control the volume of the sounds pumped through the headset.

The HoloLens glass droops over your eyes, and was more than a little difficult to get aligned correctly – more so than the prototype hardware shown in January, which was adjusted by trained Microsoft employees. 

Part of the difficulty lies with the field of view, which is very roughly equivalent to what you might see on your phone if it were a few inches in front of your eyes. There's a substantial portion of your field of vision that can't pick up the holograms, at least with the new hardware; I would swear that the prototype offered a wider field of view, but I certainly could be wrong. (One suggestion might be to establish a 'glow' at the periphery of the screen to indicate a hologram is nearby, and as an incentive to turn and find it.)

When it counted, the HoloLens worked well. The holograms were bright and colorful, with a resolution definitely lower than HD quality, but not too bad. And the ability for the HoloLens hardware to see and 'scan in' real-world objects into virtual surfaces worked marvelously. With the HoloLens on, holograms take precedence, so you can barely see your hand or arm if a hologram is behind it. The real world is just a ghost haunting Microsoft's virtual space.

Microsoft transformed a nearby hotel into a professionally designed 'Holographic Academy', complete with workstations and chairs. Each pair of reporters was assigned a "mentor" to walk us through what Microsoft called the 'Express Edition' of what was normally a four-hour session. Ours, David (he declined to give his last name), sat us down in front of a pair of workstations.

We couldn't take photos or record video, so all of the images in this story are Microsoft's press photos.

David, bless him, couldn't answer whether the HoloLenses were wirelessly connected – we downloaded the apps to the HoloLens via a USB cable – or how much memory was within them. "I just don't know," he said with a warm smile.

In all fairness, however, David was excellent, and all of the employees present seemed enthusiastic, well-trained, and eager to please.

The message was simple: It's easy to code for the HoloLens, with entire features and properties that can be adjusted using single lines of code. Microsoft asked us to work within the Unity framework, exporting the project into Visual Studio to be compiled and downloaded via a USB cable into the HoloLens. At each stage we enabled more features: gaze input, spatial sound, physics, and finally the ability to move the 'stage' where the holograms took place to whatever real-world surface we wanted to.

HoloLens app development

The 'app', as it were, was simple: A pair of small spheres – one appearing to be crumpled-up newspaper, the other a more abstract shape – hovered above a paper airplane leaning on the table, plus another surface. We learned we could tap the spheres to enable them to fall, and they would "roll" down to a giant virtual notepad that served as the stage for the digital objects. 

One of the goals was to show off how virtual objects could be interacted with: via a small circular cursor that would appear on an object you were looking directly at, by an oral command, or by a click. In Windows Holographic, you "click" by holding your palm out, then lowering your index finger to your palm. The trick is that the camera has to "see" your finger doing this, so you have to remind yourself to keep your hands in "view," as it were.

Not everything went smoothly. Some code didn't seem to work correctly the first time, and had to be recompiled and re-loaded. There was even some garbage-in, garbage-out: to reset the scene, we could pick our own command word; I chose "Abracadabra," but mistyped and forgot the first "R". Not surprisingly, it worked once the error had been corrected. But another command, "Bombs away," barely worked once.

We eventually learned how to drag virtual objects around the room, rolling virtual balls off various real-world objects like tables and chairs that the HoloLens mapped as virtual surfaces. The grand finale, however, made it all worthwhile: when the balls hit the floor, they exploded – and revealed a Minecraft-like underworld "beneath" the floor. The gathered employees had a good laugh at the reporters who crawled around the floor hoping for a better view.

"You are now a Windows Holographic developer," we were all told enthusiastically, to more applause. 

Note: We may earn a commission when you buy through links on our site, at no extra cost to you. This doesn't affect our editorial independence. Learn more.

Elsewhere on IDG sites

Read Next...