Book Image

Unity 2018 Augmented Reality Projects

By : Jesse Glover
Book Image

Unity 2018 Augmented Reality Projects

By: Jesse Glover

Overview of this book

Augmented Reality allows for radical innovations in countless areas. It magically blends the physical and virtual worlds, bringing applications from a screen into your hands. Meanwhile, Unity has now become the leading platform to develop augmented reality experiences, as it provides a great pipeline for working with 3D assets. Using a practical and project-based approach, Unity 2018 Augmented Reality Projects educates you about the specifics of augmented reality development in Unity 2018. This book teaches you how to use Unity in order to develop AR applications which can be experienced with devices such as HoloLens and Daydream. You will learn to integrate, animate, and overlay 3D objects on your camera feed, before gradually moving on to implementing sensor-based AR applications. In addition to this, you will explore the technical considerations that are especially important and possibly unique to AR. The projects in the book demonstrate how you can build a variety of AR experiences, whilst also giving insights into C# programming as well as the Unity 3D game engine via the interactive Unity Editor. By the end of the book, you will be equipped to develop rich, interactive augmented reality experiences for a range of AR devices and platforms using Unity.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
Index

Advantages and disadvantages of the different AR toolkits available


In this section, we will discuss the advantages and disadvantages of ARCore, Vuforia, ARToolKit, and ARKit.

ARCore

ARCore is a platform for building augmented reality apps for Android devices. ARCore uses three key technologies to integrate virtual content with the world through the camera. It uses motion tracking, environmental understanding, and light estimation. ARCore works by tracking the position of the device as it moves and builds its own understanding of the real world. It is able to identify interesting points and readings from the phone's sensors and has the ability to determine both the position and the orientation of the phone as it moves. ARCore only has a few supported devices at the present time, which are as follows:

  • Google Pixel
  • Pixel XL
  • Pixel 2
  • Pixel 2 XL
  • Samsung Galaxy S8

If you don't own one of these devices, you are stuck using the Android Emulator for testing purposes. This is a very obvious downside, since not everyone owns one of these specific phones; additionally, the Android Emulator is an experimental piece of software and is subject to change often. The upside is that ARCore works with Unity3D and Unreal Engine as well as native to Android devices using the Java programming language.

 

ARKit

ARKit, which was introduced in iOS 11, is a framework for easily creating augmented reality projects for the iPhone and iPad. ARKit's features include:

  • TrueDepth Camera
  • Visual Inertial Odometry
  • Scene Understanding
  • Lighting Estimation
  • Rendering Optimizations

 The downsides to ARKit are that it is an experimental software and subject to change often, and that it requires the use of the Apple iPhone X to take full advantage of the TrueDepth Camera. You cannot compile this on Windows for Mac, so it is a requirement to have a macOS to even test the code properly. The pros, however, are that ARKit works with Unity3D and Unreal Engine and can utilize the A9, A10, and A11 Apple processors. In other words, it works with the iPhone 6S and beyond.

Vuforia

Vuforia is one of the most popular platforms to help you work with augmented reality development. It supports the following:

  • Android
  • iOS
  • UWP
  • Unity3D Editor

Vuforia is able to do many different things, such as recognition of different types of visual objects (such as boxes, cylinders, and planes), text and environment recognition, and VuMark, which is a combination of picture and QR code. Also, using the Vuforia Object Scanner, you can scan and create object targets. The recognition process can be implemented using the database (local or cloud storage). The Unity plugin is simple to integrate and very powerful. All plugins and functionalities of the platform are free to use but include the Vuforia watermarks.

 

 

The limitations just relate to the number of VuMarks and the amount of Cloud recognition:

  • Paid plan without watermarks
  • 1,000 Cloud recognitions
  • 100,000 targets
  • Costs $99 per month

The obvious downside is that this is not 100% free software, although they do have a developer tier with 1,000 cloud recognitions and 1,000 targets for free per month.

ARToolKit

ARToolKit is an open source tracking library for AR projects. It is supported on Android, iOS, Linux, and macOS. ARToolKit has the functionality to utilize the following:

  • Single or stereo camera for position/orientation tracking
  • Tracking of simple black squares
  • Tracking of planar images
  • Camera calibration
  • Optical stereo calibration
  • Optical head-mounted display support

It is fast enough for real-time AR applications. It is also free and open source software, with plugins for Unity and OpenSceneGraph. The downside to this software is that it has a huge variety of functions, so it is difficult to integrate the library, and it takes more time to explore all the available options and settings.