Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Virtual Reality Blueprints
Virtual Reality Blueprints

Virtual Reality Blueprints: Create compelling VR experiences for mobile and desktop

Arrow left icon
Profile Icon Palmer Profile Icon John Williamson
Arrow right icon
$19.99 per month
Paperback Feb 2018 250 pages 1st Edition
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Palmer Profile Icon John Williamson
Arrow right icon
$19.99 per month
Paperback Feb 2018 250 pages 1st Edition
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Virtual Reality Blueprints

Building a Solar System for Google Cardboard

"For the things we have to learn before we can do them, we learn by doing them."
- Aristotle

The process of learning by experience and reflection, better known as experiential learning, is central to my teaching philosophy. Throughout this book, we will explore virtual reality development processes by completing projects designed to illustrate the power of VR and the ease of use of the Unity 3D engine. Your role is to use these projects as a starting point for your own work. Complete the projects, reflect on the process, and expand upon them to enrich your learning and creative curiosity.

Our exploration will begin with a visualization of a newly discovered solar system. This project is a dioramic scene, where the...

Platform setup

Before we begin building the solar system, we must setup our computer environment to build the runtime application for a given VR device. If you have never built a Unity application for Android or iOS, you will need to download and install the Software Development Kit (SDK) for your chosen platform. An SDK is a set of tools that will let you build an application for a specific software package, hardware platform, game console, or operating system. Installing the SDK may require additional tools or specific files to complete the process, and the requirements change from year to year, as operating systems and hardware platforms undergo updates and revisions.

To deal with this nightmare, Unity maintains an impressive set of platform-specific instructions to ease the setup process. Their list contains detailed instructions for the following platforms:

  • Apple Mac
  • Apple...

Google Cardboard setup

Like the Unity documentation website, Google also maintains an in-depth guide for the Google VR SDK for Unity set of tools and examples. This SDK provides the following features on the device:

  • User head tracking
  • Side-by-side stereo rendering
  • Detection of user interactions (via trigger or controller)
  • Automatic stereo configuration for a specific VR viewer
  • Distortion correction
  • Automatic gyro drift correction

These features are all contained in one easy-to-use package that will be imported into our Unity scene. Download the SDK from the following link, before moving on to the next step: http://developers.google.com/cardboard/unity/download.

At the time of writing, the current version of the Google VR SDK for Unity is version 1.110.1 and it is available via a GitHub repository. The previous link should take you to the latest version of the SDK. However, when...

Setting up the Unity environment

Like all projects, we will begin by launching Unity and creating a new project. The first steps will create a project folder which contains several files and directories:

  1. Launch the Unity application.
  2. Choose the New option after the application splash screen loads.
  1. Create a new project by launching the Unity application. Save the project as Trappist1 in a location of your choice, as demonstrated in Figure 2.2:
Figure 2.2: New project window

To prepare for VR, we will adjust the Build Settings and Player Settings windows.

  1. Open Build Settings from File | Build Settings.
  2. Select the Platform for your target device (iOS or Android).
  1. Click the Switch Platform button to confirm the change. The Unity icon in the right-hand column of the platform panel indicates the currently selected build platform. By default, it will appear next to the Standalone...

Building the TRAPPIST-1 System

Now that we have Unity configured to build for our device, we can begin building our space themes VR environment. We have designed this project to focus on building and deploying a VR experience. If you are moderately familiar with Unity, this project will be very simple. Again, this is by design. However, if you are relatively new, then the basic 3D primitives, a few textures, and a simple orbiting script will be a great way to expand your understanding of the development platform:

  1. Create a new script by selecting Assets | Create | C# Script from the main menu. By default, the script will be titled NewBehaviourScript. Single click this item in the Project window and rename it OrbitController. Finally, we will keep the project organized by dragging OrbitController's icon to the Scripts folder.
  2. Double-click the OrbitController script item to...

Building the application

