Monthly Archives: December 2018

Microsoft HoloLens: Getting your first content onto device

In our last blog post, we showed you how to get started with HoloLens development and set up a development environment. In this post, we will be detailing how to build your first piece of content and deploy it to a HoloLens device. We will also be covering how to construct some interactions using pre-made components contained within the HoloToolkit.
The main aim for this blog post is to get a basic application, that contains two objects and an interactive button which toggles the states of these objects, built and deployed to a device for testing. At the end of this post you will have acquired the basic skills to get a skeleton application built, as well as have access to resources that will help you find and add new features to the existing application.

Creating the main scene
Following on from the last blog post, you should have a project set up with the HoloToolkit imported and ready to use. Before we get started crafting a basic scene to use for building and deployment, navigate to the HoloToolkit example scene folder, as shown in the picture below:

first_content_fig1

Let’s start by looking through the “Interactable Object Example” which can be found in “InteractableObject_Examples.unity” unity scene file. Once the scene is opened, head to the accompanying HoloToolkit examples description page: https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/master/Assets/HoloToolkit-Examples/UX/Readme/README_InteractableObjectExample.md

first_content_fig2

As can be seen from this scene, there are a number of examples of how to create interactive objects, either by use of a “button”, or through use of the object itself. Try playing the scene to explore how the various interaction styles work. When you are finished exploring the scene, create a new scene and name it “Blog2_MainScene”. You should now have a completely empty scene and are ready to start adding content in.

first_content_fig3

The first step is to add the basic necessities for a scene to run on a HoloLens device. Begin by removing already existing Main Camera and add the “MixedRealityCamera” prefab into the scene (Assets/HoloToolkit/Input/Prefabs/MixedRealityCameraParent.prefab). This is a special camera that allows the HoloLens to draw the content over the real world, while clearing the rest of the scene to transparent, allowing the user to see the real world.
Next add the “InputManager” prefab into the scene (Assets/HoloToolkit/Input/Prefabs/InputManager.prefab), this will allow the HoloLens to intercept input events from the device and provide input functionality to scripts that require it.

Finally, bring in the cursor prefab (Assets/HoloToolkit/Input/Prefabs/Cursor/ Cursor.prefab) into the scene hierarchy and attach it to “Simple Single Pointer Selector” script on “InputManager” game object. The cursor will act as the user’s pointer in the scene. Your scene hierarchy should now look as follows:

first_content_fig4

Now that you have all the necessary prefabs in the scene, you can begin adding some models that will act as your content. We require 2 models for this scenario, and we will be using the built in Unity primitives, but feel free to use any model at your disposal!
Add a sphere (or any model you have) and place it at (1, 0, 5) in the scene. Next add a cube (or any second model you have, it must be different to the first) to the scene and place it at (-1, 0, 5) in the world. Your scene and game view should now look as follows:

first_content_fig5

For the next step of this tutorial, you are going to create an interactive button which when pressed will hide one object and show the other. Pressing it again will toggle the objects. This example, whilst simple, provides everything you need to start crafting more complex interactions, and will allow you to get started crafting the UI in your application whilst knowing that it will deploy to the HoloLens and function correctly. Given the spatial and holographic nature of HoloLens content, crafting the user interface is one of the most important aspects of development and therefore is often something that should be started first, or in tandem with the first development tasks.

Now add the button that we will use for this, by dragging the “HolographicButton” prefab (Assets/HoloToolkit-Examples/UX/Prefabs/ToggleButton.prefab) into the scene. Position the button at (0, 0, 4) in the world, so that it is placed in between the two models and slightly in front. Your game and scene view should now look as follows:

first_content_fig6

Adding Basic Interactivity
Now that you have all of the component’s setup, you can start to add functionality for the button. First select “ToggleButton” game object in the scene and navigate to “InteractiveToggle” component. Here you can find a very similar setup to Unity’s Button component as it uses UnityEvents for all of the interactions with the button. To enable and disable your sphere and cube objects you only need to drag the gameobjects into ‘OnSelection()’ and ‘OnDeselection()’ events and correct ‘GameObject.SetActive’ state as shown in a picture below:

first_content_fig7

If everything is setup in order, when you click ‘Play’ button, you will be able to interact with the button and enable and disable the sphere and cube gameobjects. (To control your player inside UnityEditor: ‘WASD’ to move around, hold right mouse button to look around, hold ‘Space’ key and left mouse button to interact).

