Meta Spatial SDK Samples

repository·main·Indexed 42 days ago

https://github.com/meta-quest/meta-spatial-sdk-samples

A collection of code samples and projects for the Meta Spatial SDK, demonstrating how to build immersive, spatially-aware applications for Meta Horizon OS using Android development patterns. Includes implementations for glTF animations, Mixed Reality Utility Kit (MRUK) environmental interactions, 2D panels via PancakeActivity, physics components, and the TweenEngineSystem for animating entity transforms and material attributes.

Tokens
33.5K
Snippets
78
Records
168
Agent score
55%

What's inside Meta Spatial SDK Samples

  1. Overview of Meta Spatial Scanner

    main

    Meta Spatial Scanner is a mixed reality showcase application built with the Meta Spatial SDK. It demonstrates how to build immersive apps for Meta Quest by utilizing the headset's camera for environment scanning and object identification.

    Key Capabilities:

    • Passthrough Camera API: Accesses forward-facing cameras on Quest 3 and Quest 3S for livestreaming or Computer Vision (CV) inference.
    • ML Kit Object Tracking: Performs real-time, on-device detection and labeling of objects in the user's field-of-view.
    • Llama 3.2 11B Vision Invocation: Uses Meta AI via AWS Bedrock to provide in-depth details about detected objects.

    Note: This project is deprecated. Its latest update is compatible with Meta Spatial SDK 0.8.0.

  2. Overview of the MRUK Sample

    main

    The MRUK (Mixed Reality Utility Kit) sample demonstrates how to build immersive experiences that interact with the user's physical environment. It provides implementation patterns for overlaying virtual objects onto physical surfaces such as tables, couches, windows, doors, and beds.

    Key capabilities demonstrated include:

    • Requesting permission to access scene mode.
    • Retrieving scene data from the device.
    • Interacting with meshes that represent the physical world.
  3. Overview of Geo Voyage Project

    main

    Geo Voyage is a virtual and mixed reality application designed to demonstrate the capabilities of the Meta Spatial SDK. It serves as an educational exploration platform where users can interact with a 3D globe, drop pins on locations, and engage with an AI companion.

    Core Play Modes

    • Ask Earth: Voice-based interaction using Wit.ai and Llama 3 8B to answer questions about ecology, culture, or history.
    • Explore: Uses Google Maps Geocoding and Tiles APIs to allow users to find landmarks, drop pins, and enter 360-degree immersive views.
    • Daily Quiz: Geography and culture quizzes powered by Llama 3 8B.
    • Today in History: Daily historical facts generated via Llama 3 8B and AWS Bedrock.

    Device Compatibility

    • Quest 3 (Primary development target)
    • Quest Pro
    • Quest 2 (Supported, but not recommended)

    Note: This project is deprecated. Its latest update is compatible with Meta Spatial SDK 0.8.0.

  4. Overview of the Spatial Video Sample

    main

    The Spatial Video Sample demonstrates how to implement spatial video playback (providing distinct video streams for the left and right eyes) paired with spatialized audio.

    Key capabilities demonstrated include:

    • Video Library Browsing: Using a library panel to select content.
    • Playback Controls: Standard controls for managing video playback.
    • Mode Toggling: Switching between a VR media room environment and Passthrough (MR) mode.
    • Spatial Interaction: In MR mode, the video panel is grabbable and can be repositioned within the user's physical space.
  5. Overview of Meta Spatial SDK Samples

    main

    This repository contains 13 sample applications demonstrating various capabilities of the Meta Spatial SDK:

    • AnimationsSample: Animation clips, reusable animation drivers, and frame-based procedural animation.
    • BodyTrackingSample: Accessing body tracking and skeleton joint data.
    • CustomComponentsSample: Creating custom components for shared application data.
    • FeatureDevSample: Building reusable SpatialFeature library modules as Android Library projects.
    • HybridSample: Switching between standard 2D Android panels and immersive experiences.
    • MrukSample: Immersive experiences influenced by physical surroundings (MRUK).
    • MixedRealitySample: Immersive experiences interacting with physical surroundings.
    • Object3DSample: Inserting 3D objects and adjusting properties via Meta Spatial Editor.
    • PhysicsSample: Adding and adjusting physics components via Meta Spatial Editor.
    • PremiumMediaSample: DRM-protected content streaming, 180-degree video, and MRUK spatial reflections.
    • SpatialVideoSample: Video playback with spatialized audio.
    • StarterSample: A basic entry point for the Meta Spatial SDK "Hello World" tutorial.
    • UISetSample: Using the Meta Horizon OS UI Set for consistent interfaces.