Building Virtual Reality with Unity and SteamVR
Building Virtual Reality with Unity and SteamVR
Jeff W. Murray
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
2017 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Printed on acid-free paper
International Standard Book Number-13: 978-1-138-03351-1 (Paperback)
978-1-138-05124-9 (Hardback)
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
It is my hope that, in the future, VR will bring families and friends closer together and keep them close. This book is dedicated to all of my family. To my parents. To uncles and aunties, cousins and well, also to the cat. Cat, be nice to the boys.
Contents
M y wife is amazing. My kids are also amazing. When I hit my least motivated moments, they always inspire me to keep going. There are no words to describe how amazing it is to have such awesome people in my life.
I would like to extend special thanks to the people who believed in my work and helped me with their awesome support: Michael Zucconisenior public relations manager at HTC, and thank you sincerely to the entire HTC Vive team. Thank you to Leap Motion. Thanks to the entire OSVR team. Many thanks to Haoyang Liu and Dr. Tristan Dai of Noitom as well as the entire Noitom and Perception Neuron teams in Beijing and Miami. In my research, there were countless sources but I would like to call out Alexander Kondratskiy for sharing his research and findings on his excellent blog, Dan Hurd and Evan Reidland for sharing info on Luckys Tale , and thank you to Columbia University researchers for sharing some of their extensive work on motion sickness.
Thank you Brian Robbins for getting me started in writing books, thanks Richard Bang of Freekstorm for the SteamVR skybox trick, Hello Games for No Mans Sky (the game I dreamt of playing since I was a kid), Tami Quiring, Nadeem Rasool, Dwayne Dibley, Liz and Pete Smyth, Isaac and Aiden, Jonah and Simona, Mike Desjardins, Jillian Mood, Christian Boutin, David Helgason, James Gamble, The Oliver Twins, Jeevan Aurol, Rick King, Byron Atkinson-Jones, Aldis Sipolins, Ric Lumb, the whole team at CRC Press/AK Peters, including Jessica Vega and Robert Sims, everyone at Nova Techset, especially Ragesh K.
Thank you for buying this book. I wish I could tell you how awesome it is to know that someone else is reading this. The potential for VR goes beyond anything we have seen in a long timeit transcends format, convention, and politics. The virtual world is free from restriction, open to new ideas, and it is already fast developing new perspectives and journeys for all of us. I truly cannot wait to see what you create and I sincerely hope this book helps you to get up and running. Get in there, create new universes, and feel free to let me know when I can come visit them.
Jeff W. Murray
Jeff W. Murray is the author of Game Development for iOS with Unity3D (2012) and C # Game Programming Cookbook for Unity 3D (2014), also published by CRC Press. In his game development career spanning over 14 years, he has worked with some of the worlds largest brands as a programmer, game designer, and director. He has worked with the Unity engine since its initial public release, on projects ranging from hit mobile games to medical simulations. Murray currently works in VR research and development for IBM Research.
I n 2017, we stand at the gates of a new technological landscape. As we look out at the real estate trying to figure out just how and what to build there, it is clear that there is still a lot to discover. There are few rules. In the virtual world there are no politics, no corporations, and no borders to what we can experience or what we can build for others to experience. Where this goes from here is up to us. We are only just learning how people react to virtual reality (VR), what the possibilities are, a seemingly endless number of possibilities in entertainment, learning, rehabilitation, experience, and development. Even the very basics of interfaces: how our fellow cybernauts interact with the virtual world, is still undecided. What feels natural in the virtual world? How do we move around, touch things, feel objects, and manipulate the environment? The number of people with access to the tools to create virtual content has also never been so wide-ranging and we have more people than ever coming up with new and exciting additions to our virtual experiences. In the race to provide technology to accommodate this new experience, hardware manufacturers are running as fast as they can to make VR better, stronger, and faster. No matter how quickly we run to keep up, the technology does not stop evolving and changing. Technology will keep moving. We will never stop learning. New technology appears all the time and, when you reach the end of this book, it will be up to you to get involved and to potentially start shaping VRs future. Do not be afraid to throw out convention and try out alternative ways of doing things that are different to the ways we have interacted with games or simulations in the past. You are a visionary who could help shape the VR landscape of tomorrow. The virtual experiences of the future will be built upon the experiences of today, so experiment and create amazing new things! Remember to have fun, look after yourself, and be nice to each other.
Y our set up costs will be a development PC and whatever cool hardware tech you want to plug into it. Along with your chosen VR devices, let us take a quick look at what else you will be needing:
Unity (available from the Unity store at http://www.unity3d.com ) : Unity and the required SDKs can be downloaded free of charge with no catches. Unity Personal boasts that it is a fully-featured version of Unity with just a few caveats. You can do everything in this book with Unity Personal, just as long as you have a VR headset to test with. If there is any sort of question as to whether or not you need a paid version of Unity, you can always try out the free Personal edition to get used to it and see how it all goes before you put any money into it.
Next page