“Hello World” Mixed Reality Demo from the UK TechKnowDay Event 2018

I had the privilege to be invited to speak at the UK TechKnowDay Event today as part of International Women’s Day;

and I went along with my colleague, Pete, and talked to the attendees about Windows Mixed Reality.

As part of that, I’d put together a very simple “Hello World” demo involving taking a 3D model of an avatar who appeared when air-tapped on a HoloLens and then fell with a parachute to the floor. This is really just a way of showing the basics of using the Unity toolkit, the Mixed Reality Toolkit and Visual Studio to make something that runs on HoloLens and which blends the digital with the physical.

At the event, we shortened the demo because we were running a little low on time and so I promised to include the materials on the web somewhere and that’s what this post is about.

First, I made 3 models using Paint3D and so I wanted to include that little video here – it’s intended to be spoken over so there’s no audio on it;

and then there’s a little video showing me working through in Unity to bring in the assets from Paint3D and add some very, very limited interactivity to them using Unity and the Mixed Reality Toolkit.

The way the app is supposed to work is that an air tap will cause the creation of an instance of the avatar. She will then fall under (reduced) gravity landing on a surface when her parachute should disappear and then she might sort of ‘snowboard’ to a stop where her snowboard should also disappear Smile

I’m not sure that anyone would want this coding masterpiece Smile but if they did then it’s on github over here;


Feel very free to re-use, share or whatever you like with this if it’s of use to you.

Future Decoded 2017 Resources

NB: The usual blog disclaimer for this site applies to posts around HoloLens. I am not on the HoloLens team. I have no details on HoloLens other than what is on the public web and so what I post here is just from my own experience experimenting with pieces that are publicly available and you should always check out the official developer site for the product documentation.

At this year’s Future Decoded show, I presented a couple of sessions with my colleague Pete around Windows Mixed Reality.

  • Windows Mixed Reality – Bootstrapping Your Development
  • Windows Mixed Reality – Developing with Unity

Neither of these were ‘official’ in the sense that Pete and I don’t work on the HoloLens or Mixed Reality teams at Microsoft and we aren’t even on the same continent and so you should always go check the official developer site;

for everything ‘official’ and always refer back to that in case of any doubt.

With the first of these sessions our intention was to provide a list of topics/resources that we’d want to know about if we were starting in Mixed Reality development today. We’ve since screen-captured that session and you can find the video of it below. Apologies on the audio, it’s a little “flat” which comes from recording straight into a PC with a cheap microphone.

In terms of the slides that we made/used for that session – they are downloadable in PDF form from here.

The intention of the second session was to make some of what we’d shown in the first session “come to life” by putting together some rough pieces in Unity with the Mixed Reality Toolkit (MRTK) and the Mixed Reality Design Labs (MRDL) and we’ve screen-captured that session also and it’s available below;

The sharp-eyed amongst you might notice that the video jumps between 1620 and 1920 vertical resolution, apologies for that – we’re aware of it.

As you’ll hear in the session, we worked from a slightly strange starting point because the MRTK and the MRDL were in the process of ‘coming together’ at the time that we made the session.

Since the session, that work has progressed and so we would start from a different place today than we did when we put the session together. See this pull request for the gory/glory details Smile and expect that there is more work to be done to bring some more of the MRDL goodness (e.g. bounding box) into the MRTK.

All mistakes are ours – feel free to let us know about them Smile

Hitchhiking the HoloToolkit-Unity, Leg 6– A Collection of Demos from A Recent Meetup Talk

NB: The usual blog disclaimer for this site applies to posts around HoloLens. I am not on the HoloLens team. I have no details on HoloLens other than what is on the public web and so what I post here is just from my own experience experimenting with pieces that are publicly available and you should always check out the official developer site for the product documentation.

I gave a developer session at a meetup the other week which was a bit of a ‘lap around’ getting started with HoloLens development which covered a few areas including;

  • A 2D ‘Hello World’ app and how to deploy, run and debug it on both the HoloLens emulator and HoloLens.
  • How to get hold of the HoloToolkit for Unity.
  • A 3D ‘Hello World’ app in Unity.
  • Adding support for Gaze.
  • Adding support for Gesture.
  • Adding support for Voice.
  • Adding Spatial Mapping.
  • Adding Spatial Sound.

All of this covers ground very similar to that found in the Holographic Academy and I’d strongly encourage anyone who’s even looking at HoloLens to walk through that Academy online as it’s a really useful way to get a quick-start on a number of topics and, with the emulator, you don’t need to have a device to work through it.

At my session, I used a number of recorded ‘coding’ videos which I added a voice-over to “live” on the day but I was asked whether I might share them here with a voice-over added and so that’s the purpose of this post.

The videos follow in order in that that, generally, a later video might make use of something that happened in an earlier video.

In the live session, I have things to say both before, during and after these demos but for this post I’ll just make some text notes which hopefully will be enough string the videos together.

Two other notes about these videos;

  • They have been recorded from the screen and so they suffer a little in quality.
  • They are inevitably going to get out of date with respect to the HoloToolkit and I don’t intend to update them which is another reason to always refer back to the official tutorials 

With those caveats in place…

Session Demos In Order

Building a Quick 2D UWP App and Deploying to PC, HoloLens Emulator and HoloLens

In this first demo, we put together a UWP application from scratch and then see how it runs on PC and HoloLens and how we can deploy to HoloLens from Visual Studio either over USB or over WiFi;

Getting Hold of the HoloToolkit

We are going to use the HoloToolkit for Unity in our 3D demos so this very short screen capture just shows how I got hold of it;

A 3D Hello World in Unity

Having got the HoloToolkit for Unity, we can now bring it into a blank project, set up our project and scene settings and make a basic app that we can deploy to the HoloLens to try out;

The Device is the Camera

I thought it was important to try and explain that the world co-ordinate system is presented with the device/user at the centre of it and that the user/device effectively act as the camera here;

Adding Gaze

Knowing where the user is looking and what they are looking at is really important for an app on HoloLens and so we add the basics of detecting the user’s gaze;

and then we can make this easier by adding in pieces from the HoloToolkit;

and we can also add a cursor to give the user visual feedback again using pieces from the HoloToolkit;

Adding Gesture

Time for the user to interact with the holograms and here we use the basic framework pieces to add support for a click (air-tap) gesture;

and once again we then revisit that to use the HoloToolkit to make it easier and better for us;

Adding Voice

Voice is a hugely important part of interacting with these applications and so we add support for our application to listen to voice commands via the HoloToolkit;

and then we add basic support for having our application speak back to us, again leaning on the HoloToolkit to get it done;

Adding Spatial Mapping

At the moment, our objects are simply falling through the physical world so it’s time to add some spatial mapping support such that the physical environment mixes with the virtual one. For this demo, we simply use the prefab object from the HoloToolkit to add in spatial mapping and to visualise it;

Adding Spatial Sound

Last but not least, sound is critical in an environment where you might want to attract the user’s attention to holograms which might be behind them or off to the left or right and so we set up our four cubes as sound sources and see if we can apply spatial sound to them. Note that here I’m just using a basic WAV file so I’m not sure it’s going to give stunning results and especially not when recorded this way.

and that’s it in terms of the demos that I used in this particular session – hope this is helpful to the people who came along and perhaps a few more folks as well Smile