Meta Quest Scene API – Scene Understanding & Content Placement

  • 3 February 2024
  • 3 February 2024
  • 3 min read

Hello XR Developers! 🌟 Today, we’re diving deep into a pivotal feature of the Meta Presence Platform that’s essential for crafting immersive mixed reality experiences—the Scene API. While the Mixed Reality Utility Kit (MRUK) offers a streamlined approach, the OVR Scene Manager provides the flexibility needed for custom or advanced applications.

🛠 Setting Up Your Scene

First things first, ensure the Meta XR SDK is integrated into your project. This tutorial focuses on utilizing the Core package for Android deployment. After setting up, drag the OVR Camera Rig into your scene, enabling Passthrough support and Insight Passthrough for a seamless mixed reality overlay.

🌐 Utilizing OVR Scene Manager for Advanced Flexibility

The OVR Scene Manager not only allows for the visualization of room scans directly in the Unity Editor but also offers enhanced control over your mixed reality environment. By incorporating Plane Mesh and Volume prefabs, you can overlay your real room with virtual elements, creating a more dynamic and interactive space.

🎮 Interactive Elements and Occlusion

To elevate the immersion, we’ll make our virtual objects interactable and ensure they’re occluded by real-world surfaces correctly. This involves disabling mesh renderers for non-essential visuals and adding colliders to virtual objects for realistic interactions.

🔄 Switching to Meta Building Blocks

For a more streamlined setup, Meta’s Building Blocks can replicate the OVR Scene Manager’s functionality with added ease. This method simplifies the process, allowing for quick integration of interactive elements like a ball spawner, enhancing the mixed reality experience.

🎨 Customizing Your Mixed Reality Environment

Explore the “Prefab Override” feature to replace default spatial anchors with custom prefabs, transforming your real room into a virtual game level. This feature, coupled with the OVR Scene Anchor component, ensures persistent positioning of virtual objects relative to your room model.

🔍 Accessing Scene Data for Interactive Gameplay

Create scripts to detect anchor labels or calculate distances to walls, enabling dynamic interactions based on your environment. These functionalities open up endless possibilities for game development, from spawning objects on scene surfaces to visualizing distances for strategic gameplay.

📚 Conclusion: Unleashing the Potential of Scene API

The Scene API, when used alongside tools like the OVR Scene Manager, unlocks a new realm of creativity for XR developers. Whether you’re aiming to create realistic game levels or interactive mixed reality experiences, these tools provide the foundation needed to bring your visions to life.

Support Black Whale🐋

If you find our content helpful, consider supporting us on Patreon. Your contributions enable us to continue creating free, high-quality educational material 👍.

Thank you for following this tutorial. Stay tuned for more in-depth and insightful content in the realm of XR development! 🌐

Did this article help you out? Consider supporting me on Patreon, where you can find all the source code, or simply subscribe to my YouTube channel!

3 replies on “Meta Quest Scene API – Scene Understanding & Content Placement”

  • Kuang shan
    23 February 2024 at 10:35

    it does work with link but not after i build and run it on quest3.
    So weird

    • 25 February 2024 at 11:07

      Have you enabled the scene support on your OVR Manager component?

      • Jimmy Ding
        29 February 2024 at 14:38

        I encountered the same issue, and enabled scene support, passthrough, and permission requests on startup. All of that, the layout can be seen, but the scene API doesn’t allow dropping things on top or even interaction such as “FindSpawnLocation” and “StartSpawn”

        Would love to get some insight from you

Leave a Reply

Your email address will not be published. Required fields are marked *