Augmented Reality (AR) is the process of blending interactive or non-interactive digital elements in the real-world environment. It creates the illusion of a digital object (whether in 3D or 2D) being present in the real world in front of you. But this is, in fact, a projection seen through your device. AR has wide applications ranging from gaming to business to entertainment. You probably use AR in your daily life and wouldn’t even know about it. For instance, Instagram and Snapchat filters use AR to project filters on your face or a space around you. Pokémon GO is a classic example using AR for gaming. Even Google Lens uses the power of augmented reality!
In this blog, we’ll be talking about ARFoundation, a tool/package in Unity that helps create augmented reality applications for both Android and iOS.
ARFoundation is a framework in Unity that lets you build augmented reality applications for Android and iOS without changing the SDK. How cool is that :)!
Mobile devices use either of the two operating systems- Android and iOS. If you want to create an application or a game for a mobile device, you would need two different technologies for development. Android runs on Linux and iOS runs on Objective C. These platforms use different SDKs to create games and apps.
If we look at AR based apps, Android uses ARCore SDK and iOS uses ARKit SDK. There are several third party SDKs like Vuforia from PTC and Wikitude AR Platform. But these are paid and have some limitations. Hence, it’s a good idea to use native SDKs like ARCore and ARKit.
How does AR and ARFoundation work?
Using a technique called visual-inertial odometry, ARCore and ARKit use data retrieved from a device’s motion sensor and camera. It creates feature points, which track specific features in the world. With this, the app can then create horizontal and vertical planes that map on to real-world surfaces.
The app also tracks the device’s position and orientation in world space. ARFoundation is a middle man between ARCore and ARKit. When we use ARFoundation, Unity will use the necessary packages based on the platform for which you are deploying the app. If the app is for iOS, ARFoundation will build the app with ARKit support. If the app is for Android, ARFoundation will build the app for ARCore support without actually changing any code manually. You would just need to change the target platform and ARFoundation will do the dirty work for you.
In terms of hardware, currently, there are only a limited number of smartphones which support ARKit and ARCore. But good news is that the list is growing regularly.
Advantages of using ARFoundation
ARKit and ARCore mainly have markerless tracking. They can track our real-world using camera and depth sensors and place 3D objects. And the list doesn’t end here- they can perform face tracking, object tracking, light estimation, 2D image tracking and full body tracking!
One of the major shortcomings of this technology is that it only supports high-end devices. There will be some time before this technology is available on all smartphones.
My take on the tech
As a CTO who deals with strict deadlines, ARFoundation has helped the team in reducing testing and deployment time. One of our products that focuses on implementation in schools- EduXR, is an augmented reality powered education app. It runs on both Android and iOS systems. If it wasn’t for ARFoundation, we would have to change scripts, settings and everything related to AR manually when building and testing the product. ARFoundation is a lifesaver in situations like these.
AR driven projects at VR2ality
At VR2ality, we’ve used ARFoundation primarily for our EduXR Application. We also use it for our Apollo Project where we’re showcasing the Apollo 11 launch in augmented reality. We’re also looking at customized client applications for motorbikes, real estate and medicine.
What’s the future for AR and ARFoundation?
Augmented reality has a bright future. It’s evolving day by day. For now, we see it on mobile devices and tablets. But by 2022, you’ll see AR Glasses. Microsoft Hololens and Magic Leap are some promising technologies of the near future.
Interestingly, ARFoundation also supports Magic Leap and Hololens. Thus, creating applications for all these different technologies is easy with ARFoundation. I would say ARFoundation is a game-changing framework for both the developer and the company because it saves a lot of time. Plus it’s free!.
Most of us have been using augmented reality technology for some time in our life even though we didn’t know about it. Gaming apps like Pokémon GO created awareness about this technology. Now there’s enthusiasm in the tech world to come up with cool ideas for augmented reality apps!
Tell us of an idea you’d like to see in AR.