The world industries are currently in a state of transition with the emergence of digital tech and immersive Mixed Reality (XR) technology. Many systems both new and old, that have been difficult to upgrade to a screen based medium due to lack of usability may now have a clear path to digitisation through the use of XR technology due to many applications making more sense in a spatial medium than a 2D screen.
Our time developing MS HoloLens experiences for clients has led us to discover a great many tips, tricks that are not that widely known in this exciting new world of XR development. Developing for the MS HoloLens has a great many opportunities but also limitations which may make an inexperienced developer feel that their design and application potential must also be limited.
However, our extensive usage of the platform has made it clear that the limitations are easy to overcome if the proper steps and procedures are known. This encompasses everything from creating experiences optimized for high and stable framerates, all the way to designing user interfaces to take into account and take advantage of the spatial nature of the MS HoloLens.
Over the coming months we will be releasing blog posts aimed at guiding new and experienced developers through the world of MS HoloLens development, with an aim to potentially host scripted live training sessions or developer training events for developers based in the UK or further afield.
Beginner’s Guide Setting up your first MS HoloLens Project
Get the software
In order to get started with MS HoloLens development the following software is required:
- Visual Studio 2017 (https://visualstudio.microsoft.com/downloads/)
- With Universal Windows Platform development selected
- With Game Development with Unity selected, but deselect the unity editor checkbox as we will download a more up to date version
- Unity 2018.2 : download this via the Unity Hub (https://unity3d.com/get-unity/download)
- Select UWP .NET option
- Select UWP IL2CPP option
- Select Vuforia option
- Windows 10 April 2018 Update (https://blogs.msdn.microsoft.com/chuckw/2018/05/02/windows-10-april-2018-update-sdk/) : this is likely to already be installed on Our PC if we use Windows 10 and keep it up to date
- If not already installed, install Windows SDK 10.0.17134.0 using the visual studio
Set up Our unity environment for MS HoloLens Development
In order to get started with MS HoloLens development, we need to start a new unity project.
Once opened, Unity will initially be in “Standalone” platform mode. In order to develop for the MS HoloLens, we need to switch to “Universal Windows Platform”.
To do this go to: File > Build Settings. We are now presented with the platform build dialog. Select the “Universal Windows Platform” and press “Switch platform”. All the assets in the project will now be reimported as the project switches to the UWP platform.
Once switched over, change Our settings to
This ensures that we have the correct settings to perform successful optimized builds. The compression method is optional and can also be set to “Default”, however LZ4HC can perform better depending on how assets are compressed.
Acquire and Import the Mixed Reality Toolkit
The Mixed Reality Toolkit (https://github.com/Microsoft/MixedRealityToolkit-Unity) is a set of example scripts and assets to kickstart MS HoloLens development. Without this toolkit, much of the basic functionality such as gaze interaction, cursors, air tap input, spatial mapping and processing will need to be created from scratch. It is therefore recommended by Microsoft and by PAULEY that we always include the latest copy in our project.
There is currently a newer branch of the toolkit in development that is in alpha, however we will want to use the most latest complete version: HoloToolkit 2017.4.2.0 (https://github.com/Microsoft/MixedRealityToolkit-Unity/releases/tag/2017.4.2.0)
Once we have downloaded the toolkit, we need to import the folders into unity. If we have a previous version of the toolkit in the project, it is imperative that we first delete all the folders or we will be very likely to encounter errors upon import.
Once imported we will have the following folders in Our project hierarchy:
You’re now ready to start development!
We recommend you look at some of the example scenes within the toolkit to get an idea of what working with MS HoloLens will look like.
We suggest looking into the “SpatialMapping” folder inside of the examples as it contains a number of scenes that will help we learn how to interact with the spatial mapping; including how to place holograms and anchor them, which is one of the most important skills we will be required to grasp in order to develop an AR application.
There is a Unity Scene file in each example folder that allows we to open and run the example.
Following on from these, another useful set of examples are inside the “Input” and “UX” folders, both contain a great number of scenes for how to model interactions within the application. Check back soon for the next part to this tutorial, where we will guide we through how to set up basic interactions and build and deploy an application to a MS HoloLens device or to the MS HoloLens Emulator.
Now that you have finished, try exploring:
- The “Input” example scenes in the holotoolkit
- The “UX” example scenes in the holotoolkit
We hope to be running some developer courses in the new year, on a first come first served basis. If you require any help, or would like to get in contact with us regarding developer courses, please contact us [email protected] or at our forums http://pauley.proboards.com/