Developing AR and VR Experiences With Unity
Developing AR and VR Experiences With Unity
Mark Billinghurst
University of South Australia
• Defining Characteristics
• Environment simulation
• Presence
• Interaction
First VR Experience
• “This is so real..”
• https://www.youtube.com/watch?v=pAC5SeNH8jw
Types of VR
7
Key Technologies for VR Systems
• Visual Display
• Stimulate visual sense
• Audio/Tactile Display
• Stimulate hearing/touch
• Tracking
• Changing viewpoint
• User input
• Input Devices
• Supporting user interaction
Augmented Reality
https://www.youtube.com/watch?v=v7fQ_EsMJMs
AR vs VR
Milgram’s Reality-Virtuality continuum
"...anywhere between the extrema of the virtuality continuum."
Mixed Reality
https://immersivelifeblog.files.wordpress.com/2015/04/vr_history.jpg
2005 - Mobile Phone AR
• Mobile Phones
• camera
• processor
• display
• AR on Mobile Phones
• Simple graphics
• Optimized computer vision
• Collaborative Interaction
Wellington Zoo Demo (2007)
https://www.youtube.com/watch?v=edTjuXcce_c
Mobile AR 2009 - Outdoor Overlay
• Mobile phone based
• Tag real world locations
• GPS + Compass input
• Overlay graphics on live video
• Applications
• Travel guide, Advertising, etc
• Wikitude, Layar, etc..
• iOS/Android, Public API released
Layar Demo (2009)
• https://www.youtube.com/watch?v=b64_16K2e08
Vuforia Featured Apps (2015)
https://www.youtube.com/watch?v=6xDyVBsBtX8
Computer Based vs. Mobile VR
2016 - Rise of Consumer HMDs
Oculus Rift
HTC/Valve Vive
Sony Morpheus
HTC Vive
https://www.youtube.com/watch?v=ijukZmYFX-0
Mobile VR: Google Cardboard
+ =
• Immersive Experiences
• 3D graphics
• Lower visual quality
• High interactivity
• Movement in space
• Interact with objects
Immersive Panorama
•Metricon, 3D tours
Applications: Sports and Entertainment
•www.Nexvr.com
• NBA Basketball VR
• US Open Tennis VR
https://www.youtube.com/watch?v=d5lUXZhWaZY
Google Cardboard App
• 7 default experiences
• Earth: Fly on Google Earth
• Tour Guide: Visit sites with guides
• YouTube: Watch popular videos
• Exhibit: Examine cultural artifacts
• Photo Sphere: Immersive photos
• Street View: Drive along a street
• Windy Day: Interactive short story
100’s of Google Play Cardboard apps
BUILDING AR AND VR
What You Need
• Cardboard Viewer/VR Viewer
• https://www.google.com/get/cardboard/
• Smart phone
• Android/iOS
• Authoring Tools/SDK
• Google VR SDK
• Unity/Unreal game engine
• Non programming tools
• Content
• 3D models, video, images, sounds
Software Tools
• Low level SDKs
• Need programming ability
• Java, C#, C++, etc
• Example: Google VR SDK (iOS, Android)
• https://developers.google.com/vr/
• Game Engines
• Powerful, need scripting ability
• Unity - https://unity3d.com/
• Unreal - https://www.unrealengine.com/vr
• Combine with VR plugins (HMDs, input devices)
• Google VR Unity plugin
Unity Interface
Tools for Non-Programmers
• Focus on Design, ease of use
• Visual Programming, content arrangement
• Examples
• Insta-VR – 360 panoramas
• http://www.instavr.co/
• Vizor – VR on the Web
• http://vizor.io/
• A-frame – HTML based
• https://aframe.io/
• ENTiTi – Both AR and VR authoring
• http://www.wakingapp.com/
• Eon Creator – Drag and drop tool for AR/VR
• http://www.eonreality.com/eon-creator/
INTRO TO UNITY
Unity Show Reel
• https://www.youtube.com/watch?v=8lWpnvNxs8k
Unity 3D Game Editor
SETUP
Download and Install
• Go to unity3d.com/download
• Use Download Assistant – pick components you want
Getting Started
• First time running Unity you’ll be asked to create a project
• Specify project name and location
Unity Interface
• Toolbar, Scene, Hierarchy, Project, Inspector
Customizable Interface
Building Scenes
• Use GameObjects:
• Containers that hold different components
• Eg 3D model, texture, animation
• Use Inspector
• View and edit object properties and other settings
• Use Scene View
• Position objects, camera, lights, other GameObjects etc
• Scripting
• Adding interaction, user input, events, etc
GameObjects
• Every object in Scene is a GameObject
• GameObjects contain Components
• Eg Transform Component, Camera Component
Adding 3D Content
• Select Sphere
• Add Rigidbody component
• Add Component -> Physics -> RigidBody
• or Component -> Physics -> RigidBody
using UnityEngine;
using System.Collections;
• http://paulbourke.net/miscellaneous/cubemaps/sph2.jpg
5. Creating a Skybox material
• https://www.youtube.com/watch?v=kBTn2pGwZUk
Key Steps
1. Create simple scene
2. Add Character Controller to scene
3. Creating walk script
4. Connect Character Controller to script
5. Testing scene
1. Create Simple Scene
• Main Features:
• Recognition
• Image, text, object recognition
• Tracking
• Image, marker, scene, object
Vuforia Provides
• Android
Device SDK •
•
iOS
Unity Extension
Object
Environment
Developer Tools
Target Manager
Cloud Services
Platform Anatomy
User Experiences Enabled
USING VUFORIA
Key Steps
1. Enable Vuforia in project
2. Load AR Camera
3. Configure camera
4. Load Tracking Image
5. Add 3D model
6. Test AR Scene
1. Enable Vuforia in project
• From http://www.google.com/design/spec-vr/designing-
for-google-cardboard/a-new-dimension.html
Physiological Considerations
• Factors to Consider
• Head tracking
• User control of movement
• Use constant velocity
• Grounding with fixed objects
• Brightness changes
Interactive Patterns - Setup
• Setup factors to consider:
• Entering and exiting
• Headset adaptation
• Full Screen mode
• API calls
• Indicating VR apps
Interactive Patterns - Controls
• Applications
• Collaboration, large scale
Bare Hands
• https://www.youtube.com/watch?v=QD4qQBL0X80
Eye Tracking
• Technology
• Shine IR light into eye and look for reflections
• Advantages
• Provides natural hands-free input
• Gaze provides cues as to user attention
• Can be combined with other input technologies
Example: FOVE VR Headset
• https://www.youtube.com/watch?v=R8lmf3OFrms
Social VR
https://www.youtube.com/watch?v=yxHwWHHg4Vs
CONCLUSIONS
Conclusion
• VR and AR have a long history
• Early prototypes from 1960’s onwards
• Having second phase of commercial success
• Projected to grow to over $120B market by 2020
• Mostly mobile AR/VR in near term
• It is easier than ever before to develop AR/VR apps
• Multiple easy to use tools for non-programmers
• Powerful developer tools for programmers
• There are many opportunities for research
• Collaboration, interaction, navigation, etc
RESOURCES
Google Poly for 3D models
• https://poly.google.com/
• Repository of user contributed low polygon objects
• Free to download for AR/VR applications
Resources
• Excellent book
• 3D User Interfaces: Theory and Practice
• Doug Bowman, Ernst Kruijff, Joseph, LaViola, Ivan Poupyrev
• Great Website
• http://www.uxofvr.com/
@marknb00