You are on page 1of 6

172460248-5 1

Augmented Reality through Unity and Vuforia


Chuquitarco Stalin

In this way, we can affirm that Augmented Reality is


characterized by:
Summary- In this project we have made an augmented
• Combine the real and virtual world
reality program which is developed in the Unity program and
• Offer real-time interaction
with the union of Vuforia add-ons and licenses, in this way
• Adapt to the environment in which it is inserted
we will be able to show the favorable results of our project.
• Interact with all the physical capabilities of the
Keywords: augmented reality, objects, programming, Unity, environment (in three dimensions).
Vuforia.

I. OVERALL OBJECTIVE
• Create an augmented reality program in Unity and
Vuforia.

II. SPECIFIC OBJECTIVE


• Create an Android application for image detection and
augmented reality.
• Visualize 4 objects with their respective characteristics
in augmented reality.
• Programming through Visual Studio the code that will
perform the functions in Unity.
IV. THEORETICAL FRAMEWORK Fig1. Augmented Reality.
A. Augmented Reality.
Augmented Reality is a technological resource that offers C. How Augmented Reality works.
interactive experiences to the user from the combination of the The integration between the real (physical) world and the
virtual and physical dimensions, with the use of digital devices. virtual world is the main objective of this technology. Thus, for
Companies are increasingly aware of the importance that Augmented Reality to be reproduced, 3 fundamental
technology represents in people's lives and, for this reason, many components are needed.[3]
are looking for new alternatives to attract the attention of their
audience through digital transformation processes.[1]
• A real object that functions as a reference for the
B. What is augmented reality? interpretation and creation of the virtual object.
Augmented Reality (AR) assigns the interaction between • The presence of a device with a camera —such as a
virtual environments and the physical world, allowing both to mobile phone— to transmit the image of the real
intermingle through a technological device such as webcams, object.
mobile phones (IOS or Android), tablets, among others. • A software responsible for interpreting the signal
transmitted by the camera.
In other words, AR embeds virtual objects in the physical
context and displays them to the user using the interface of the
real environment with the support of technology. This resource Through the camera, the real object is transmitted to the
has been revolutionizing the way we deal with our tasks (and software, which receives the image and combines it with 3D
even those we assign to machines).[2] projections. In turn, the projections are inserted into the image
and superimposed on the physical environment, reflecting the
result of the AR to the user.

07/02/2022
172460248-5 2

D. What is UNITY? You can use any device with a camera to test AR/MR
Unity is a video game development tool created by games and apps built on Unity with Vuforia.
the company Unity Technologies. On the Unity website,
in the Made with Unity section, we can see that this
software has been used to create many well-known
games and others not so well known. It has also been used
to create interactive Virtual Reality experiences and even
miniseries, such as "Baymax Dreams", produced by
Disney together with Unity, where the editor has been
used to process and preview all the chapters of the
miniseries in real time.[4]
With Unity some of the most famous mobile games
have been developed, "Monument Valley", "Ghost of a Fig3. Plataform VUFORIA
Tale", "Hollow Knight" or "Cuphead". Unity is a tool that
not only includes engines for rendering images, 2D/3D III. DEVELOPMENT AND PROCEDURE
physics, audio, animations and other engines, but also
includes networking tools for multiplayer, NavMesh A. Create account and license in VUFORIA.
navigation tools for Artificial Intelligence or support of The first thing we will have to do is create an account in
Virtual Reality.[3] Vuforia Engine, then we will create a new basic project which
will provide us with a free license which will be essential to
create our project in UNITY, in this same Vuforia platform we
will have to import the images that They will be referential for
our augmented reality, which will create a Unity file to be
exported and used in the Unity developer.

Fig2. Program UNITY.

E. What is VUFORIA?
Vuforia is a cross-platform Augmented Reality (AR)
and Mixed Reality (MR) application development
platform, with robust tracking and performance on a
variety of hardware (including mobile devices and mixed
Fig4. Program UNITY.
reality head-mounted monitors (HMDs) such as
Microsoft HoloLens). The Unity integration in Vuforia
allows you to build vision apps and games for Android B. Editing the program in Unity.
and iOS using a drag-and-drop build workflow. A The first thing that will be done is to integrate 4 reference
Vuforia AR + VR sample pack is available on the Unity images which will be the basis for our augmented reality, and
Asset Store, with several useful samples demonstrating then we align these in our Scene, for this the alignment tools are
the most important features of the platform. used.
Vuforia supports many third-party devices (such as
AR/MR glasses) and VR devices with rear-facing
cameras (such as Gear VR). See Vuforia's page on
Devices for a full list of supported devices. See the
Vuforia API Reference for more information about the
classes, properties, and functions used in the SDK.[4]
172460248-5 3

