Exploring the New ARCore Features: Geospatial Streetscape API in Unity!

It's an exciting time in the world of Augmented Reality (AR). Google's ARCore, a platform for building AR experiences, has been a significant driver of innovation in the field. Just a few weeks ago, Google released a really cool new feature: the Geospatial Streetscape API for Unity. This blog post and video goes into what this new ARCore feature is, why it's a significant development, and how it can be utilized to create more immersive AR experiences.

What is the Geospatial Streetscape API in Unity?

The Geospatial Streetscape API is the latest addition to the ARCore toolkit, and it's specifically designed to integrate seamlessly with Unity, one of the most widely used game development platforms. This API allows developers to incorporate geospatial data directly into their AR applications, bringing a new level of reality and interaction to AR environments.

The API enables real-world streets, buildings, and landmarks to be rendered in 3D directly onto the AR environment. By coupling this with the ARCore's ability to understand the user's environment, the result is an augmented world that mirrors the real one. Imagine looking at your phone and seeing the streets, parks, and buildings around you replicated in high detail. That's the power of the Geospatial Streetscape API.

(Take a look at the images below which demonstrate how I used this technology on my last Streetscape Geometry API YouTube video)

How To Implement Streetscape Geometry Features In Unity?

  1. You need to enable “Streetscape” features by accessing the ARCore Extensions configuration file.

  2. Create a simple MonoBehaviour class that references ARStreetscapeGeometryManager, this component will also need to be added to your “AR Session Origin” component or XR Origin component once the ARCore team updates their plugin to use the latest AR Foundation features, but for now “AR Session Origin”.

  3. Then in your new MonoBehaviour bind to the following event StreetscapeGeometriesChanged which will be available as part of your ARStreetscapeGeometryManager reference, see example below. Also know that AddRenderGeometry, UpdateRenderGeometry, and DestroyRenderGeometry will need to be created, you can find full example project here on my GitHub repo.

    private void OnEnable()
    {
        streetscapeGeometryManager.StreetscapeGeometriesChanged += StreetscapeGeometriesChanged;
    }

    private void StreetscapeGeometriesChanged(ARStreetscapeGeometriesChangedEventArgs geometries)
    {
        geometries.Added.ForEach(g => AddRenderGeometry(g));
        geometries.Updated.ForEach(g => UpdateRenderGeometry(g));
        geometries.Removed.ForEach(g => DestroyRenderGeometry(g));
    }

The rest is just a matter of creating a render object / game object in the AddRenderGeometry by using the Mesh information included with the ARStreetscapeGeometry callback.

Why is the Geospatial Streetscape API significant?

The inclusion of geospatial data in AR applications isn't just a neat trick—it's a revolutionary step forward. Here's why:

  1. Enhanced Reality and Interaction: The API brings an unprecedented level of reality to AR experiences. It's not just about overlaying 3D objects onto the real world. Now, the very structure of the world can be integrated into the AR environment. This opens up a myriad of opportunities for interaction and immersion.

  2. Data Driven Design: The API enables AR applications to be data-driven. Real-world data, such as streets and buildings, can be used to inform the design and behaviour of AR experiences. This ensures that the AR environment is always up-to-date and reflects the real world.

  3. Increased Accessibility: By making the technology available in Unity, Google is putting a powerful tool in the hands of millions of developers. This will undoubtedly lead to an explosion of innovative AR experiences.

How can developers leverage the Geospatial Streetscape API?

Developers can now utilize real-world geospatial data in their AR apps in ways previously unimagined. Here are a few potential applications:

  • Hyper-local Games: Developers can create games that respond to the user's actual surroundings. Imagine a treasure hunt game where the clues are hidden around your city, or a monster fighting game where the monsters appear to be hiding in real buildings.

  • Navigation Apps: Traditional maps can be turned into 3D representations of the actual streets and buildings, making it easier for users to navigate unfamiliar areas.

  • Educational Experiences: Apps can provide users with information about their surroundings in an immersive, interactive way. Think of a historical tour that shows you how the street you're standing on looked 100 years ago, or a nature app that teaches you about the trees in your local park.

  • Real Estate and Architecture: AR could help people visualize proposed construction projects or see inside buildings that are for sale.

In conclusion, the new Geospatial Streetscape API in ARCore has the potential to revolutionize AR as we know it, introducing a new level of interaction and immersion. It's exciting to imagine what developers will do with this tool in the coming years. The AR future is here, and it's streets ahead and I will say this over and over as I mentioned it on my previous blog about Geospatial Creator, but having ARCore support for iOS and Android is honestly a huge deal!

Previous
Previous

ARCore Scene Semantics for Augmented Reality Development Is Here!

Next
Next

What Is Google ARCore?