NExT Lab
Maker SpacesFabLabNExT LabRobotics LabPrint Room and Loans
  • NExT Lab
  • Contact Details
  • NExT Lab Access
  • Sustainability
    • 3D Printing
  • Case Studies & Projects
    • |3DS|VR| Voices of Country
    • |3DS| Our Quiet Neighbour
    • |3DS| OFF FORM | OFF MODERN
    • |3DP|AR| Prosthetic Habitats
    • |AR| Studio 40: The Field
    • |VR|3DP| Gravity Sketch: Door Handles
    • |3DS| 3D Scanning Examples
    • |AR|3DP| GRANULAR
  • 3D Printing |3DP|
    • 3D Printing at the NExT Lab
      • Other 3D Printing Options
    • Get Started
    • Design Approaches
    • Modelling Guidelines
    • 3D Print Farm
      • Quick-Start Guide
        • File Naming Conventions
      • Detailed Overview
        • 3D Printing Mesh Preparation
        • Submitting a Print Request
        • Post-Submission: Updating, Paying & Collecting
        • Slicing & Settings
    • Open Access Printers
      • PRUSA Open-Access
        • Workflows
          • Materials Experimentation
          • Experimental Techniques
        • Prusa i3 MK3S Fundamentals
        • Hardware Glossary
          • Extruder
          • Hotend & Nozzle
          • Print Surface, Bed & Y Axis
          • PINDA Inductive Probe
          • X-Axis Gantry
          • Z-Axis Stage
        • Software/Slicer Glossary
          • Plater/Virtual Print Bed
          • Print Settings
          • Filament Settings
          • Printer Settings
        • Troubleshooting
          • Filament Jam/Clog
          • Worn Nozzle
          • Broken/Loose Heatbreak
          • First Layer Issues/Prints Not Sticking to Bed
          • Stringing & Oozing Hotend
    • Use Own Filament
    • Key Techniques
      • Hollowing Models
      • Combating Warping
      • Split Models & Joints
      • Joints and Connections
      • Fillets & Chamfers
      • Accuracy, Precision & Tolerancing
      • Post-Processing & Finishing
        • No Sanding Method
        • Sanding Method
        • Epoxy Method
        • Fillers Method
      • Printing for Transparency
      • Mesh Techniques
        • Meshes 101
        • Working with Meshes
        • Repairing Meshes
        • Other Techniques
          • Thicken a Mesh with Grasshopper
          • Mesh Manipulation with Blender
          • Custom Supports in Meshmixer
      • Topography Models
      • Using the Makerbot Experimental Extruder
      • Troubleshooting
      • Adjusting Print Settings
    • Resources
      • Downloadable Software & Accounts
      • Software Primers
        • Autodesk Meshmixer
        • Blender
    • Mold Making and Casting
  • 3D Scanning |3DS|
    • 3D Scanning at the NExT Lab
    • 3D Scanning Use Cases
    • Guides
      • Principles of 3D Scanning / Digital Reconstruction
      • Photogrammetry
        • Photogrammetry Theory
        • Photogrammetry Benchmark
        • Technical Guides
          • From Photos to 3D Spatial Data
          • Advanced Techniques
          • Taking Measurements + Visualisation
          • From Photogrammetry to 3D Printing
      • BLK360 Terrestrial LiDAR Scanner
        • BLK360 Benchmark
        • Scan
        • Register
          • Export from iPad
        • Process
      • Artec Handheld SLT Scanners
        • Using the Scanners
        • Manual Alignment
        • Fill Holes
        • Smoothing
        • Frame Selection
      • VLX LiDAR SLAM Scanner
        • VLX setup
        • Preparing to Scan
        • Using the Scanner
        • Processing the Scans
      • Working with 3D Scan Data
        • Point Clouds and Rhino
        • Point Clouds and Cloud Compare
        • Point Clouds and Blender
        • Point Clouds to Meshes
    • Troubleshooting
      • General
      • Artec EVA
      • Leica BLK360
      • VLX
  • Augmented Reality |AR|
    • Augmented/Mixed Reality at the NExT Lab
      • Use Case of AR
    • Guides
      • Hololens 2
      • Fologram
        • Fologram Applications
          • Fologram for Hololens
          • Fologram for Mobile
        • Fologram for Rhino
        • Fologram for Grasshopper
        • Shared Experiences / Tracked Models
        • Extended Functionality
          • Preparing Models for AR
          • Interactivity
          • Fabrication
      • Unity and Vuforia
        • Unity Primer
        • 2D Targets (Image Targets)
        • 3D Targets (Object Targets)
        • Vuforia Primer
        • Creating a Simple AR App
          • Unity Next Steps: Interaction
          • Model Recognition
    • Troubleshooting
      • Hololens & Fologram
      • FAQ: Augmented Reality
    • Resources
      • Platforms (Hardware)
        • Microsoft Hololens
        • Mobile
      • Software Packages
      • Student Contact
        • AR: Intro Sessions
        • AR: Workshops and Resources
          • UntYoung Leaders Program Workshopitled
          • Young Leaders Program Workshop
          • Construction as Alchemy
  • Virtual Reality |VR|
    • Virtual Reality at the NExT Lab
    • Guides
      • Virtual Reality Hardware Set Up
        • Meta Quest 3
          • Troubleshooting
        • HTC Vive Headsets
          • HTC Vive
            • Troubleshooting
          • HTC Vive Pro
          • HTC Vive Cosmos
            • Troubleshooting
      • Twinmotion VR
        • Twinmotion VR: Features
        • Twinmotion VR: Troubleshooting
      • Virtual Reality Experiences
        • Unreal Engine
          • Unreal Engine Primer
            • Process: Level Building, Playing & Packaging
            • Actors: Components, Content and Editors
            • Materials & Textures
            • Lighting & Mobility
            • Player: VR and non-VR
            • Interactivity & Blueprints
          • Unreal Engine: Guides
            • Setting up a VR-ready File & Templates
            • Creating a Basic VR Experience
            • Custom Collision and Navigation
            • UV and Lightmaps
            • Outputting Content
            • Unreal Troubleshooting
            • Point Cloud Visualisation
          • VR: Video Tutorial Series
            • Exporting from Rhino
            • Model Preparation in 3DS Max
            • Unreal Engine
      • Designing in Virtual Reality
        • Gravity Sketch
          • Quick Start
        • Masterpiece Creator
    • Student Contact
      • VR: Intro Sessions
  • Sensing
    • Body Tracking
      • Usage
        • Technical Specifications
      • Data Analysis in Grasshopper
        • Analysis Examples
      • Animated Point Clouds(UE)
  • ROBOTICS
    • Robotic Dog
      • Operational Health & Safety
      • Robot Dog Setup
      • Operation Setup
        • Operation Basics
        • Arm Mode
        • Programming Mode
        • Mapping Mode
      • Advanced Operations
      • Expansion Equipment / Attachments
      • Basic Simulation
      • Troubleshooting
