350 likes | 529 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?.
E N D
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 Target recognition Face Recognition Object Recognition
Target based AR Marker Based Frame Based Image Based
AR platforms Open CV Pros Cons • 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) • 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,linux) Entropy
AR platforms String SDK Pros Cons • 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) • 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
AR platforms Metaio SDK Pros Cons • 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 • 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
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 • Computer • Unity3D (with a iOS license) • Vuforia SDK (iOS) • iOS device • iOS developers account • Model • Vuforia Dev Account • Sample target image
AR “hello world” Downloading Vuforia SDK for Unity • Go to developer.vuforia.com and click the green Download the SDK button
AR “hello world” Downloading Vuforia SDK for Unity • 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 • 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 • 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 • Start at new project in Unity
AR “hello world” Setting up a new blank AR project in Unity • Right click in the project tab and select Import Package > Custom Package
AR “hello world” Setting up a new blank AR project in Unity • 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.
AR “hello world” Setting up a new blank AR project in Unity • 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.
AR “hello world” Creating a Image Target • 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.
AR “hello world” Creating a Image Target • 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.
AR “hello world” Creating a Image Target • Once you have created a database you will be back at the Target Manager, click on the newly created database (in my case HelloWorldTest).
AR “hello world” Creating a Image Target • 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.
AR “hello world” Downloading the Image Target Database • 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.
AR “hello world” Downloading the Image Target Database • 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.
AR “hello world” Importing the Image target Database into Unity • 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.
AR “hello world” Configuring the AR Camera and Target Data • 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.
AR “hello world” Configuring the AR Camera and Target Data • 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.
AR “hello world” Configuring the AR Camera and Target Data • Now what you will notice is that what was once a quad with no texture now has as a texture the image target.
AR “hello world” Adding a Model • 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.
AR “hello world” Deploying to Device • 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.
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
questions? Ali Al-Aasm - Co-Founder email: ali@redpiston.com phone: 519-916-1005 ext 11 web: www.redpiston.com /redpiston @redpiston