Develop

Unreal Scene sample

Updated: May 11, 2026

Overview

Deprecated: This sample has been replaced by Unreal-MRUtilityKitSample.
The Unreal Scene sample is a Blueprint-only project with a single level (BouncingBall) that demonstrates Scene Anchor population from the Scene Model, passthrough with an opacity slider, stereo layer UI, ball throwing with occlusion detection (line-trace, red/gray material switch), 48000 Hz audio, and entity type filtering (walls, ceilings, floors, etc.).

What you will learn

  • Scene Anchor population from Scene Model
  • Passthrough rendering with opacity control
  • Stereo layer UI implementation
  • Occlusion detection via line-trace
  • Entity type filtering for spatial elements

Requirements

  • Meta Quest 2, Quest 3, or Quest 3S
  • UE development environment

Get started

  1. Clone the repository.
  2. Open the project in Unreal Engine.
  3. Deploy to your Quest device.
  4. Ensure Room Setup has been completed on the device.

Explore the sample

File / SceneWhat it demonstratesKey concepts
BouncingBall level
Complete Scene API demo
Scene Anchors, passthrough, occlusion
Scene Anchor population
Loading spatial data
Scene Model query and anchor creation
Passthrough system
Mixed reality rendering
Opacity slider, passthrough layer
Ball throwing
Physics interaction
Line-trace occlusion, red/gray material switch
Stereo layer UI
Interface rendering
Stereo layer composition
Entity type filtering
Spatial classification
Walls, ceilings, floors, furniture filtering

Runtime behavior

The BouncingBall level loads Scene Anchors from the Scene Model and renders passthrough with an adjustable opacity slider. Users can throw balls that interact with the physical environment. Occlusion is detected via line-trace, switching ball materials between red (visible) and gray (occluded). Audio plays at 48000 Hz. Entity types can be filtered to show only specific spatial elements.

Key concepts

Scene Anchor population

Scene Anchors are populated from the Scene Model, providing spatial data about the user’s physical environment including walls, ceilings, floors, and furniture.

Passthrough with opacity

Passthrough rendering is enabled with a runtime opacity slider, allowing blending between virtual and physical environments.

Occlusion detection

Ball occlusion uses line-trace detection:
  • Red material — Ball is visible to the user
  • Gray material — Ball is behind a physical surface

Entity type filtering

The sample filters scene entities by type:
  • Walls
  • Ceilings
  • Floors
  • Furniture
  • Other classified objects

Extend the sample

  • Migrate to MRUtilityKitSample for current best practices
  • Add additional interaction types beyond ball throwing
  • Implement spatial audio tied to anchor positions
  • Create custom visualizations for different entity types