How I Learned the Basics of AR

Nicolas Gatien
4 min readJan 29, 2021

--

About 2 months ago, I decided I wanted to learn how to develop AR projects. But there was 1 problem… What exactly is AR? How does AR work? How do I develop for it? I had no clue what I was doing.

I’m part of a program called The Knowledge Society (a human accelerator program), where teens from ages 11–17 learn about exponential technologies, mindsets and learning efficiently.

In TKS, there is a structure for learning something new called a Focus. The first step in a Focus is to write an article about what I am learning. So if you have no idea how AR works, or even what it is. Read my article about it.

Now I am on the 2nd step in a Focus. The first replicate, I need to replicate something that has already been done to learn the basics. So I replicated 2 projects, using unity, implementing AR. Here is how I went about it!

Picture of the cube that is totally in my backyard and not a virtual cube overlayed on top of the world through marker-based AR… I have no idea why you would think that.

Markerless AR

For my first AR project, I went for Markerless AR. It works by scanning the surrounding area with your camera and identifying planes/flat surfaces. From there we can place 3D objects on the surfaces and have them stay in the same place.

Attempt #1

Because of unity’s ARCore package, I thought I would get things working within 1 hour of starting.

This was a horrible prediction after 2 hours of trying to get things working, downloading packages and debugging messages from the console. I ended up scrapping my first attempt.

What went wrong:

  • Too much confidence
  • Not enough patience

What I learned:

  • I’m not going to be the best at something as soon as I start

Attempt #2

In my second attempt, I decided I should follow a tutorial series on youtube. Everything was going great. The packages were installed. My console did not have over 30 million error messages. And everything seemed like it would work.

Up to this point, I had yet to test what I had been working on. When working on something, you need to test it often. After working on the project for the entire day, I finally built it for Android. And it didn’t work…

I searched the internet and unity forums to try and figure out what happened. Turns out… I need to update unity…

Attempt #2 scrapped.

What went wrong:

  • Wrong unity version

What I learned:

  • Make sure I have the up to date version of something when trying out a new addon

Attempt #3

For my third and final attempt, I updated unity and followed a tutorial series on youtube. And, everything worked! There was some debugging, and things didn’t always work the first time. But that’s just development. Things don’t always work the first time.

And now! I have an app on my phone that allows me to place virtual cubes in real space.

It starts by identifying planes, then maps them. Afterwards, when I press on the screen, it places a cube on the selected plane.

If you are interested, you can download the source code for this project here.

Marker-Based AR

Marker-Based AR is when you overlay something over a marker (in my case an image). For my second project, I wanted to use marker-based AR.

This one was easier, but there were many, many downloads and a lot of time spent waiting. There was a lot less coding and more tabbing through dashboards to get keys.

For this project, I used Vuforia 9 with Unity 2020 to recognize an image of an astronaut and overlay a cube on top. This was way easier than the markerless project.

I just had to update the software, set up the Vuforia dashboard, and everything was working.

I learned so much from both of these basic projects, and now I am moving on to work on something a bit bigger. If I had to choose 1 takeaway from this, I would not be afraid to scrap a project and restart. I want to simulate physics in AR after scanning the room for the mesh. And I also want to recognize 3D objects and overlay something on top of it. So subscribe to my Medium if you want to stay updated!

If you want to follow my AR journey, you can subscribe to my newsletter here. If you want to see my updates in video form, you can subscribe to my youtube channel. See you soon! 👋

--

--

Nicolas Gatien

Hi! I'm Nicolas! A 17-year-old game designer & maker. I build things and write about them!