Hey we live there!

I was really excited when Sceneform was announced at I/O earlier this year, and couldn’t wait to get stuck into building AR apps on Android. Essentially Sceneform is an SDK which empowers you to work with ARCore without having to learn 3D graphics and write OpenGL. This is great news if you’ve always been interested in Augmented Reality but don’t know an awful lot about cartesian coordinates and matrix multiplication! (which is my situation for sure!)

ARCore was released in March but now developers don’t need to write OpenGL thanks to Sceneform!

Augmented Images interact with real world images and uses ARCore to create 3D experiences. In this post I’ll cover how to create a Augmented Images Android app using Sceneform (you can find a OpenGL example in the ARCore repo). I recommend checking out the Sceneform Codelab to get an understanding of the library. Also, be sure to take a look at the repo for Sceneform SDK which is where I got the inspiration for this post.

What we’ll build

Take a look at my twitter post to see the an example using planet earth, in this example I’ll go back to the future and render the classic Delorean.

Great Scott!

You can read up on the official developer guide which is where I started or just dive in and checkout my github with all of the code used in this demo!

Loading Reference Images

To allow our application to identify our movie poster we need to create an image database. There are a few guidelines on image size and quality that’s worth reviewing in this guide, reference images should ideally contain many unique reference points in order to be easily identifiable. For the purposes of this demo I’ll just add our reference image at runtime but for large sets of images it’s recommended to add an image on a worker thread, or even better create a database file at compile time using the arcoreimg tool (this tool also gives you a handy “quality score”, anything 75 and over is ideal for a good reference image).

Back to the Future Universal Pictures

Importing 3D Models

The Sceneform Android Studio plugin lets you import and preview 3D models pretty easily. To get started head on over to Poly and grab a model of your choice (be sure to credit the creator). So far I’ve just been downloading OBJ files but FBX, and glTF formats are also supported.