Skip to main content
Version: 21 Aug 2024

Meshing

Meshing is the creation of triangle-based meshes surfaces detected by Magic Leap devices. The mesh is used for real-time occlusion rendering and collision detection with digital content. Unlike Plane Detection, which only detects planar surfaces, Meshing can detect a variety of surfaces.

Mesh Blocks

Mesh Blocks are sections of the mesh that spatially subdivide the real world into a set of cubic blocks that are updated from the internal reconstruction model. The geometry contained in these cubical regions of the reconstruction is represented as a connected triangle mesh (i.e. a mesh where vertices are shared by multiple triangles).

  • Local Updates
    • Meshes between blocks are not connected. This enables fast, localized mesh updates when changes occur in one area of the environment. This also helps when objects move to new locations.
  • Mesh Block Skirt
    • A small "skirt" region is added to Mesh Blocks so that they overlap neighboring blocks by a small amount. This provides continuity, fills small cracks, and provides a more visually continuous surface for occlusion and physics.

Developers are strongly recommended to use the Meshing Subsystem component to obtain mesh information. This component manages all the necessary calls between Magic Leap Meshing and Unity's XRMeshSubsystem.

caution

This feature requires the SPATIAL_MAPPING permission to be enabled in your project's Manifest Settings. (Edit > Project Settings > Magic Leap > Manifest Settings)

info

Surfaces that are reflective or have little texture may not be detected properly.

See also