To experience this simulation in VR, we need to have our scene run on a head-mounted display as a stereoscopic display. The app needs to compile the proper viewing parameters, capture and process head tracking data, and correct for visual distortion. When you consider the number of VR devices we would have to account for, the task is nothing short of daunting.

Luckily, Google VR facilitates all of this in one easy-to-use plugin.

The process for building the mobile application will depend on the mobile platform you are targeting. If you have previously built and installed a Unity app on a mobile device, many of these steps will have already been completed, and a few will apply updates to your existing software.

Note: Unity is a fantastic software platform with a rich community and an attentive development staff. During the writing of this book, we tackled...

Summary

Our goal for this book is to provide an experiential learning approach to development. We want to guide your learning, but we will also provide many opportunities to augment your learning with additional creative challenges and links to external sources to expand upon the projects described here.

In this chapter, we looked at the base Unity workflow for developing VR experiences. We provided a stationary solution so that we could focus on the development process. The Cardboard platform provides access to VR content from a mobile platform, but it also allows for touch and gaze controls, which we will explore in the next chapter. Our second activity, an interactive image gallery, will be built for the Samsung VR Gear, but it can also be built for the Google Cardboard platform.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Develop robust, immersive VR experiences that are easy on the eye.
  • • Code 3D games and applications using Unity 3D game engine.
  • • Learn the basic principles of virtual reality applications

Description

Are you new to virtual reality? Do you want to create exciting interactive VR applications? There's no need to be daunted by the thought of creating interactive VR applications, it's much easier than you think with this hands-on, project-based guide that will take you through VR development essentials for desktop and mobile-based games and applications. Explore the three top platforms—Cardboard VR, Gear VR, and OculusVR —to design immersive experiences from scratch. You’ll start by understanding the science-fiction roots of virtual reality and then build your first VR experience using Cardboard VR. You'll then delve into user interactions in virtual space for the Google Cardboard then move on to creating a virtual gallery with Gear VR. Then you will learn all about virtual movements, state machines, and spawning while you shoot zombies in the Oculus Rift headset. Next, you'll construct a Carnival Midway, complete with two common games to entertain players. Along the way, you will explore the best practices for VR development, review game design tips, discuss methods for combating motion sickness and identify alternate uses for VR applications

Who is this book for?

If you are a game developer and a VR enthusiast now looking to get stuck into the VR app development process by creating VR apps for different platforms, then this is the book for you. Familiarity with the Unity game engine and the C# language is key to getting the most from this book.

What you will learn

  • • Use Unity assets to create object simulation.
  • • Implement simple touch controls in your application.
  • • Apply artificial intelligence to achieve player and character interaction.
  • • Add scripts for movement, tracking, grasping, and spawning.
  • • Create animated walkthroughs, use 360-degree media, and build engaging VR experiences.
  • • Deploy your games on multiple VR platforms.

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 28, 2018
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781786462985
Vendor :
Unity Technologies
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Feb 28, 2018
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781786462985
Vendor :
Unity Technologies
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 153.97
Virtual Reality Blueprints
$43.99
Unity Virtual Reality Projects
$54.99
Augmented Reality for Developers
$54.99
Total $ 153.97 Stars icon

Table of Contents

11 Chapters
The Past, Present, and Future of VR Chevron down icon Chevron up icon
Building a Solar System for Google Cardboard Chevron down icon Chevron up icon
Building an Image Gallery System for the Gear VR Chevron down icon Chevron up icon
Adding User Interactions to the Virtual Gallery Project Chevron down icon Chevron up icon
Fighting Zombies on the Oculus Rift Chevron down icon Chevron up icon
Scripting Zombies for the Oculus Rift Chevron down icon Chevron up icon
Carnival Midway Games — Part 1 Chevron down icon Chevron up icon
Carnival Midway Games — Part 2 Chevron down icon Chevron up icon
VR Hardware Roundup Chevron down icon Chevron up icon
VR Terms and Definitions Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.