We are starting a new project. AR(Augment Reality)!
Augmented reality (AR) is a live direct or indirect view of a physical, real-world environment whose elements are augmented (or supplemented) by computer-generated sensory input such as sound, video, graphics or GPS data.
To download an AR software development kit, go to the website vuforia.com.
Click a register button and create an account.
After you create an account, go to the Downloads – SDK tab.
And click ‘Download for Unity’.
And also download this file.
This is the file which is going to be a tag image. (rock)
So the files you need is like this.
Inside the rocks zip file, there’s rocks.jpg.
Now we’re ready to begin! Let’s create a new project.
And before we start, we are going to change our platform to iOS.
Go to assets, and import the package you downloaded. (vuforia SDK)
And we are going to download ‘cute kitten’ in asset store.
We are going to delete the Main Camera.
And go to Assets > Vuforia > Prefabs. Find the AR Camera. Drag it to the scene.
I’ve set the position 0,0,0.
Inside the inspector of AR Camera, there’s a space for App License Key. We have to fill that space. Go to the vuforia website again, and get free license key.
Copy the license key, and we’ll going to paste in unity.
And go back to vuforia website, go to target manager tab.
Click ‘Add Database’.
Create a database and add target also.
Check ‘Single Image’, and browse a rocks.jpg file.
The rate is five stars. This means your picture is proper in AR. The picture should have lots of details and high contrast.
Now download database, select Unity Editor.
So we’ve got another unity package.
Import your custom package. Inside the vuforia > prefabs, there’s ‘ImageTarget’.
Drag it into your scene. The position is 0,0,o.
Drag your kittenNPC also into your scene.
And in Hierachy, drag kittenNPC into the image target. Now kitten became a child.
In AR Camera inspector, find Databade Load Behaviour script.
Load arClassDemoDB and check activate.
And go to image target. Find image target behaviour script.
Select your arClassDemoDB database.
Wow! Now click play button and see how it works!
Unfortunately, mine has an error in this step. When I click a play button, the unity program is suddenly shut down. T.T
So I decided to export to Xcode directly, and it worked!!
I made different version of this.
I suceeded to operate, but there’s a strange thing.
When I recognize the character, the character gets smaller like falling down.
After it gets smaller it disappears.. I don’t know why this is happen, so I should solve this problem in next class.