Sean Ong
Sean Ong
Tukwila, Washington, USA
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/9781484227688 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-2768-8
e-ISBN 978-1-4842-2769-5
https://doi.org/10.1007/978-1-4842-2769-5
Library of Congress Control Number: 2017949686
© Sean Ong 2017
This work is subject to copyright. All commercial rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Printed on acid-free paper
This book is dedicated to my mother, Connie. She’s perfect. Maybe a little too perfect. If I didn’t know any better, I’d say she’s a hologram.
Congratulations! If you’re reading this, it means that you will probably be among the very first people responsible for building the mixed reality and holographic future that will dominate the next era of computing. For decades, science fiction has promised us a future filled with holograms and virtual experiences. We are finally on the verge of a technological revolution where our digital world intertwines with physical reality. This is known as mixed reality .
Imagine a future scenario where no screens exist. Instead, when you sit down to watch TV, a holographic screen appears on your wall. Because the screen is virtual, you can resize it to be as big as you like. You could also move the screen to any other room, or have it follow you around the house. You sit down at an empty desk, and several holographic computer monitors appear, along with virtual photos, a calendar, and a notepad. You’re now ready to check your e-mail, work on a spreadsheet, and get started on a good day’s work. You no longer need to carry around a physical smartphone. Instead, a holographic screen appears in your palm when needed. Holographic computing has the potential to replace every screen, and there’s no reason to believe that it won’t.
The holograms referred to in this book are digital holograms and do not operate on the same optical principles of traditional holography.
Does this sound like sci-fi technology that’s still several years away? You may be surprised to know that everything I just mentioned in this “future” scenario is completely possible (and available) today with the Microsoft HoloLens. Figure I-1 illustrates how I use the HoloLens as a virtual desk. If you had asked me about living in a holographic world a few years ago, I would have predicted that we’d see capable devices within 15 to 20 years, and that would have been optimistic. But that all changed January 2015, when Microsoft announced the HoloLens and the Windows Mixed Reality platform. It caught the tech world off guard and inspired people to think about what a true holographic future would look like.
In my previous “future scenario” example, you’ll notice that I only give examples of holographic 2D screens. To some, my examples may have sounded amazing or revolutionary. They are, in fact, dull examples that don’t adequately capture what the HoloLens and other holographic headsets can achieve. The challenge and opportunity of building experiences for these headsets is unlike anything that the technology industry has faced to date. Until now, the vast majority of software experiences have been designed for flat, two-dimensional screens. Think of televisions, smartphones, tablets, laptops, or even the flat page or screen on which you are reading this book. Video games, 3D movies, and other so-called “3D” advances over the past few years are nothing more than a glorified 2D experience we view on our flat, rectangular screens.
The Windows Mixed Reality platform breaks this status quo by allowing us to develop true three-dimensional applications in our real world. Early applications that have emerged for the HoloLens suffer from developers “thinking inside the box” by creating 2D experiences such as floating holographic screens or 2D menus and buttons for navigation. Many in the industry believe that a functional and intuitive 3D user experience has yet to be discovered and developed. As we go through the tutorials and example projects in this book, we will pay particular attention to 3D design elements while discussing ways to think outside the box and move beyond the 2D status quo.
It is a very exciting time to be a holographic developer. The devices are capable, the computing paradigm is new, and ideas for good applications seem to be endless. We holographic developers are the engineers, architects, and builders that will create the forthcoming holographic world.
The holographic future is inevitable. As with all high-tech gadgets, devices like the HoloLens will only become smaller and more powerful over time. I anticipate that it won’t be more than a few years until we see holographic glasses that are as thin and light as the Google Glass device that was announced in 2012. 1 It’s not hard to image a future where many (if not most) people will wear a pair of these holographic glasses, whether or not they require prescription eyewear. Being equipped with these headsets will enable us to augment physical reality with relevant information, have more immersive digital experiences, and free us from the unnecessary screens that fill up our desks, walls, pockets, and purses.
How important will holographic devices be in daily life? One could speculate that most people in the near future might not be able to participate fully in society without a pair of holographic glasses. At first, this might sound like a dystopian prediction of our future. But think about how we use computers and smartphones today. It’s very difficult to participate fully in today’s modern society if you don’t own or know how to use a computer. A vast majority of jobs in the United States require the use of a computer. We use e-mail and online messages as primary forms of communication. Surely, if you told someone 30–40 years ago that they would not be able to fully participate in a future society without owning or knowing how to use a computer, they would have been hesitant about such a future. Yet many of us today probably can’t imagine daily life without our trusty PC or smartphone. Likewise, in 20 years I think we’ll look back and wonder how we ever lived without our trusty holographic glasses.
Perhaps I’ve given you a glimpse of the future. More importantly, I hope to have inspired you to start thinking about the holographic apps and experiences that will fill the world around us. All of us are relying on people like you to build our holographic future. My motivation for writing this book is to get as many people started on holographic development as possible. It’s written to be easily accessible, whether you’re an experienced software developer or new to the world of programming. This book is intended to get you started with everything you need to begin developing amazing holographic experiences on the HoloLens and other Mixed Reality headsets.
This book is organized into ten chapters spread across three parts. In Part I, which contains Chapters 1 and 2 , you will be guided through the installation and explanation of all the necessary software and tools for developing Windows Mixed Reality applications.
Everything you need to get started is contained in Chapter 1 . You can begin developing Mixed Reality apps with or without a HoloLens. Things I cover in Chapter 1 include the following:
Making sure your PC is ready for Mixed Reality development
Using a HoloLens, HoloLens Emulator, or other Mixed Reality hardware
Downloading and installing the required and optional software tools
Understanding the HoloLens and other Windows Mixed Reality hardware
Chapter 2 dives into the basics of Unity. Unity is the preferred software platform for developing Windows Mixed Reality experiences. Things we’ll cover in Chapter 2 include the following:
Understanding Unity
Creating your first application in Unity
Unity and Windows Mixed Reality
In Part II, comprised of Chapters 3 – 7 ,we’ll start building holographic experiences. This is where you’re guided through the fundamentals of creating a full-featured Mixed Reality application.
You’ll learn how to make digital holograms in Chapter 3 . You’ll be guided through the creation of a basic holograms that can be viewed in the HoloLens. Here’s what Chapter 3 covers:
Preparing Unity for Windows Mixed Reality development
Creating a cube in Unity
Building and deploying the Unity application to the HoloLens
I discuss the HoloToolkit in Chapter 4 . Manually preparing Unity for HoloLens development can be cumbersome and prone to error. This chapter introduces the HoloToolkit and how you can leverage this community resource:
Understanding the HoloToolkit
Downloading and using the HoloToolkit
In Chapter 5 , we start interacting with holograms. I discuss the use of gestures, voice commands, and other ways of interacting with Holographic content. Here’s what I cover in Chapter 5 :
Voice commands
Gestures
Gaze
Clickers and other accessories
Things start getting interesting in Chapter 6 , where you begin to leverage the power of the HoloLens by learning about using spatial mapping. I walk you through the technology, concept, and utilization of spatial mapping in the context of holographic applications. Chapter 6 covers the following topics:
What is spatial mapping?
How to use spatial mapping in projects
Spatial understanding
Anchors and persistence
Chapter 7 talks about spatial sound. You’ll learn about the importance of spatial sound and how to utilize it in your projects. We’ll discuss the following:
What is spatial sound and how is it different than “regular” sound?
How to use spatial sound in projects
Best practices for spatial sound
Additional sound resources
Part III (Chapters 8 – 10 ) is about growing as a Mixed Reality developer. At this point in the book, you’ll be familiar with the basics of creating a Mixed Reality application. The three chapters introduce ways for you to optimize and enhance your experiences, publish and monetize your apps, and join the broader holographic community for support and visibility.
In Chapter 8 , I discuss tips and tricks for awe-inspiring experiences. This chapter provides you with a primer on elements that give holographic experiences additional flair and magic, such as color choice, ambient elements, music, size, and more. Finally, we’ll complete a capstone project together using key skills gained in this book. Here’s what’s covered in Chapter 8 :
Optimization and performance
Design
Magic
Capstone project
Let’s make some money! In Chapter 9 , I discuss the details of publishing and monetizing your applications. You’re presented with strategies for monetization, from publishing your app in the Windows Store to freelancing as an independent Mixed Reality developer. Here’s what Chapter 9 covers:
Monetization with the Windows Store
Freelancing
Thinking big: revolutionary opportunities
In Chapter 10 , I suggest community resources and additional information for holographic developers. This chapter introduces resources that are available to you, including relevant community forums and online groups, notable events, and other information that will help during the development process:
Why are community resources important?
The official Windows Mixed Reality forums
The HoloDevelopers Slack channel
Events and local groups
More information
As you embark on your journey to becoming one of the first Mixed Reality developers, I encourage you to keep two things in mind. First, always think outside the box or outside the “2D rectangle” that has dominated computing up until this point in time. Second, understand that you are responsible for building a new industry and the holographic world of tomorrow. You are a technological pioneer. Understanding this will inspire you to reach new heights and explore new ways of creating amazing experiences.
I’d like to thank Bart Trzynadlowski for his thorough technical review of this book. I also thank Dwayne Lamb and Jesse McCulloch for establishing amazing HoloLens communities from which I attribute most of the HoloLens knowledge I have gained. Finally, I want to thank Jonathan Gennick and Jill Balzano for their friendship, persistence, and editorial support.
Sean Ong is an author, engineer, entrepreneur, and tech influencer who has written on topics ranging from renewable energy to augmented reality. Sean’s love for virtual and augmented reality began at the age of five when he first tried the View-Master toy. Later, at the age of 14, he coded his first virtual home tour. Sean was among the first people to own a HoloLens and has developed numerous experiences for the new platform since its release. He is president of the Virtual Reality and Augmented Reality Association’s Seattle chapter and is well known in tech circles for his informative tutorials and articles that have helped over seven million people. He resides in Seattle, Washington, with his wife and three kids and enjoys pushing the boundaries of technology.
Bart Trzynadlowski has been programming since the fifth grade. After taking a detour deep into the world of semiconductor device physics and earning his PhD in electrical engineering, he presently develops low-latency software for a leading algorithmic options trading desk. Excited by the potential of Mixed Reality, Bart has been developing HoloLens apps in his spare time since June 2016.
1 Google Glass is a small device that projected notifications, images, and other information to a small glass display near the user’s right eye. Unlike the HoloLens, it did not place 3D holographic objects in the user’s world.
18.217.4.206