Getting started with Vuforia Engine (Unity3D)

Nishant Mittal
6 min readJan 19, 2020

--

Before starting with Vuforia Augmented Reality, I assure that you probably already know what Unity3D is ! and for what purpose you are using Unity3D either for Game Development, Building 3d models, Tracking Images and for other user interactive interfaces.

Vuforia is an augmented reality software development kit (SDK) for mobile devices that enables the creation of augmented reality applications.

Setting up Vuforia Engine

The Vuforia SDK supports a variety of 2D and 3D target types including ‘markerless’ Image Targets, 3D Model Target. It also includes 6 degrees of freedom device localization in space, localized Occlusion Detection using ‘Virtual Buttons’, runtime image target selection and the ability to create and reconfigure target sets programically.

Vuforia provides Application Programming Interfaces (API) in C++, Java, .Net languages through an extension to the Unity game engine. SDK supports development for iOS, Android and also enables in Unity that are easily portable to both platforms.

The first thing you’ll need is a working computer (Windows/macOS, either will work at a time). As we know Unity is currently not working on Linux, so you might need to switch to windows/macOS if you’re a Linux user.

I also suggest you get a mouse for working with Unity. It isn’t necessary, but it will make your work much easier and smoother.

Alright then, let’s get started.

Installing Vuforia Engine

Search For Vuforia Developer Portal and Register Yourself.

https://developer.vuforia.com/downloads/sdk

(Note : If you have already installed Unity)

click on downloads and SDK as shown above. Click on Add Vuforia Engine to a Unity Project or upgrade to latest version and Click on I Agree to install/Download the software license. After getting installed, Import the package file to the unity3d project on which you are currently developing.

OR

If you have installed Unity Hub , Go to Installs -> If you have installed any version of unity on unity hub

then click on : option to Add modules

then checkbox the Vuforia Augmented Reality Support and click Done. Vuforia package support will be added to the existing version of unity.

If There is no unity version installed in unity hub , click on ADD in blue box as shown , Then select any version version according to your choice and support

After choosing any version click Next, then select Vuforia Augmented Reality Support and click Done. Now, Unity with vuforia package will get installed in your pc.

Creating Vuforia AR Project using Unity3D

Open Unity and Create a New Project.

This is how it appears.

Now, delete Main Camera from the Hierarchy and Import AR Camera which is supported by Vuforia for app development to track objects & images.

Import Image Tracker which is used to track Images and Image targets.

Drag Image Tracker into AR Camera as a child-parent category.

Now, Select File -> Build Settings… to support Vuforia Augmented Reality.

Click on Switch Platform to Switch the platform according to your Support of your devices and click on Player Settings… to support Vuforia Augmented Reality.

Again Open Vuforia Developer Portal in Browser and click on Develop and License Manager — > Get Development Key

Add License Name and checkbox the below terms & condition box

click Confirm. It will appear like this.

Click on the License Key that we have get as above mentioned Demo (Key Name) and will appear as.

Copy this License Key and Open unity Project and click AR Camera and In inspector panel click on Vuforia Behaviour (script) and click on Open Vuforia Engine Configuration.

After this, Paste the License key in App License Key column.

Now, Go to Vuforia Developer Portal (in browser) and click on Target Manager.

Click on Add Database and Write Database name and select its Type and click on Create.

This will appear as.

Click on demo Database and Click on Add Target.

Now, Select Type , Choose File from Browse… , Enter Width and Enter Name and Click Add.

Target is Uploading.

Now, checkbox the Add Target and click on Download Database , then select Unity Editor from development platform and click on Download.

Compiling Database will get downloaded in the form of demo.unitypackage and drag this unitypackage into unity project and Import it.

In unity, click on Image Target in Hierarchy,then in Inspector Panel change the Database to demo and Image Target to demo1.

Now, we can see in scene Panel, an image tracker with an image present on it appears. Looks really cool !!!

Conclusion

So, In this blog , you got to know how to install vuforia and how vuforia is used in tracking of marker less targets and 3D objects in Unity! You can now create complex projects and models by using and joining together a couple of basic ones.

Hope you love this experience of getting deep dive in Augmented Reality using (Unity + Vuforia). I’d love to see your creations in the comments section below !!

--

--