Prototyping for AR – Vuforia Targeted Audio Tutorial

Prototyping for AR, Uncategorized
The Vuforia component makes AR objects come to  life in Unity, making it easy to apply 3D objects, images, video, audio and more onto targets. We learned how to use it to create augmented 3D objects on image targets, and now we’ll learn to trigger audio when that image (or other) target is recognised by the AR camera, adding sound effects to our augmented reality.

Step 1

Follow this tutorial to use Vuforia in Unity in order 
to add a 3D object to an image target.

Step 2

In Unity, go to GameObject > Audio > Audio Source,
and add it to your Image Target as a child in the 

Step 3

Take the .mp3, .wav (or likewise) audio file and drag 
it into your Assets folder for the project in Unity

Step 4

Drag the audio file into the Audio Clip section in the 
Inspector when you click the Audio Source

Make sure you uncheck the "Play on Awake" option, 
unless you want the audio to play every time the 
project starts

Step 5

Stay in the Audio Source Inspector. In the 3D Sound
Settings, tweak the Max Distance according to your 
project. The larger this is, the more likely that 
sound will be able to reach the audio listener of 
your ARCamera even when the distance from the Image 
Target is large

Step 6

Create a C# Script. This will create your AudioSource.
Here you can code how and what will trigger the audio
in terms of number of targets, their order and 
hierarchies etc

The code should look something like this example, 
called ImageTargetPlayAudio, which implements the 
ITrackableEventHandler interface.
Add it to your Image target.

Another example, for when  multiple targets are added 
and require different sounds to be played according 
to the number of targets tracked

Step 7

And you're done! Test the AR experience by hitting 
"Play" on your scene and use your target image to 
trigger the new sound you just added!


Case Study – Super Mario AR by Abhishek Singh

Prototyping for AR

Super Mario AR

ITP alumnus Abhishek Singh’s project went viral last year in 2017. Check out the video:

Super Mario in AR is a fun project, not to mention the only time true Mario Kart fans can immerse themselves in the game they previously only played on a screen. This fact is the biggest reason why the public took specific interest in the game, and I’m assuming would love to see more iconic games and movies in this enveloping medium.

The game uses the Hololens to add augmented Super Mario elements on to the real world, and certain gestures to control the progress of the main character. It has a first person’s POV, and for features like growing in size after a mushroom as been tapped, for instance, the size of the environment is decreased to have the same effect.

It has a multiplayer version, making the whole thing a lot more fun. The design is taken from the iconic game itself and imposed in this case to a walkway in Central Park.

The intended audience I believe are existing fans of the game, people who like immersive gaming, young gamers, and people with the ability to move about.

I find this project an inspiring because I tend to expect AR to add enjoyable and entertaining possibilities to its targets, kind of like Snapchat filters. Another aspect is that of AR encouraging body movement. Once AR hardware gets light enough and portable enough, you can actually see how stuff like this might be able to encourage people to get out and stay active. The real world, with like actual hikes and stuff, just gets boring so fast.