Powered by GitBook
On this page
  • Introduction to Vuforia and Unity for Creating Augmented Reality Applications
  • Workflow
  • Create a Unity Project
  • Vuforia Database and License Management
  • The AR Camera
  • Adding the Unity Development Key
  • ImageTargets
  • Adding Content to ImageTargets
  • Adding Annotations
  • Debugging
  • Importing Other Model Types in to Unity
  • Importing assets from the Asset store.
  • Importing .obj Files
  • Final Output
  • Packaging Applications
  • Going Further
  • Other Resources

Was this helpful?

  1. Augmented Reality |AR|
  2. Guides
  3. Unity and Vuforia

Creating a Simple AR App

PreviousVuforia PrimerNextUnity Next Steps: Interaction

Last updated 5 years ago

Was this helpful?

Introduction to Vuforia and Unity for Creating Augmented Reality Applications

Vuforia Engine is the most widely used platform for AR development. It can easily be integrated with Unity.

Developers can easily add advanced computer vision functionality to any application, allowing it to recognize images and objects, and interact with spaces in the real world.

The Vuforia Engine platform supports AR app development for Android, iOS, and UWP devices. See:

Workflow

This tutorial will cover the creation of a basic application which recognises ImageTargets and displays information based on the recognition of those targets. The basic process of app development is to:

  • Create a Unity Project

  • Create a Vuforia License and Image Database

  • Add an Augmented Reality Camera

  • Add Image Targets

  • Add GameObjects as Child Assets

  • Build Application

Ensure you have downloaded and installed Unity and created a Vuforia Developer Account

Create a Unity Project

Follow the steps outlined in the Unity Primer to create an example project.

We have named our project AugmentedRealityDemo

Vuforia Database and License Management

Import the .unitypackage in to the newly created Unity Project.

The AR Camera

The first GameObject required to create an Augmented Reality app is the Vuforia AR Camera.

The AR Camera is located under the GameObject menu: GameObject > Vuforia Engine > AR Camera

During first-run, Vuforia Assets may take several minutes to unpack and install

The ARCamera will now appear in the Hierarchy Window.

When the ARCamera GameObject is selected, a Camera Preview window should appear. By default, Unity will use the computer's webcam as the ARCamera.

Ensure Vuforia is enabled in Player Settings:

File > Build Settings > Player Settings > XR Settings > Vuforia Augmented Reality

