Spatial awareness and occlusion SDKs for custom AR glasses
Since Jul 31Updated Sep 21, 2026Based on 29 AI responses
Reviewed by Dimitry Apollonsky
AI summary
Apple Augmented Reality narrowly leads ARCore for spatial-awareness and occlusion SDKs for custom AR glasses.
It depends
Niantic Spatial is worth considering when visual occlusion quality matters more than simply obtaining a depth map.
Brands AI mentions
Emphasizes visual occlusion quality over simply obtaining a depth map.
Also mentioned rarely: Meta Horizon OS, Qualcomm Spaces, Unity AR Foundation, Android XR, Snap Lens Studio, Unity, Apple visionOS, Meta Presence Platform, Meta Spatial SDK, Snap AR, Meta, Stereolabs, Android, Jetpack XR, NVIDIA CUDA Toolkit, Google Geospatial API, Meta XR Core SDK, Meta XR SDK, Snap Spectacles, Spectacles Platform, ORB-SLAM3, Intel RealSense, Mixed Reality Toolkit (MRTK), Niantic Lightship, Magic Leap, NVIDIA Omniverse, NVIDIA RTX, NVIDIA Inference (NVIDIA Inference Stack), OpenCV, Vuforia, Snapdragon Spaces, Spectacles, Unity Ads, Unity PolySpatial, Unreal Engine, VoxelSensors, Vuforia Engine
| Mentioned in | ChatGPTChatGPT | Google AI ModeGoogle AI Mode |
|---|---|---|
| Apple Augmented Reality | 100% | 86% |
| ARCore | 93% | 86% |
| RealityKit | 60% | 64% |
| OpenXR | 60% | 43% |
| Niantic Spatial | 33% | 64% |
Questions and answers
ChatGPTSep 21, 2026
For custom AR glasses, the “most accurate” depth stack depends heavily on your hardware (stereo cameras vs. ToF/LiDAR vs. structured light), latency budget, and whether you need pixel-level occlusion, room meshing, or persistent spatial maps. The leading developer platforms today are:
Platform / SDK Depth & occlusion capability Best fit for AR glasses Apple ARKit / visionOS High-quality scene understanding, LiDAR-assisted depth on supported hardware, environment depth, human occlusion, mesh reconstruction Premium optical AR devices, iOS/visionOS ecosystems, LiDAR-equipped prototypes Google ARCore Depth API Depth-from-motion plus optional ToF sensor fusion; provides depth images for occlusion and hit testing Android-based glasses, mobile-derived AR glasses, broad device compatibility Meta Platforms Meta XR SDK Depth API Real-time environment depth maps, dynamic occlusion support, passthrough integration MR glasses/headsets using Meta hardware stack Unity AR Foundation Unified access layer over ARKit, ARCore, Meta, and others; supports occlusion subsystems Cross-platform commercial AR applications OpenXR ecosystem Hardware-vendor-neutral XR interfaces; capability depends on runtime/vendor extensions Custom glasses where you want portability Google for Developers Meta for Developers Unity Documentation## If your priority is raw environmental depth accuracy
1. LiDAR + scene reconstruction stacks
For glasses with a dedicated depth sensor, a LiDAR/ToF pipeline usually beats camera-only depth for:
- Low-texture environments (blank walls, dark rooms)
- Stable geometry capture
- Room-scale meshes
- Persistent anchors
Apple’s ecosystem is a strong reference implementation: ARKit can combine camera tracking, depth sensing, and scene understanding features on supported devices.
2. Stereo camera depth pipelines
For lightweight glasses where power and size matter:
- Dual RGB cameras + stereo matching
- SLAM + neural depth estimation
- Temporal filtering
This is common in wearable AR because it avoids the size/power cost of active depth sensors.
Google’s ARCore Depth API is a good example: it generates depth maps using motion-based depth estimation and can merge additional hardware depth sensors such as ToF when available.
3. Neural depth + sensor fusion
For next-generation glasses, many teams combine:
- Stereo disparity
- IMU
- SLAM tracking
- Neural monocular depth
- Object segmentation
- Hand tracking
This tends to produce better perceived occlusion than relying on raw depth alone.
Platform recommendations by product goal
Lightweight consumer AR glasses
Consider:
- ARCore-style depth pipeline
- Unity AR Foundation abstraction
- Custom stereo depth + neural refinement
Advantages:
- Lower hardware cost
- Works with small camera modules
- Easier Android integration
Tradeoff:
- Less reliable in low-texture scenes.
High-end enterprise AR glasses
Consider:
- Dedicated ToF/LiDAR
- Native spatial mapping APIs
- Custom SLAM stack
Advantages:
- Better measurement accuracy
- Better room scanning
- More reliable occlusion
Mixed reality with people/hands moving through the scene
Prioritize:
- Real-time depth maps
- Segmentation
- Hand/body tracking integration
Meta’s Depth API, for example, is designed specifically to support dynamic occlusion scenarios such as hands, people, and pets, while its Scene API focuses more on static environment understanding.
Practical architecture for custom AR glasses
A robust production pipeline often looks like:
- Tracking layer
- Visual-inertial odometry (VIO)
- SLAM
- IMU fusion
- Depth layer
- Stereo/ToF/LiDAR depth
- Temporal smoothing
- Confidence maps
- Semantic layer
- Plane detection
- Object recognition
- Human segmentation
- Rendering layer
- Depth-buffer occlusion
- Late-stage reprojection
- Foveated rendering where needed
- Persistence layer
- Spatial anchors
- World maps
- Cloud/local synchronization
Shortlist for a custom glasses team
If I were evaluating SDKs for a new AR glasses platform, I would prototype with:
- ARKit/visionOS concepts — benchmark for high-quality spatial understanding.
- ARCore Depth API — strong reference for camera-first depth estimation.
- Meta XR Depth API — useful reference for real-time occlusion behavior.
- Unity AR Foundation + OpenXR — fastest route to multi-device experimentation.
- A custom sensor-fusion stack once hardware constraints are known.
For a glasses product rather than a phone/headset app, the biggest differentiator is usually not the SDK—it is the sensor stack and your depth-fusion algorithm. The best results typically come from combining vendor SDKs for tracking/SLAM with a custom depth pipeline tuned for your exact optics and cameras.
Sources cited in this answer5
- developers.google.comDepth adds realism | ARCore | Google for Developers
- developers.meta.comDepth API Overview | Meta Horizon OS Developers
- docs.unity.cnOcclusion platform support | AR Foundation | 6.6.0-pre.2
- developers.google.comUse Depth in your Android NDK app | ARCore | Google for Developers
- developers.meta.comDepth API Overview | Meta Horizon OS Developers
Google AI ModeSep 21, 2026
Integrating real-time spatial awareness, meshing, and occlusion into custom AR glasses depends heavily on your hardware target (Qualcomm Snapdragon-powered, Android XR , or custom embedded hardware) and whether you prefer an open standard or vendor-locked toolkits.
The top SDKs and developer platforms for environmental depth-sensing and occlusion are organized below by ecosystem:
1. OpenXR (with Vendor Extensions) — Best for Portability & Standards
If you want to avoid locking your software into a single hardware vendor, OpenXR is the industry standard. Through specific extensions, it exposes raw environmental depth maps and hardware-accelerated occlusion data directly to the graphics pipeline.
- Key Features: Standardized extensions like
XR_META_environment_depthor vendor-specific depth/meshing layers allow per-pixel or mesh-based occlusion. - Pros: Highly portable code architecture; lets you query depth buffers directly from the runtime to handle smooth, real-time virtual-to-real object occlusion.
- Cons: Implementation quality depends on how well the specific glasses manufacturer implements the OpenXR runtime extensions.
2. Snapdragon Spaces XR Developer Platform — Best for Qualcomm-Powered AR Glasses
If your custom glasses run on Qualcomm Snapdragon silicon (common for standalone or tethered enterprise AR hardware like Lenovo, Oppo, or Xreal), Snapdragon Spaces is purpose-built for this.
- Key Features: Offers robust Spatial Mapping and Meshing , delivering a real-time 3D triangle mesh and dense depth details of the local environment. It handles raycasting against the real-world mesh and real-time physical occlusion.
- Pros: Deep hardware-level integration with Snapdragon heterogeneous computing (CPU/GPU/DSP optimization), ensuring low-latency motion-to-photon depth alignment and minimal battery overhead.
- Cons: Optimized specifically for Snapdragon XR ecosystems; less ideal if you are targeting heterogeneous or Apple/PC-tethered non-Qualcomm hardware.
3. Unity XR Plugin Management / Unreal OpenXR Plugins — Best for Cross-Platform Application Logic
Instead of writing native wrappers for every sensor, developing through Unity's XR Plugin Management or Unreal Engine's OpenXR features gives you unified abstraction layers.
- Key Features: Acts as a middleware provider framework routing ARCore, ARKit, Magic Leap, or OpenXR provider plug-ins through a single API. Handles plane detection, triangle mesh generation, and environment depth textures out-of-the-box.
- Pros: Drastically cuts down development time if you are building complex rendering shaders that require real-time stencil-based or depth-buffer occlusion.
- Cons: Adds an abstraction layer overhead; fine-tuning ultra-low-latency raw depth streams can occasionally require dropping down to native platform code.
4. Android XR / Google Play Services for AR (ARCore) — Best for Emerging Android-Based Glasses
With the rollout of Google’s Android XR ecosystem for smart glasses, ARCore's Depth API has evolved to support scene reconstruction and smooth occlusion on supported lightweight companion/tethered glasses.
- Key Features: Generates continuous per-pixel depth maps using camera data (monocular or stereo) without needing dedicated heavy LiDAR hardware, feeding occlusion masks directly into compatible graphic layers.
- Pros: Massive developer familiarity, excellent documentation, and built-in software fallback algorithms if hardware depth sensors are low-resolution.
- Cons: Monocular depth estimation via software can struggle with fast head movements or low-texture blank walls compared to hardware-based time-of-flight (ToF) or stereoscopic depth sensors.
Which one should you pick?
- Go with Snapdragon Spaces if your custom hardware relies on Qualcomm chips and you need maximum hardware-accelerated performance.
- Go with OpenXR if you anticipate hardware-agnostic deployment across multiple diverse OEM glasses.
- Utilize the OpenXR Depth API Overview or Snapdragon Spaces Spatial Mapping Documentation to review specific code implementations and minimum range constraints (typically 0.2 meters for reliable depth occlusion).
To help narrow down the ideal choice, could you share:
- What hardware/chipset or form factor are your custom AR glasses built around?
- Are you targeting stereoscopic hardware depth sensors (like ToF or stereo-cameras) or relying purely on monocular camera software estimation?
Sources cited in this answer6
- roadtovr.comFirst AR Glasses Running Android XR Confirmed for 2026 ...
- developers.meta.comOpenXR Depth API Overview | Meta Horizon OS Developers
- spaces.qualcomm.comIntroducing Spatial Mapping and Meshing - Snapdragon Spaces
- spaces.qualcomm.comLearning Archives - Snapdragon Spaces - Qualcomm
- guideflow.com10 best augmented reality platforms for 2026 - Guideflow Blog
- developer-docs.magicleap.cloudPhysical Occlusion | MagicLeap Developer Documentation
Also asked as
- We are building custom AR glasses software and require accurate depth-sensing for occlusion and spatial awareness. What platforms do you recommend?
- For our custom AR glasses software, we need to implement occlusion and spatial awareness. Which SDKs are best for achieving precise, real-time environmental depth-sensing?