mobile ar lecture 7 - introduction to vuforia

45
LECTURE 7: MOBILE AR USING VUFORIA Mark Billinghurst [email protected] Zi Siang See [email protected] November 29 th -30 th 2015 Mobile-Based Augmented Reality Development

Upload: mark-billinghurst

Post on 13-Apr-2017

1.300 views

Category:

Technology


3 download

TRANSCRIPT

LECTURE 7: MOBILE AR USING VUFORIA

Mark Billinghurst [email protected]

Zi Siang See [email protected]

November 29th-30th 2015

Mobile-Based Augmented Reality Development

What you will learn •  Introduction to Vuforia

•  Platform and features

• How to install/set-up Vuforia • Vuforia Basics

•  Marker Tracking, Object tracking

• Deploying to Mobile Device •  Android, iOS

OVERVIEW

Vuforia Overview • Platform for Mobile Computer Vision

•  https://www.qualcomm.com/products/vuforia

• Released by Qualcomm in 2010, acquired by PTC 2015 • Used by over 100K developers, >10K applications

• Main Features: • Recognition

•  Image, text, object recognition

•  Tracking •  Image, marker, scene, object

Vuforia

•  Android  •  iOS  •  Unity  Extension  

Device  SDK  

•  Target  Management  System    •  App  Development  Guide  •  Vuforia  Web  Services  

Tools  &  Services  

•  Dedicated technical support engineers

•  Thousands of posts Support  Forum  

Vuforia Features

Tracking Targets

Image

Object

Environment

Multiple Device and Tool Support

Developer Tools

Target Manager

Image Analysis Tools

Cloud Services

Platform Anatomy

User Experiences Enabled

INSTALLATION

Download Vuforia for Unity SDK •  https://developer.vuforia.com/downloads/sdk

Download Samples •  https://developer.vuforia.com/downloads/samples

Installing Vuforia Unity Extension • Create new Unity Project •  Import the Vuforia Unity Extension

• Double clicking the *.unitypackage file •  Eg vuforia-unity-5-0-6.unitypackage

• Manually install package •  Assets -> Import Package -> Custom Package

• The extension archive will self install •  folders, plugins and libraries, etc

Imported Vuforia Assets

Unity Asset Structure • Editor - Contains the scripts required to

interact with Target data in the Unity editor • Plugins - Contains Java and native binaries

that integrate the Vuforia AR SDK with the Unity Android or Unity iOS application

• Vuforia - Contains the prefabs and scripts required to bring AR to your application

• Streaming Assets / QCAR - Contains the Device Database configuration XML and DAT files from the online Target Manager

USING VUFORIA

Setting up a Vuforia Project • Create a Project • Replace Main Camera with AR camera • Obtain a License Key • Add license key to AR Camera • Add Tracking Targets • Add sample object

Register as Developer •  https://developer.vuforia.com/user/register

Create License Key •  https://developer.vuforia.com/targetmanager/licenseManager/licenseListing

Obtain a License Key • Vuforia 5 apps utilize a license key that uniquely identifies

each app. License keys are created in the License Manager

•  The steps to creating a new license key are.. •  Choose a SDK •  Choose a licensing option based on your requirements •  Provide your Billing Information if you've chosen to use a paid license •  Obtain your license Key

License Key Generated

Add License Key to Vuforia Project •  Open ARCamera Inspector in Vuforia

•  Assets -> Vuforia -> Prefabs •  Move AR Camera to scene hierarchy (Delete Main Camera) •  Paste License Key

Obtain a License Key • Vuforia 5 apps utilize a license key that uniquely identifies

each app. License keys are created in the License Manager

•  The steps to creating a new license key are.. •  Choose a SDK •  Choose a licensing option based on your requirements •  Provide your Billing Information if you've chosen to use a paid license •  Obtain your license Key

Adding Tracking Targets • Create a target on the Target Manager • OR - Use existing targets from other projects

Which Type of Database • Device Database vs. Cloud Database? • Device: local, Cloud: online

Creating a Target • Create a database • Add targets

Selecting Target Type

Loaded Image Target

• Rating indicates how good a target • Download Dataset -> create unity package

Building the AR Application • Delete “Main Camera” in Scene Hierarchy • Drag ARCamera prefab in the Scene Hierarchy

•  Vuforia -. Prefabs -> AR Camera

•  Import tracking dataset package •  Assets -> Import Package -> Custom Package

• Drag ImageTarget prefab into Scene Hierarchy • Select ImageTarget, pick Data Set then Image Target • On AR Camera load target database and activate

Running the Application

Add 3D Content • As a test, create a simple Cube object

•  GameObject > Create Other > Cube

• Add the cube as a child of the ImageTarget object by dragging it onto the ImageTarget item.

• Move the cube until it is centered on the Image Target.

Cube Test

AR Test View

Sample Applications • Object Recognition •  Image Targets • Cylinder Targets • Multi Targets • User Defined Targets • Smart Terrain (Unity only) • Cloud Recognition •  Text Recognition •  Frame Markers • Virtual Buttons

DEPLOYING TO MOBILE

APPLICATION • Unity

•  Creating the Application •  Configure the export settings and build the Application

42

Building for Android • Open Build Settings • Change Target platform to Android • Switch Platform • Under Player Settings

•  Edit Bundle Identifier – eg com.UniSA.cubeTest •  Minimum API level

• Build and Run •  Select .apk file name

RESOURCES

Resources • Vuforia Product Page https://www.qualcomm.com/products/vuforia • Vuforia Developer Page https://developer.vuforia.com • SDK Download Page https://developer.vuforia.com/downloads/sdk •  Installing Vuforia for Unity extension http://developer.vuforia.com/library/articles/Solution/Installing-the-Unity-Extension •  Tutorials https://developer.vuforia.com/resources/tutorials