Adding the Unity Development Key

With the ARCamera selected, click Open Vuforia Engine Configuration from the Inspector window. Inspector > Vuforia Behaviour (Script) > Open Vuforia Engine Configuration

Copy and paste the License Key created on the Vuforia License Manager

Click Debug (The play symbol in the centre of the toolbar) to verify that the Unity is able to access the camera.

Delete all unnecessary GameObjects such as the MainCamera and Directional Light

Hierarchy Window > Select > Right-click > Delete

ImageTargets

Image Targets can be added as children of the ARCamera by selecting the AR Camera in the Hierarchy Window and adding Images from the GameObject Menu

GameObject > Vuforia Engine > Image

The Image Target can be changed within the Inspector Window drop-down menu.

You can duplicate the ImageTarget GameObject by right-clicking the object in the Hierarchy Window and selecting Duplicate.

For this tutorial, we have created three ImageTarget GameObjects, each with a different Image Target. (Bark, Stones and Tarmac).

Adding Content to ImageTargets

ImageTargets are objects which, when detected by the ARCamera, can display some type of content. This content can either be in the form of:

  • Assets downloaded from the Unity Store,

  • .obj files

  • Assets built in to Unity such as

    • 3D Geometries

    • Text

This tutorial will focus on adding simple 3D geometries and Text built in to Unity.

To add a cube, head to GameObject > 3D Object > Cube.

Ensure to scale the object correctly using the controls in the Inspector Window, and that the GameObject is a child of a particular ImageTarget in the Hierarchy Window.

Adding Annotations

Simple 3d Text can be added by heading to GameObject > 3D Object > 3D Text

Rotate and Resize the text using the Transform functions in the Inspector Window.

This text should be made a child of either the ImageTarget or the Cube we have just created.

As we want the text to show as an annotation of the Cube, we have made it a child of the Cube, by dragging and dropping the GameObject in the Heirarchy Window.

Debugging

Use the Play button in the toolbar to test the application.

Importing Other Model Types in to Unity

Models can be imported in to your Unity Application in a variety of ways.

Importing assets from the Asset store.

The asset store provides access to a library of pre-made content (both paid and free). This content is particularly useful to easily create animated figures.

To access the asset store, click Asset Store on the Scene Window Toolbar.

You can search for free assets by using the cost slider. Download your asset and drag and drop it from the Project Window

Importing .obj Files

The easiest way to import .obj models in to Unity is by dragging and dropping the model files in to the Project Window. It is best practice to keep these assets their own dedicated folder. .stl and .3dm filetypes are not supported in Unity.

See also: Creating and texturing .obj files in Rhino3d.

Final Output

This scene consists of assets built in to Unity,

Packaging Applications

Applications can be packaged for different platforms. Head to File > Build Settings and select the desired platform. Be sure to click Add Open Scenes to Build.

Vuforia only supports a variety of handheld and headset devices. Therefore, AR apps built with the Vuforia Engine cannot easily be deployed on Windows or OSX.

Note that for iOS applications, OSX and XCode are required.

Going Further

Other Resources

Follow the steps outlined in the to obtain a Development License Key and to create a Target Database. Our Target Database is titled AugmentedRealityDemo.unitypackage

See the for information on

See:

Vuforia Supported Versions
Vuforia Primer
Unity Primer
Supported Devices
Unity Next Steps: Interaction
AR App Development With Vuforia Engine | PTC
Introduction to Vuforia on Unity for Creating Augmented Reality...Game Development Envato Tuts+
Getting Started with Vuforia Engine in Unity | VuforiaLibrary
Unity Primer
Building Applications
Logo
Figure 0.2 - Create a New Unity Project
Figure 0.3 - Import the Vuforia Target Database
Figure 1.0.1 - Importing the AR Camera GameObject
Figure 1.0.2 - The Hierarchy Window
Figure 1.0.3 - Vuforia AR needs to be enabled
Figure 1.0.4 - Enabling Vuforia in Player Settings
Figure 1.1 - Copy and Paste the Unity Development Key in to the App License Key Field
Figure 2.0.1 - Adding ImageTargets
Figure 2.0.2 - Changing Image Targets
Figure 2.0.3 - Duplicating Image Targets
Figure 3.0.1 - Inserting premade GameObjects
Figure 3.0.2 - Using the Hierarchy Window
Figure 3.1.1 - Adding 3D Text
Figure 3.1.2 - Using the Hierarchy Window
Figure 4.0 - Debugging an Application
Figure 5.1.1 - Importing Assets from the App Store
Figure 5.1.2 - Inserting Assets in to a Scene
Figure 5.2 - Importing .obj Files
Figure 5.3 - Final Output
Logo
Logo