Build Process
Now that you have created a small scene with some interactivity it is time to build this application. Go to File -> Build Settings and make sure that you still have the correct settings from our previous HoloLens developer blog (http://www.pauley.co.uk/blog/microsoft-hololens-a-developers-kick-start-guide/). Under ‘Scenes In Build’ remove ‘Scenes/SampleScene’ and drag in ‘Blog2_MainScene’ in order for this scene to be included in the build. Click ‘Build’ button, select a folder where you would like the finished build to be put and wait for your first HoloLens application to finish building.

first_content_fig8

After Unity build is finished you will need to do a final compile in Visual Studio. Open the folder where you saved your build and open Visual Studio Solution file inside it. In Visual Studio at the top instead of ‘Debug’, ‘ARM’ and ‘Local Machine’ select ‘Release’, ‘x86’ and ‘Device’ for solution configuration.

first_content_fig9

When you have the correct settings selected go to Build -> Build Solution, this will kick-off a final part of the building process.
After receiving “Build: succeeded” message you will be able to start deployment onto a device.

Deploy Process
To deploy straight to your device, connect your HoloLens to your PC using a USB cable and select Build -> Deploy Solution, this will begin the process that will transfer the build onto your device.

first_content_fig10

The second way of deploying your build is to create an Appx. To do this, right click on your project inside the Solution Explorer and go to: Store -> Create App Packages.

first_content_fig11

A new window will open, select option ‘I want to create packages for sideloading’ and on the next page untick ‘x64’ and ‘ARM’ architecture. By clicking on ‘Create’ button Visual Studio you will create an app package that can be installed on any HoloLens device using Device Portal (more information can be found HERE).
After deploying a successful build onto HoloLens, you should be able to launch it and see the same view as was displayed in the editor.

first_content_fig12

Now that you have finished, try experimenting some more with your new knowledge to get more familiar on how to build apps for HoloLens. But don’t forget to check back soon for the next part of this tutorial, where we will help you setup various UX utilities to improve ease of use.
We are also planning on running some developer courses in the new year. If you require any help, or would like to get in contact with us regarding developer courses, please contact us or at http://pauley.proboards.com/.

Share
img

Digital Rail Sector Deal and the Economics of Skills Development

The launch of the Governments Rail Sector Deal (RSD) saw a number of key initiatives and a vision for the future of the industry unveiled. Delivering the benefits of new digital rail technology is at the heart of this Rail Sector Deal. The Sector Deal will enable companies to drive innovation, invest in research and development, upskill their workforce and look beyond the UK to export markets worldwide.

With a focus on enabling the UK Rail Sector to nurture, empower and retain digitally skilled workers, the RSD is at the heart of the work we do.

The impact of digital transformation in rail cannot be underestimated and it is prudent to assume that 80% of the industry will require some level of training or education over the next 20 years. This equates to around 200,000 workers requiring some form of training or education intervention. NSAR (National skills Academy Rail) has estimated that this market could be worth up to £600m, with a claw back from the Apprenticeship levy approaching £200m. So we are talking about some big numbers here.

By digital skills for rail we mean both the generic digital skill sets and the additional skills existing disciplines will need to fit, optimise and maintain new digital assets. There is already a shortage of both. The existing training market will provide some highly limited numbers of the former – without an equivalent Digital Rail Academy concept the latter will exist mainly in suppliers, who will then monopolise the market at considerable cost to efficiency and jobs. Wage inflation is already at 8.8% in signalling engineers and over 10% in the generic disciplines eg data analysts.

blog1

So something must happen. Here’s the economics logic.

Perhaps appropriately, the economics of training are themselves being transformed by new technology.

Firstly, PAULEY’s enhanced software is increasingly being used to create online, augmented and mixed reality environments that significantly enhance the learning and assessment experience.

Secondly, and related, customers expect training to be delivered in a more flexible way, at their depots, at non-traditional times and with a blend of human and virtual trainers. For example, at NTAR a growing proportion the rolling stock training is delivered via server, laptops and virtual and augmented reality headsets at depots by software and intelligence provided by PAULEY. This has transformed the training economics by reducing the biggest single training cost for existing staff – release costs.

Future academies will be virtual: (Example based on £10M Budget) – instead of spending £7m on a building, £1m on hardware, £1m on staff training and £1m on software, it may be more balanced; £3m on a software platform (designed by industry for industry), £1m on hardware, £2m on staff training and £4m on client onsite training facilities. The overall cost of training supply will not drop or change dramatically but the number of users will be higher, the experience more immersive and the release costs will halve.

So a unit cost of £200 per head per day might become £150 0r £100 per head per day over time, but a release cost of 8 hours for 4 hours training in a centre will be halved as much of the training will come to the worker. The effect of adopting PAULEY technology is already transforming the rail training market today.

Existing industry and treasury productivity work shows that there is currently already a market failure in relevant training, leading to wage inflation and costs of poor capability (rework etc). For the first time these have been modelled at the level of unit costs, at 9% and 6% respectively. Put another way, unit costs are 15% higher, now, than they could be had the investment been made.

Training and skills development is a critical element to increasing productivity. We know this. Implementing new technology and then training staff in new, contemporary skills is a double win, not only at an industry level but also at employer level.

In line with the ethos of the RSD, PAULEY have launched HoloSkills, a new product to convert any training material into next-gen Augmented Reality using Microsoft HoloLens. This platform (and others that PAULEY will deliver with strategic partners) will help the rail industry align and ensure consistency in all areas, from drivers through to maintainers, infrastructure to rolling stock, crew and beyond…

The HoloSkills platform has been tried, tested and refined as a new industry standard at NCHSR and is now ready to revolutionize rail training! HoloSkills is the first in a new line of immersive products PAULEY will launch early next year.

Invest early in the RSD and in PAULEY technology and you’ll notice the difference. Not only economically, but also from an engagement and an immersive learning perspective by delivering improved productivity and driving digital transformation within your organisation.

Share