Hello XR Developers! Today, we’re diving into a feature you’ve all been eagerly anticipating: access to the Meta Quest Passthrough Cameras, now unlocked with Horizon OS v74. This new API lets you tap into the raw RGB camera feeds on Quest headsets—perfect for real-time environment sampling, AR overlays, and even object detection. In this guide, we’ll break down the essentials from Meta’s Passthrough Camera Samples GitHub repo, walk you through handling permissions and utility functions, and then build a simple color picker together. Let’s get started!

Check out loads of useful samples in the QuestCameraKit GitHub repo or the official Meta PassthroughCameraSamples. The official documentation can be found here.


Getting Familiar with the Basics

Meta’s latest update opens up a whole new realm of possibilities:

Passthrough Camera API device requirements, frame rate, latency and camera resolutions

Understanding Limitations & Permissions

Before jumping into the code, let’s cover some crucial details:


Diving into the Passthrough Camera API & Samples

Meta provides several practical Unity sample scenes that illustrate different aspects of the API:

These samples serve as a great starting point to experiment and build more complex passthrough-based experiences.


Setting Up the Core Components

Let’s take a closer look at the key components you’ll be working with:

PassthroughCameraPermissions

This class handles all the heavy lifting for camera permissions:

PassthroughCameraUtils

A static class packed with utility functions and camera intrinsics data:

WebCamTextureManager

This script manages the camera feed itself:


Building a Color Picker

Now for the fun part—creating a simple color picker that samples colors from the real world using the passthrough camera feed!

Modes of Operation

The Color Picker supports two sampling modes:

How It Works

  1. Reference Setup:
    • Grab the main camera for screen-to-world calculations.
    • Retrieve references to the WebCamTextureManager and Meta’s EnvironmentRaycastManager.
  2. Sampling Process:
    • In Environment mode, a ray is cast from a specified origin, and the hit point is stored.
    • In Manual mode, a fixed transform provides the sampling point.
    • When you press the designated controller button (e.g., A), the script:
      • Converts the world-space hit point to texture UV coordinates.
      • Samples the color from the camera feed.
      • Adjusts the brightness based on nearby pixels.
      • Applies the resulting color to the target material.
  3. Coroutine & Delays:
    • The script waits until the WebCamTexture is playing before attempting to sample, ensuring a smooth initialization.

Conclusion

With Horizon OS v74 and Meta’s new Passthrough Camera API, accessing and utilizing raw camera feeds on Quest devices has never been more exciting. Whether you’re building a color picker, diving into object detection, or experimenting with AR overlays, the tools and samples provided open up endless creative possibilities for XR experiences.

If you enjoyed this guide, be sure to check out Meta’s official samples as well as my QuestVisionKit project for more advanced prototypes. Leave a like, subscribe, or join our XR developer community on Discord for more updates and tutorials. Happy developing, and see you in the next post!

Support Black Whale🐋

Thank you for following this article. 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!