专题栏目:ARVRMR虚拟现实

《Unity Virtual Reality Projects》

书籍简介:

Explore the world of Virtual Reality by building immersive and fun VR projects using Unity 3D

About This Book

Learn the basic principles of virtual reality applications and get to know how they differ from games and desktop apps

Build various types of VR experiences, including diorama, first-person characters, riding on rails, 360 degree projections, and social VR

A project-based guide that teaches you to use Unity to develop VR applications, which can be experienced with devices such as the Oculus Rift or Google Cardboard

Who This Book Is For

If you're a non-programmer unfamiliar with 3D computer graphics, or experienced in both but new to virtual reality, and are interested in building your own VR games or applications then this book is for you. Any experience in Unity is an advantage.

What You Will Learn

Create 3D scenes with Unity and Blender while learning about world space and scale

Build and run VR applications for consumer headsets including Oculus Rift and Google Cardboard

Build interactive environments with physics, gravity, animations, and lighting using the Unity engine

Experiment with various user interface (UI) techniques that you can use in your VR applications

Implement the first-person and third-person experiences that use only head motion gestures for input

Create animated walkthroughs, use 360-degree media, and build multi-user social VR experiences

Learn about the technology and psychology of VR including rendering, performance and VR motion sickness

Gain introductory and advanced experience in Unity programming with the C# language

In Detail

What is consumer “virtual reality”? Wearing a head-mounted display you view stereoscopic 3D scenes. You can look around by moving your head, and walk around using hand controls or motion sensors. You are engaged in a fully immersive experience. On the other hand, Unity is a powerful game development engine that provides a rich set of features such as visual lighting, materials, physics, audio, special effects, and animation for creating 2D and 3D games. Unity 5 has become the leading platform for building virtual reality games, applications and experiences for this new generation of consumer VR devices.

Using a practical and project-based approach, this book will educate you about the specifics of virtual reality development in Unity.

You will learn how to use Unity to develop VR applications which can be experienced with devices such as the Oculus Rift or Google Cardboard. We will then learn how to engage with virtual worlds from a third person and first person character point of view. Furthermore, you will explore the technical considerations especially important and possibly unique to VR. The projects in the book will demonstrate how to build a variety of VR experiences. You will be diving into the Unity 3D game engine via the interactive Unity Editor as well as C-Sharp programming.

By the end of the book, you will be equipped to develop rich, interactive virtual reality experiences using Unity.

So, let's get to it!

Style and approach

This book takes a practical, project-based approach to teach specifics of virtual reality development in Unity. Using a reader-friendly approach, this book will not only provide detailed step-by-step instructions but also discuss the broader context and applications covered within.

作者简介:

Jonathan Linowes is the owner of Parkerhill Reality Labs, a start-up VR/AR consultancy firm. He is a veritable VR and 3D graphics enthusiast, full-stack web developer, software engineer, successful entrepreneur, and teacher. He has a fine arts degree from Syracuse University and a master's degree from the MIT Media Lab. He has founded several successful start-ups and held technical leadership positions at major corporations, including Autodesk Inc.

出版时间:

2015年9月

章节目录:

