Complete Virtual Reality and Augmented Reality Development with Unity
eBook - ePub

Complete Virtual Reality and Augmented Reality Development with Unity

Leverage the power of Unity and become a pro at creating mixed reality applications

Jesse Glover, Jonathan Linowes

Buch teilen
  1. 668 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Complete Virtual Reality and Augmented Reality Development with Unity

Leverage the power of Unity and become a pro at creating mixed reality applications

Jesse Glover, Jonathan Linowes

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Get close and comfortable with Unity and build applications that run on HoloLens, Daydream, and Oculus Rift

Key Features

  • Build fun augmented reality applications using ARKit, ARCore, and Vuforia
  • Explore virtual reality by developing more than 10 engaging projects
  • Learn how to integrate AR and VR concepts together in a single application

Book Description

Unity is the leading platform to develop mixed reality experiences because it provides a great pipeline for working with 3D assets.

Using a practical and project-based approach, this Learning Path educates you about the specifics of AR and VR development using Unity 2018 and Unity 3D. You'll learn to integrate, animate, and overlay 3D objects on your camera feed, before moving on to implement sensor-based AR applications. You'll explore various concepts by creating an AR application using Vuforia for both macOS and Windows for Android and iOS devices. Next, you'll learn how to develop VR applications that can be experienced with devices, such as Oculus and Vive. You'll also explore various tools for VR development: gaze-based versus hand controller input, world space UI canvases, locomotion and teleportation, timeline animation, and multiplayer networking.

You'll learn the Unity 3D game engine via the interactive Unity Editor and C# programming.

By the end of this Learning Path, you'll be fully equipped to develop rich, interactive mixed reality experiences using Unity.

This Learning Path includes content from the following Packt products:

  • Unity Virtual Reality Projects - Second Edition by Jonathan Linowes
  • Unity 2018 Augmented Reality Projects by Jesse Glover

What you will learn

  • Create 3D scenes to learn about world space and scale
  • Move around your scenes using locomotion and teleportation
  • Create filters or overlays that work with facial recognition software
  • Interact with virtual objects using eye gaze, hand controllers, and user input events
  • Design and build a VR storytelling animation with a soundtrack and timelines
  • Create social VR experiences with Unity networking

Who this book is for

If you are a game developer familiar with 3D computer graphics and interested in building your own AR and VR games or applications, then this Learning Path is for you. Any prior experience in Unity and C# will be an advantage. In all, this course teaches you the tools and techniques to develop engaging mixed reality applications.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Complete Virtual Reality and Augmented Reality Development with Unity als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Complete Virtual Reality and Augmented Reality Development with Unity von Jesse Glover, Jonathan Linowes im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Virtual Reality. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2019
ISBN
9781838644864

Content, Objects, and Scale

You may remember building a diorama project for school from a shoebox as a child. We're going to make one today, using Unity. Let's assemble our first scene, which is composed of simple geometric objects. Along the way, we'll talk a lot about world scale. Then we'll explore various 3D content creation tools that developers and artists use for assets imported into Unity. In this chapter, we will discuss the following topics:
  • A short introduction to the Unity 3D game engine
  • Creating a simple diorama in Unity
  • Making some measuring tools, including a unit cube and a grid projector
  • Using Blender to create a cube with texture maps and importing it into Unity
  • Using Google Tilt Brush to create a 3D sketch and importing it into Unity via Google Poly
  • Using the experimental Unity EditorXR tools for editing scenes directly in VR

Getting started with Unity

If you don't have the Unity 3D game engine application installed on your PC yet, do that now! The full-featured Personal Edition is free and runs on both Windows and Mac. To get Unity, go to https://store.unity.com/, select the version that you want, click on Download Installer, and continue following the instructions. This book assumes you have version 2017.2 or later of Unity.
For you beginners out there, we're going to take this first section nice and slow, with more hand-holding than what you'll get later on in the book. Furthermore, even if you already know Unity and have developed your own games, it may be worthwhile to revisit the fundamental concepts, since the rules are sometimes different when designing for virtual reality.

Creating a new Unity project

