DEV Community

SAUMYA SINHA
SAUMYA SINHA

Posted on

Marker based augmented reality with Vuforia

If you are working with unity 2019 versions and facing problems with setting up Vuforia SDK for marker based reaity, this blog is going to help you out!
Here is an overview of how to set up Vuforia in Unity 2019.
Step 1 :
Create a new project in unity 3D.

Image description

Step 2 : Select "Windows" and then "Package Manager".

Image description

Image description
Make sure you have selected "all packages" before moving to the next step .

Image description

Caution : If you are familiar with Unity 3d and trying to import Vuforia like other version , you may end up with an error!
This is because in 2019 version , Unity has provided build in Vuforia.
Just install it from package manager and you are ready to go :)

picture

Step 3: Search "Vuforia Engine AR" in the package manager and then CLICK on "install".

Image description

It will import the package in your project.

Image description
Step 4 : Get back to your scene . Right click on hierarchy panel .
You can see "Vuforia Engine" in next panel, click on it and select "AR Camera".

Image description

AR Camera in the hierarchy will appear .

IMPORTANT : Don't forget to turn *"main camera" off *. It may cause you unwanted disaster later:|

Image description

PRO TIP: Keep saving the scene after new changes, so that even if unity crashes, you can continue your work from the same point.
Thank me later :p

Step 5 : Select "image" by clicking on hierarchy panel > "Vuforia Engine" > "Image".

Image description

Step 6 :Now its time to get to your browser and build your own database ( Image target)
Search Vuforia developer > Develop > Target Manager

Image description

Image description

Create an ID if you don't have one or else sign in .

Image description

Step 7: Creating a license: Click on develop> license manager >
get basic > type you name > confirm .

Image description

Image description

A new license will appear, copy it and get back to your unity scene .

Image description

Step 8: Select AR Camera and click on "vuforia engine configuration" in the inspector panel.

Image description

Step 9: Click on "Vuforia Engine Configuration" and paste the license .

Caution: Don't click on add license. Just paste the license and close the panel.

Image description

Step 10 : Get back to your browser developer.vuforia.com and
click on develop> target manager > add database .

Image description

Add name of your image target and click on "create".

Image description
Your database will appear in the list , Click on it .
Add target > choose your file which you want to use as your image target > give a name to your image target and choose width =1.

Image description

When everything is set , click on "ADD".

Image description

Step 11: download the database and drag and drop it to your unity scene and import it .

IMPORTANT : Don't forget to click on unity editor before downloading your database.
Image description

Image description

Step 12: Click on "image target" in hierarchy> "database" in the inspector panel.
Your imported image target will appear as the option.

Image description

Step 13: Once you will select your database, it will appear in your scene , Adjust the AR camera .

Image description

Step 14 : Place your object in front of image target .

Image description

IMPORTANT: Don't forget to make the object child of your image target by simple drag and drop.

Image description
Step 15 : You are ready to go! Just click on play .
Once you have added an image to your target, you can create an augmented reality experience by adding 3D models, animations, or other game objects to your scene.

Thankyou!
Don't forget to give a thumbs up 👍.
See you in next blog 😄.

Top comments (1)

Collapse
 
shankaraaditya profile image
Aditya Shankar Tripathi

I am going to follow these steps and become AR/VR developer.