In the past couple of years, if not more, the technology of virtual, augmented and, lately, mixed realities have taken a huge leap forward both for consumers as well as enterprise. Initially augmented reality (AR) almost entirely consisted of overlaying data on the real world, triggered by a shape, a logo, a QR code, or something else that could be easily recognised. Most of all it was very similar to a heads up display. Not really interacting with the real world, not really being part of your reality.

In January 2015 Microsoft announced the HoloLens Mixed Reality headset, which was released a year later. The HoloLens took augmented reality to an entirely new level, and Microsoft called this "mixed reality" (MR). The groundbreaking aspect of it is the environmental scanning and spatial mapping capabilities, which means the device knows the physical layout of your surroundings to an amazing degree of details. 

Image by Morten Nielsen from http://www.sharpgis.net/post/2016/04/10/Using-HoloLens-Spatial-Mapping-to-occlude-objects

This detailed awareness of the environment means that digital assets, or holograms, knows where their surroundings are and can act accordingly. You can have people sitting next to you on a chair or couch, place digital flowers on top of a real table, have characters navigate your actual living room and much much more. This spatial mapping and tracking capability essentially left other augmented reality implementations for dead. 

Apple announced ARKit as part of iOS version 11, which, using only the camera on the device, can also track and environment, and not long after Google announced their ARCore. Both of these technologies are groundbreaking in being able to track the physical environment using existing hardware, and relying primarily on the camera to do the tracking and mapping. This means that you can use any new-ish iOS or Android device to view highly convincing augmented reality experiences

ARCore and Unity 3D

To start building ARCore apps is not difficult. However, because the framework is still in preview release only a small number of devices are supported. If you don't have one of these devices, it isn't as much fun going through the tutorials. 

To set up your development environment and start developing ARCore experiences with Unity is pretty straight forward and you can follow this guide. It will give you a simple app that shows the spatial grid and you can then place little Android robots on the real surfaces of the room.

(Image by Google)

Once you have your development environment set up, there are a number of fun things you can try out, if you are up for reading the documentation. This will improve over time, but for now it is very limited and examples to try out are hard to come by.

ARCore and Xamarin

If you aren't a Java developer (I certainly aren't) and still want to work with ARCore, there is now also a project to port over the API for using in C# projects with Xamarin. This is important, because the Xamarin community already has over 1 million developers signed up to use their products. That is 1 million more developers to use the ARCore technology. On top of that you can use Visual Studio to build your ARCore app, however, it should be said it is also very early days for Xamarin for ARCore, so bugs and "shenanigans" are to be expected. 

To get started with Xamarin and ARCore you'll need the community edition of Visual Studio with the Xamarin tooling installed. Then follow the instructions at the GitHub page for the ARCore Xamarin project.

ARCore and Unreal Engine

A popular tool for creating games is Unreal Engine, which has been used in creating great games and experiences. The unreal engine offers proven tooling to start building 3D experiences, which is why it fits so well in with ARCore and AR in general. Follow this guide to set up you development environment. Compared to the two approaches above, Unity and Xamarin, using the Unreal Engine does require quite a bit more low level setup and preparation. You will have to build you own version of the Unreal Engine source code and then set it up with the Android and ARCore tooling. The result can be as convincing as the other platforms.

Unreal Engine with ARCore (image by Google)


Three.js and ARCore

There is also kind of a web approach to using AR Core. This is one of the most experimental technologies using ARCore still and requires a special build of Google Chromium in the form of an app for Android or iOS. The setup is not too difficult, but it does install very experimental software on your phone.  The great thing is that you can use the very popular three.js JavaScript library to build AR experiences, and in particular the helper library three.ar.js provides a lot of the basic building blocks for it. 

ARCore Example running on Android (image by Google)


x
 
1
THREE.ARUtils.getARDisplay().then(init);
2
3
function init(display) {
4
  vrDisplay = display;
5
  // Set up three.js scene
6
  renderer = new THREE.WebGLRenderer({ alpha: true });
7
  scene = new THREE.Scene();
8
9
  // ...
10
11
  // Set up our ARView with ARPerspectiveCamera
12
  arView = new THREE.ARView(vrDisplay, renderer);
13
  camera = new THREE.ARPerspectiveCamera(vrDisplay, 60, window.innerWidth / window.innerHeight, vrDisplay.depthNear, vrDisplay.depthFar);
14
  vrControls = new THREE.VRControls(camera);
15
16
  update();
17
}
18
19
function update() {
20
  // Update our controls/camera, the ARView rendering,
21
  // and our three.js scene
22
  vrControls.update();
23
  arView.render();
24
  renderer.clearDepth();
25
  renderer.render(scene, camera);
26
  vrDisplay.requestAnimationFrame(update);
27
}

Still Early Days

Although there are at least 4 different ways to get started using ARCore, it is still really early days. If you do want to take the jump and build an Android AR experience, expect bugs to surface, things to change with little or no notice, and some frustration. At least you will be on the forefront of AR development, and once the platform is stable and available to the general consumer, millions of users will have access to it. 

I would suggest to choose your tool for development based on any experience you might have. If you haven't got any experience, I would recommend using Unity 3D, as it is very well documented, has a large user base and can be used to build for a range of platforms, such as Xbox, iOS, mixed reality and more.

Have you played with AR or any other related technology? Let me know if the comments below.