Chapter 1: Virtually Everything for Everyone 1 What is virtual reality to you? 2 Types of head-mounted displays 4
Desktop VR 4
Mobile VR 5
The difference between virtual reality and augmented reality 5 Applications versus games 6 What this book covers 9
Who are you? 9
Types of VR experiences 10 Technical skills that are important to VR 11 Summary 12
Chapter 2: Objects and Scale 13 Getting started with Unity 14 Starting a new Unity project 14 The Unity editor 15 The default world space 16 Creating a simple diorama 17 Adding a cube 17 Adding a plane 18 Adding a sphere and some material 20
???Changing the scene view Adding a photo
Coloring the ground plane
Measurement tools 25
Keeping a unit cube handy 26 Using a Grid Projector 26 Measuring the Ethan character 29
Importing from the Blender experiment 30 An introduction to Blender 31 A unit cube 34 A UV Texture image 35 Importing into Unity 38 A few observations 39 Summary 40
Chapter 3: VR Build and Run 41 VR device integration software 42 Unity's built-in VR support 42 The device-specific SDK 42 The OSVR project 43 WebVR 43 3D worlds 44 Creating the MeMyselfEye prefab 44 Build for the Oculus Rift 45 Build for Google Cardboard 46 The Android setup 47 The iOS setup 47 Installing the Cardboard Unity package 47 Adding the camera 48 The build settings 48 The Play Mode 49 Building and running in Android 49 Building and running in iOS 50 The device-independent clicker 50 How virtual reality really works 52 Stereoscopic 3D viewing 52 Head tracking 56 Summary 58
Chapter 4: Gaze-based Control 59 Ethan, the walker 60 Artificially intelligent Ethan 61 The Navmesh bakery 62 A random walker in the town 63 Interlude – a quick introduction to Unity programming 63
The RandomPosition script 66
"Zombie-ize" Ethan! 68
Go where I'm looking 69
The LookMoveTo script 70 Adding a feedback cursor 72 Observations 73
If looks could kill 74
The KillTarget script 74 Adding particle effects 77 Cleaning up 79
Summary 79 Chapter 5: World Space UI 81 A reusable default canvas 83 The visor HUD 87 The reticle cursor 89 The windshield HUD 91 The game element UI 93 The info bubble 96 An in-game dashboard with input events 99 Creating a dashboard with buttons 100 Linking the water hose to the buttons 103 Activating buttons from the script 104 Look to highlight a button 106 Looking and then clicking to select 108 Looking and staring to select 109 A responsive object UI with head gestures 111 Using the head position 111 Using head gestures 113 Summary 117 Chapter 6: First-person Character 119 Understanding the Unity characters 120
???Unity components
The Camera component
The Rigidbody component
The Character Controller component
Unity Standard Assets ThirdPersonController AIThirdPersonController FirstPersonController RigidBodyFPSController
Making a first person 125
Move in the direction you're looking 126 Keep your feet on the ground 127 Don't pass through solid objects 127 Don't fall off the edge of the world 129 Stepping over small objects and handling uneven terrain 130 Start and stop moving 130 Using head gestures to start/stop 131
User calibrations 132
A character's height 132 Real-life height of a player 135 Recentering 136
Maintaining a sense of self 136
Head-body disconnect 136 Head and body… 137 …And feet 138 The body avatar 140 Virtual David le nose 141 Audio cues 143
Locomotion, teleportation, and sensors 144 Managing VR motion sickness 146 Summary 148
Chapter 7: Physics and the Environment 149 Unity physics 150 Bouncy balls 152 Headshots 156 Trampoline and brick 160 A human trampoline 162
Like a brick 162
Like a character 163
Interlude – environment and things 167
??Wispy Sky
The planet Earth
The corporate logo Blender
Unity
An elevator Jumping Summary
Chapter 8: Walk-throughs and Rendering 175 Building in Blender 176 Walls 176 Ceiling 181 Assemble the scene in Unity 184 The gallery room 184 The artwork rig 185 The exhibition plan 188 Adding photos to the gallery 190 An animated walk-through 193 Unity's animation system 193 Scripted animation 194 Optimizing for performance and comfort 196
Optimizing your implementation and content 198 Simplify your models 198 Using texture maps instead of complex meshes 198 Limiting the objects to be drawn 199 Lighting and shadow performance 199 Optimizing your scripts 200
Optimizing for the Unity rendering pipeline 200 Life's a batch 200 Multipass pixel filling 202 Other rendering tips 203
Optimizing for the target hardware and drivers 203
??Unity Profiler
Summary
Chapter 9: Using All 360 Degrees
360-degree media
Crystal balls
Magic orbs
Panoramas
Infographics Equirectangular projections Globes
Photospheres
Field of view – FOV
Capturing a 360-degree media Summary
Chapter 10: Social VR Metaverse 229 Multiplayer networking 230 Networking services 230 The network architecture 231 Local versus server 232 The Unity networking system 234 Setting up a simple scene 235 Creating a scene environment 235 Creating an avatar head 236 Adding multiplayer networking 238 Network Manager and HUD 238 Network Identity and Transform 238 Running as a host 239 Adding spawn positions 239 Running two instances of the game 240 Associating avatar with the first-person character 241 Adding multiplayer virtual reality 243 The Oculus Rift players 243 The Google Cardboard players 245 Next steps 247 Building and sharing a custom VRChat room 248
??Preparing and building the world
Host the world
Summary
Chapter 11: What's Next? Index

封面图:

发表评论

相关文章