Upload
others
View
17
Download
0
Embed Size (px)
Citation preview
Augmented Reality… What is it? (vs VR???)➢ Augmented reality superimposes computer generated objects onto the
real world.➢ Unlike virtual reality which puts users in a computer generated
environment, augmented reality keeps the real world and puts computer generated objects in it.
Morton Heilig is back!➢ Morton Heilig (Dec 1926 - May
1997) is a pioneer in the virtual reality field, and he is most often called the father of virtual reality
➢ He developed the sensorama!➢ Through the sensorama, he
helped shape augmented reality!
And so is Ivan Sutherland!➢ Ivan Sutherland (May
1938 - PRESENT) is most often known as the father of computer graphics.
➢ He built the first head mount display (HMD) called the sword of damocles. This was the first use case of augmented reality!
First usage of the term “Augmented Reality”➢ It isn’t clear as to who is the father of augmented reality, but the first use
of the term “Augmented Reality” was done by Thomas P. Caudell and Mizell, who worked with heads-up display to guide assembly at Boeing.
○ https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=183317
Why Augmented Reality?
Unlike virtual reality, it cannot create a “new world” perse… So why AR?
1) It is easy to do with Unity!2) It’s the next hype!3) Technology is growing!
(Market is expected to be $60 billion by 2023!)
Two concepts we are covering today...Marker Detection
➢ Training a device to detect a marker.○ A marker was originally black and white
to allow easier edge detection.○ With more advanced technology, the
pictures just have to be distinct nowadays!
SLAM
➢ Stands for Simultaneous Localization and Mapping
○ Allows a device to find feature points, which are distinct points in the real world (EX: vertices, etc).
○ Because the device now can recognize features of the world, marker is no longer necessary!
➢ Allows us to place virtual objects in real world and move
Let’s get started...➢ First, we need to make sure that your Unity has Vuforia
downloaded (if you followed lecture 0, this should already be installed!). ○ https://library.vuforia.com/articles/Training/getting-
started-with-vuforia-in-unity.html#betas ➢ While downloading Unity, you must check the box to
integrate Vuforia Augmented Reality Software to Unity.
Enabling Vuforia Game Engine➢ File → Build Settings → Player Settings → XR Settings → Enable Vuforia
Augmented Reality
Creating a Marker➢ As part of last week’s assignment, you should have brought 2-3 flat
objects with unique features on it. ➢ Also as part of last week’s assignment, you should have an application
called “CamScanner” on your phone. If not, download it now!
How to use CamScanner to create a marker1) Open CamScanner app2) Click on the camera button3) Take an image of the object you brought! Include some buffer since
this application will allow you to crop!4) Adjust the crop box and click next.5) Choose “Original” for filter, then hit done.6) Select the image you took, and save to your gallery7) From gallery, share it to yourself through email or some other
method.8) Download the image and drag and drop it to your computer.
Critical Error➢ As of the time this slide was made, there is an error in the
RuntimeOpenSourceInitializer script.➢ The error looks like this:
○ Assets\Vuforia\Scripts\Internal\RuntimeOpenSourceInitializer.cs(61,63): error CS0234: The type or namespace name 'ScriptableRenderContext' does not exist in the namespace 'UnityEngine.Rendering' (are you missing an assembly reference?)
➢ To fix this, open the script, and change #if UNITY_2018_3 to #if UNITY_2018
Adding License➢ Find the VuforiaConfiguration object in
the Resources folder. Select the object and view it in the inspector.
➢ We will need to add a Vuforia license to use Vuforia.
➢ Click “Add License➢ Register for an account!
Add license key!➢ Go back to Unity➢ Click on VuforiaConfiguration object
in the Resources folder.➢ Paste the license key in the “App
License Key” box!
Adding target (image)1) Choose single image as your
type2) Browse and select your
marker image3) Type 6 as the width (for now, 6
should be fine!)4) Name your marker5) Click Add
➢ Your image will appear here, and every image is given a rating.➢ If the rating says “processing” after a long time, refresh the page➢ The rating must be either 4 or 5 stars! This rating is how unique the object
is compared to your surrounding!
➢ Click on Download Database (All).➢ Choose Unity Editor➢ Click Download➢ This will give you a Unity Package, which you can click to import
to Unity!
➢ Your image can be found at Editor → Vuforia → ImageTargetTextures → [Name_of_your_database]
➢ To add a image, go to Gameobject → Vuforia Engine → Image
Make sure that the database and image target matches your image!
Add a gameobject you want to display as a child of the image target!
Move and scale the object so that it is on top of the marker!
Show your maker to the computer!➢ If you click play now, your front facing camera on the computer will come
on!➢ Show your marker to the computer and see if the virtual object spawns on
top of your marker!
Assignment!For this week’s assignment, you will create an AR Book using Vuforia. The book must be at least 5 pages in length and must have a common theme (Ex: animals, stars, etc).
Here are some suggestions:
1. Add Audio2. Add fancier objects from the asset store3. Draw your own book4. Convert an existing story book into an AR version of it.
Keep in mind that this can also be extended as your final project!