Book Image

HoloLens Beginner's Guide

By : Jason M. Odom
Book Image

HoloLens Beginner's Guide

By: Jason M. Odom

Overview of this book

HoloLens revolutionizes the way we work and interact with the virtual world. HoloLens brings you the amazing world of augmented reality and provides an opportunity to explore it like never before. This is the best book for developers who want to start creating interactive and intuitive augmented reality apps for the HoloLens platform. You will start with a walkthrough of the HoloLens hardware before creating your first app. Next you will be introduced to the various HoloLens sensors and find out how to program them efficiently so that they can interact with the real world seamlessly. Moving on, you will learn how to create smart animations and add video overlay that implements real-time tracking and motion-sensing abilities to your HoloLens app. Finally, you will learn how to test your app effectively.
Table of Contents (18 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface

What you need to develop for the HoloLens


The HoloLens development environment breaks down into two primary tools, Unity and Visual Studio. Unity is the 3D environment that we will do most of our work in; this includes adding holograms, creating user interface elements, adding sound and particle systems, and other things that bring a 3D program to life.

Visual Studio on the other hand is the glue that makes everything work. Here, we write scripts or machine code to make our 3D creations come to life and add a level of control and immersion that Unity cannot produce on its own.

Unity

Unity is a software framework designed to speed up the creation of games and 3D-based software. Generally speaking, Unity is known as a game engine but the more apparent the holographic world becomes, the more we will use such a development environment for different kinds of applications.

Unity is an application that allows us to take 3D models, 2D graphics, particle systems, and sound to make them interact with each other and our user. Many elements are dragged and dropped and plugged and played; what you see is what you get. This can simplify the iteration and testing process. As developers, we most likely do not want to build and compile little changes we make in the development process forever. This allows us to see the changes in context to ensure that they work; then once we hit a group of changes, we can test them on the HoloLens ourselves. This does not work for every aspect of HoloLens-Unity development, but it does work for a good 80%-90%.

Visual Studio community

Microsoft Visual Studio Community is a great, free Integrated Development Environment (IDE). Here, we use programming languages, such as C# or JavaScript, to code changes in the behavior of objects, and generally make things happen inside of our programs.

HoloToolkit - Unity

The HoloToolkit-Unity is a repository of samples, scripts, and components to help speed up the process of development. This covers a large selection of areas in HoloLens development, such as the following:

  • Input:Gaze, gesture, and voice are the primary ways in which we interact with the HoloLens.
  • Sharing:The sharing repository helps allow users to share holographic spaces and connect to each other via the network.
  • Spatial Mapping:This is how the HoloLens sees our world. A large 3D mesh of our space is generated and give our holograms something to interact with or bounce off of.
  • Spatial Sound:The speaker array inside the HoloLens does an amazing job of giving the illusion of space. Objects behind us seem like they are behind us.

HoloLens emulator

The HoloLens emulator is an extension to Visual Studio that will simulate how a program will run on the HoloLens. This is great for those who want to get started with HoloLens development but do not have an actual HoloLens, yet. This software does require the use of Microsoft Hyper-V, a feature only available inside the Windows 10 Pro operating system. Hyper-V is a virtualization environment, which allows the creation of a virtual machine. This virtual machine emulates the specific hardware, so one can test without the actual hardware.

Visual Studio tools for Unity

This collection of tools adds IntelliSense and debugging features to Visual Studio; if you use Visual Studio and Unity, these are a must have:

  • IntelliSense:An intelligent code completion tool for Microsoft Visual Studio. This is designed to speed up many processes when writing code. The version that comes with Visual Studios tools for Unity has Unity-specific updates.
  • Debugging: Before this extension existed, debugging Unity apps proved to be a little tedious. With this tool, we can now debug Unity applications inside Visual Studio, thus speeding the bug squashing process considerably.

Other useful tools

The following are some the useful tools that are required:

  • Image editor: Photoshop and Gimp both are good examples of programs that allow us to create 2D UI elements and textures for objects in our apps.
  • 3D modeling software: 3D Studio Max, Maya, and Blender are all programs that allow us to make 3D objects that can be imported in Unity.
  • Sound editing software: There are a few resources for free sounds on the Web. With that in mind, Sound Forge is a great tool for editing those sounds, layering sounds together to create new sounds.