Let's create a new Unity project named VR_is_Awesome, or whatever you'd like.
To create a new Unity project, launch Unity from your operating system and the Open dialog box will appear. From this dialog box, select New, which opens a New Project dialog box, as shown in the following screenshot:
Fill in the name of your project and verify that the folder location is what you want. Ensure that 3D is selected (on the right). There is no need to add any extra asset packages at this time, as we'll bring them in later if we need them. Click on Create project.
Unity 2018 introduced the Unity Hub tool for managing multiple Unity versions and projects. If you are using Unity Hub, you can choose the "3D" template, or one of the newer VR render pipeline templates for your project.

The Unity editor

Your new project opens in the Unity editor, as shown in the following screenshot (where I arranged the window panels in a custom layout to facilitate this discussion and labeled the visible panels):
The Unity editor consists of a number of non-overlapping windows, or panels, which may be subdivided into panes. Here's a brief explanation of each panel that is shown in the preceding layout image (your layout may be different):
  • The Scene panel on the upper left-hand side (highlighted) is where you can visually compose the 3D space of the current scene, including the placement of objects.
  • Below the Scene panel is the Game view (lower left-hand side), which shows the actual game camera view (presently, it is empty with an ambient sky). When in Play Mode, your game runs in this panel.
  • In the center, we have arranged the Hierarchy, Project, and Console panels (from the top to the bottom, respectively).
  • The Hierarchy panel provides a tree view of all the objects in the current scene.
  • The Project panel contains all the reusable assets for the project, including the ones imported as well as those that you'll create along the way.
  • The Console panel shows messages from Unity, including warnings and errors from code scripts.
  • On the right-hand side is the Inspector panel (highlighted), which contains the properties of the currently selected object. (Objects are selected by clicking on them in the Scene, Hierarchy, or the Project panel). The Inspector panel has separate panes for each component of the object.
  • At the top is the main menu bar (on a Mac, this will be at the top of your screen, not at the top of the Unity window). There's a toolbar area with various controls that we'll use later on, including the Play (triangle icon) button that starts Play mode.
From the main menu bar's Window menu, you can open additional panels as needed. The editor's user interface is configurable. Each panel can be rearranged, resized, and tabbed by grabbing one of the panel tabs and dragging it. Go ahead, try it! On the upper right-hand side is a Layout selector that lets you either choose between various default layouts or save your own preferences.

The default world space

A default empty Unity scene consists of the Main Camera object and a single Directional Light object, as listed in the Hierarchy panel and depicted in the Scene panel. The Scene panel also shows a perspective of an infinite reference ground plane grid, like a piece of graph paper with nothing on it yet. The grid spans across the x (red) and z (blue) axes. The y-axis (green) is up.
An easy way to remember the Gizmo axes colors is by keeping in mind that R-G-B corresponds to X-Y-Z.
The Inspector panel shows the details of the currently selected item. Select the Directional Light with your mouse, either from the Hierarchy list or within the scene itself, and look at the Inspector panel for each of the properties and components associated with the object, including its transform. An object's transform specifies its position, rotation, and scale in the 3D world space. For example, position (0, 3, 0) is 3 units above (in the Y direction) the center of the ground plane (X = 0, Z = 0). A rotation of (50, 330, 0) means that it's rotated 50 degrees around the x-axis and 330 degrees around the y-axis. As you'll see, you can change an object's transforms numerically here or directly with the mouse in the Scene panel.
Similarly, if you click on the Main Camera, it may be located at the (0, 1, -10) position with no rotation. That is, it's pointed straight ahead, towards the positive Z direction.
When you select the Main Camera, as shown in the preceding editor screenshot, a Camera Preview inset is added to the Scene panel, which shows the view that the camera presently sees. (If the Game tab is open, you'll see the same view there too). Presently, the view is empty and the reference grid does not get rendered, but a foggy horizon is discernible, with the grey ground plane below and the blue default ambient Skybox above.

Creating a simple diorama

Now, we will add a few objects to the scene to set up the environment, including a unit cube, a flat plane, a red ball, and a photographi...

Inhaltsverzeichnis