Book Image

Microsoft HoloLens Developer???s Guide

By : Dennis Vroegop
Book Image

Microsoft HoloLens Developer???s Guide

By: Dennis Vroegop

Overview of this book

HoloLens, Microsoft’s innovative augmented reality headset, overlaps holograms into a user’s vision of their environment. Your ideas are closer to becoming real when you can create and work with holograms in relation to the world around you. If you are dreaming beyond virtual worlds, beyond screens, beyond pixels, and want to take a big leap in the world of augmented reality, then this is the book you want. Starting off with brainstorming and the design process, you will take your first steps in creating your application for HoloLens. You will learn to add gestures and write an app that responds to verbal commands before gradually moving on creating sounds in the app and placing them in a 3D space. You will then communicate between devices in the boundaries of the UWP model.
Table of Contents (16 chapters)
Title Page
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Preface

With the introduction of the Microsoft HoloLens, the world has started to think about computing in a whole new way. Now, we are not locked inside a virtual world in either an enclosed device or on a screen, but we are able to mix the real world with anything that our minds can come up with in a virtual world. This opens up a lot of new exciting ways to create new immersive experiences.

The big question is, of course, how do you as a developer, designer, or an out-of-the-box thinker create these experiences? In this book, you will learn all you need to know to create stunning three-dimensional apps that run on the mixed reality platform. We will cover the basics, but will also show you how to get advanced work done. We will start simple but work our way deep into the inner workings of HoloLens. After reading this book, you will be ready to surprise the world with apps that do what most people consider still to be science fiction.

What this book covers

Chapter 1, Let's Begin!, examines the device, and sees what it does and how it works. After that, we get our first taste of developing and creating our first simple holographic app.

Chapter 2, Designing Your App, is all about how to get the best workflow for writing a holographic app. We discuss design techniques and start working on RockOn, the app that is the basis for all chapters in the book.

Chapter 3, Gestures and Events, explains how to deal with gestures when controlling your apps. We talk about why gestures are important, and how we can get the events when the user performs those gestures, while reading these chapters. We also explain how to track hand movements and other input methods.

Chapter 4, Make Some Noise - Sounds, is the chapter where we dive into the sound capabilities of the Mixed Reality world. This chapter introduces HRTF and spatial sounds, and how we can create those in our own apps.

Chapter 5, Be Heard - Voice Interactions, is the place where we dive into voices. This chapter covers how to synthesize voices and how to interpret voice commands. It also covers making the device sound less robot like and, of course, adding voice commands to RockOn.

Chapter 6, Take a Look around You - Spatial Mapping, is where we define the differences between VR, AR, and MR. Here, we take a look at how the HoloLens is able to scan the world around us and how we can get that depth data into our own apps.

Chapter 7, Let's Talk! Communications between Devices, is the chapter where we investigate the options to have two or more devices talk to each other. We discuss networking and the discoverability of devices. We also discuss world anchors and why they matter.

Chapter 8, Speed Up Your Development - Advanced Unity3D, is the chapter where we teach you some advanced topics, such as performance improvements and ways to streamline your workflow in Unity. We also introduce the HoloToolkit, a set of open source components you can use in your own apps.

What you need for this book

In order to work with the code samples in this book, you need some software installed on your machine. You need to have a machine running Windows 10 Professional with Hyper-V enabled. Make sure Windows is set to Developer mode by going to Settings | For developers | Developer Mode.

Besides that, you will need the following:

  • Unity3D Personal or Professional, version 5.5 or higher
  • Visual Studio 2015 with Update 3 or higher; this can be downloaded automatically for you when you install Unity3D
  • A HoloLens Emulator

You can find these tools and instructions on the official HoloLens site, which can be found at https://developer.microsoft.com/en-us/windows/mixed-reality/install_the_tools.

Who this book is for

If you are a developer who wants to create augmented reality apps for the Microsoft HoloLens platform, then this is the book for you. Coding experience with C# is assumed.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The numbers you see in MinVersion and MaxVersionTested may differ."

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Here, you can switch the Developer Mode on."

A block of code is set as follows:

<Dependencies> 
 <TargetDeviceFamily Name="Windows.Holographic" MinVersion="10.0.10240.0" MaxVersionTested="10.0.10586.0" /> 
 </Dependencies>

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Microsoft-HoloLens-Developers-Guide. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/MicrosoftHoloLensDevelopersGuide_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any Errata, please report them by visiting http://www.packtpub.com/submit-Errata, selecting your book, clicking on the Errata submission form link, and entering the details of your Errata. Once your Errata are verified, your submission will be accepted and the Errata will be uploaded to our website or added to any list of existing Errata under the Errata section of that title.

To view the previously submitted Errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.