Fig7. Text
The fourth step is to create a thumbnail that will serve us to
place the videos in each object, for this we must edit the texture
Fig5. Basic images of them, for which it will be changed to the Sprite 2D and UI
The second thing is to import from the Assest Store platform format, then the video is dragged to the thumbnail so that is
the 3D objects that will be placed in each of the images, for this saved.
we must again edit the position parameters and place them above
each image.

Fig8. Thumbnails
The fifth step is to edit certain parameters and download
certain editing packages that Unity will ask us to continue
editing. Now an audio will be placed on each element, for which
we proceed to import 4 audios in .wab format so that they can
be played in Unity. For this step we will need to edit the Script
in Visual Studio.

Fig9. Audio
Our sixth step would be to edit our SCRIPT through
Fig6. Objects 3D
VISUAL STUDIO, it will be integrated into our project folders.
As a third, we will place the text boxes, the same ones that We proceed to attach certain lines of code for the recognition of
will be created using the Plane tool and the texMeshPro tool, video and audio.
which will be essential to be able to have a base and their
respective letters. In our project we have chosen to place the
description of each of the objects.
172460248-5 4

Fig10. Start script


We must also place the similar lines of code to achieve the
start of the audios and videos when the object is recognized by
the camera, in them we will also have to place the lines of code
for its Pause and Stop respectively.

Fig12. Add videos

IV. ANALYSIS AND RESULTS


A. Our project in the Scene
We can see our flat view project where we manage to align
correctly and order each of the elements, in the same way we
will show the perspective view to look at its 3D format.

Fig11. Script video


Our next step will be to place the respective audio, video and
script in each of the base image projects, where we must also
configure the playback parameters.

Fig13. Final scene


172460248-5 5

B. Visualization of in our camera.


Now we will be able to see how our program works thanks
to the option to start using the computer's camera. Here we can
clearly see the results obtained from one of the objects. It should
be remembered that each one of them has its own audio, video,
and independent text.

Fig15. At Unity
C. Import ANDROID APK
Finally, we proceed to import our project to an Android
phone, for this it will be important to edit certain parameters in
the Build Settings since this way we will be able to import our
APK for Android correctly.

Fig16. Export of APK


We will be able to obtain our APK file, the same one that
will have to be visualized through the AIRDROID program.

Fig14. Reality in Unity Fig17. APK


Now we proceed to start it in our AIRDROID program, and
we can already see our finished augmented reality work on our
Android phone.
172460248-5 6

Fig19. Program in Android


V. CONCLUSIONS
• Augmented reality is a tool of the future since, thanks
to its friendly programming and editing, it is possible
to carry out many projects in the automated industry
sector.
• It is necessary to download Vuforia since thanks to
this we can obtain our respective license and we will
be able to interact through the camera with our objects
in augmented reality.
• Our program was satisfactory and of great help for the
future form of learning and information on the
different topics of automation and engineering in
general.

VI. RECOMMENDATIONS
• When importing the images that will be our base to
form the augmented reality, these will have to be very
clear and stand out in their background, so that the
textures are correct and there are no recognition errors.
• Have the ability to program all types of programming
language as it will be essential to avoid operating
errors.

VII. REFERENCIAS

[1] L. H. Lara and J. L. V. Benitez, “La realidad


aumentada: una tecnología en espera de usuarios,”
Rev. Digit. Univ., 2007.

[2] G. National and H. Pillars, “No 主観的健康感を中心


Fig18. Program in Android とした在宅高齢者における 健康関連指標に関す
る共分散構造分析Title.”

[3] M. V. Ledo, B. L. Alonso, A. S. Garrido, A. M.


Hernández, I. D. R. M. Suárez, and A. M. T.
Fernández, “Realidad aumentada,” Rev. Cuba. Educ.
Medica Super., vol. 31, no. 2, 2017.

[4] H. Martínez, “Tutorial Básico - UNITY,” pp. 1–31.

You might also like