MobileMonday_Au g12 - Meetup

muterollMobile - Wireless

Dec 10, 2013 (3 years and 10 months ago)

141 views

agenda


Who is Red Piston?


Introduction to recognition
based AR


Target based AR


AR Platforms


AR “hello world” demo


Future of AR

who is red piston?


Red Piston specializes in building innovative Mobile Apps and
Games for iPhone, iPad, Android and Blackberry Playbook with a
focus on clean interface design.

We also design and develop Web
sites and create motion graphics for mobile, web, and traditional media.
“Started at the bottom now were here”
-

Drake

Examples of Recognition




Face Recognition

Target recognition

Object
Recognition

Target based AR




Marker Based

Frame Based

Image Based

AR platforms

Open CV

Entropy

Pros

Cons



Very flexible (because it’s so
low level you can extend it to
face , hand , object , image,
colour and target recognition)



Can be reliable (if you know
what your doing)



Totally Free!



Open Source (Always
envolving on a globel level.
Totally Free! Royalty Free!



Very platform agnostic (.Net,
Python, Obj C, Java)



Very device agnostic
(ios,android,windows,mac,linu
x)



Not simple to setup and use



Big learning curve



Can be unreliable if not
configured properly



No plugins for 3D engine
(although you can roll your
own of course)

AR platforms

String SDK

Pros

Cons




Somewhat Reliable and
accurate



Frame based AR (makes for
a more content flexible target)



Very easy to setup , great
documentation



Simple Unity Plugin for iOS
and Android!


Simple SDK to integrate with
iOS using openGL and
android using openGL



Not simple to setup and
use



Big learning curve



Can be unreliable if not
configured properly



Marker based AR
supported only



Does not support occlusion



Expensive depending on
use ( anywere from 0 for a
demo to Campaign at $7000)

AR platforms




Metaio SDK

Pros

Cons




Somewhat reliable and
accurate



Marker / Frame and Image
based recognition



Location based AR



3D SLAM /3D
MARKERLESS



Very easy to setup



Simple Unity Plugin for iOS
and Android!


Simple SDK to integrate with
iOS using openGL and
android using openGL




More friction to setup a
project (you need a dev key)



Not great for multiple target
recognition



3D markerless is not there



Not the best support for devs
(my experience)



Scattered documentation



Expensive for commercial
use

AR platforms

Vuforia SDK

Pros

Cons




Very Reliable



Frame and Image based
recognition



Cloud based campaign AR



User created targets



Very easy to setup , great
documentation



Simple Unity Plugin for iOS
and Android!


Simple SDK to integrate with
iOS using openGL and
android using openGL


Totally Free!!! (with the
exception of an enterprise
cloud AR DB setup)



Great support from
Qualcomm




Image based targets really
need to be in a certain way
content wise to make for a
good target

AR “hello world”

Using Unity + Vuforia = the path of least resistance

What you’ll need

1.
Computer

2.
Unity3D (with a iOS
license)

3.
Vuforia SDK (iOS)

4.
iOS device

5.
iOS developers account

6.
Model

7.
Vuforia Dev Account

8.

Sample target image

AR “hello world”

Downloading Vuforia SDK for Unity

1.

Go to
developer.vuforia.com

and click the green
Download the
SDK button

AR “hello world”

Downloading Vuforia SDK for Unity

2.

In the
Resources

section make sure on the left platform
section you have
Unity Extension

selected, then on the right click
Download Unity Extension 2.6.7 for Android & iOS

AR “hello world”

Downloading Vuforia SDK for Unity

3.

If you have a developers account already you need to log in
and a download prompt will appear (if your not a member sign up
and try again)

AR “hello world”

Downloading Vuforia SDK for Unity

4.

Once downloaded you will notice it downloads at a
.unitypackage which is sort of like Unitys version of a zip file.

AR “hello world”

Setting up a new blank AR project in Unity

5.

Start at new project in Unity

AR “hello world”

6.

Right click in the project tab and select Import
Package >
Custom Package

Setting up a new blank AR project in Unity

AR “hello world”

7.

Goto your files and choose the
.unitypackage

for the SDK we
just downloaded in the previous steps. When the import dialgoe
box comes up make sure everything is
“checked”

and hit
import.

Setting up a new blank AR project in Unity

AR “hello world”

8.

Now find the
Prefabs

folder and drag the
ARCamera

Prefab
and the
ImageTarget

Prefab on to the
Scene
. Also delete the
Main Camera

from this new blank scene. You should now see a
blank white plane.

Setting up a new blank AR project in Unity

AR “hello world”

9.

We now need to create the actual target to be recognized. We
do this by logging into Vuforia’s developer portal and using their
target management system. Click
Target Manager
when logged
in, make sure your under the
Device Databases

tab and click
Create Database
.

Creating a Image Target

AR “hello world”

10.

A dialog will come up asking you to name the Database. Give
it any name you like and hit
Create

in the bottom right corner.

Creating a Image Target

AR “hello world”

11.

Once you have created a database you will be back at the
Target Manager, click on the newly created database (in my case
HelloWorldTest
).

Creating a Image Target

AR “hello world”

12.

When you click into the database created you need to click
Add Target
. A popup will appear, here you give the target a
name, pick the type,
Target Dimension

and pick a image to use.

Creating a Image Target

AR “hello world”

13.

After a few minutes and a page refresh you will get a profile
with a thumbnail image of your target, star rating (0 to 5, 5 being
the best) and you can click the checkbox and click Download
Selected Targets to get a unitybundle copy of the targets
database to import into Unity.

Downloading the Image Target Database

AR “hello world”

14.

When you click
Download Selected Targets
you will be
presented with a pop up with a few choices. You need to switch
the radio button to
Unity Editor

and give the .unitypackage a file
name, then hit
Create
. It will then create the target database file
as a .unitypackage, save this somewhere safe.

Downloading the Image Target Database

AR “hello world”

14.

Goto your files and choose the
.unitypackage

for the image
target database we just created in the previous step. When the
import dialogue box comes up make sure everything is
“checked”

and hit
import.

Importing the Image target Database into Unity

AR “hello world”

15.

In the Scene view, click on
ARCamera
, then in it’s inspector
under the
Data Set Load Behaviour

script make sure to check
Load Data Set HelloWorldTest
(this will be different and match
the name you chose) , also make sure
Activate

is checked on.

Configuring the AR Camera and Target Data

AR “hello world”

16.

Next click on
ImageTarget

gameobject in the Scene and in
that game objects inspector settings under the
Image Target

Behavior script click next to
Data Set

and from the drop down
select your target (in my case
HelloWorldTest
) it should also
default and chose your
Image Target
.

Configuring the AR Camera and Target Data

AR “hello world”

17.

Now what you will notice is that what was once a quad with
no texture now has as a texture the image target.

Configuring the AR Camera and Target Data

AR “hello world”

18.

Your ready at this point to add any model as a child to your
image target, once this is done your technically done. Take any
model and drag it from your library to the Scene and drag it to
ImageTarget so it becomes a child of that object.

Adding a Model

AR “hello world”

19.

Finally you just need to fill out the appropriate settings for the
build and hit
Build and Run
. Vuforia SDK comes with a
preprocessing script that will properly include the needed vuforia
static library and all needed frameworks.

Deploying to Device

AR “hello world”

Using Unity + Vuforia = the path of least resistance

Whats important
-

Tracking Delegates

DefaultTrackableEventHandler.cs


private void OnTrackingFound()


private void OnTrackingLost()

AR “hello world”

Using Unity + Vuforia = the path of least resistance

Whats important
-

Virtual Button Delegate

Extend the IVirtualButtonEventHandler class


public void OnButtonPressed(VirtualButtonBehaviour vb)


public void OnButtonReleased(VirtualButtonBehaviour vb)

Future of AR

Google Glass

3D Markerless

Ali Al
-
Aasm
-

Co
-
Founder

email:
ali@redpiston.com

phone: 519
-
916
-
1005 ext 11

web: www.redpiston.com

questions?

/redpiston

@redpiston