Mamdouh Tarabishi

Instant Tracking Sample

 This is a sample project for using Instant Tracking.
SDK:                      Metaio
Render Software:  Unity3D
AI (Unity Plugin):   R.A.I.N AI Engine
Script Language:    C#

Project FilesIf you are unfamiliar with Augmented Reality, this article could introduce AR to you

To Test the sample:
·
Make sure you have a camera
connected to your system, it is preferred if it is not fixed easier to control
·
Open Unity3D with OpenGL
Render mode, use the command “Unity.exe -force-opengl”
·
Scene is in
“AssetsScenes” Folder Double click on “Main” to open the
project
·
After Opening the Scene:
·
Expand MetaioSDK object:you will find two objects with the name “MetaioTracker”
·
if you click on any of themyou will see in the inspector “Coordinate System ID”This is the Id number which specify which Marker image is associated with this
marker.This information is predefined in the XML File
“TrackingData_MarkerlessFast”Located at the same folder as the markers
“AssetStreamingAssetsTrackingSamples”You may notice also the T1 & T2 Images in that folder. The
markers & the images there are no need for them but they exist because I
copied the XML file from the Previous sample “Marker Based Tracking
Sample”
·
If you expand the
“MetaioTracker” objects you will find:
o
in one of theman object called “Max”
o
and in the other onean object called “Tyrant Zombie”Those are the 3D models which they will appear when Metaio SDK Detect the
scene. (pointing the camera to any scene Metaio will try to identify it)
·
The model “Max” can
be controlled with the keyboard: Movement (W,S,A,D)
·
The model “Tyrant
Zombie” is associated with an AI system
o
if model “Max” get
to his sight rangehe will start following him
o
if model “Max” get
to his attack rangehe will start attacking him(at this sample no health system is not applied)
·
Running the sample:click on the play button at Unity
·
Then click on the 3D button
(it will appear at the left side of the screen)
·
Then move the camera to the
right or to the right then to left (some times you may need to click on 3D
button again)
·
Then once Metaio detect the
scene you will see “Max” & the “Tyrant Zombie” appear
on the screen
·
Note: I used UnityVS add in
to make edit and view the code in Visual Studio
o
You may have to go to:
o
“Edit/Preferences”
o
“External Tools”

 

o
“External Script
Editor”to choose your preferred Editor.

 

Exit mobile version