Level of Detail Meshing
Overview
Lightship Meshing reconstructs the visible geometry of the scene, allowing AR characters and objects to interact physically with their environment. By default, the spatial resolution used for this reconstruction is constant. Level of Detail Meshing is a new experimental feature that changes the local resolution of the reconstruction based on how far the player is from specific points in space. While they are far away, world details are rendered coarsely, but as they approach, the resolution becomes finer, showing a more precise version of the geometry.
Enabling Level of Detail Meshing
To enable Level of Detail Meshing, expand the XROrigin
in the Hierarchy and select the object that contains your Lightship Meshing Extension, then, in the Inspector, check the box labeled "Experimental Meshing Options". When you check the box, the "Levels of Detail" field will appear. Choose 1, 2, 3, or 4 levels, with 4 giving the most detail and 1 the least.
How is Level of Detail Defined?
When a new Mesh Block is surfaced to Unity, it creates a new GameObject in the Trackables
section of the Hierarchy. The names for these GameObjects follow the format Mesh-<32 digit number>-<32 zeroes>
, where the first digit of the 32-digit number is the level of detail used to reconstruct the triangles in the mesh. Each level doubles the voxel size and block size for that mesh region. For example, a Level 3 mesh block covers a cubic region with sides 8 times longer than a Level 1 mesh block and contains voxels that are 8 times larger.
Level of Detail Setup Examples
We provide two examples for how to set up meshing level of detail in your project. The first example, taken at a distance of 30 meters, is suitable for indoor use, while the second, taken at 100 meters, is better for outdoor experiences.
Example indoor configuration:
Example outdoor configuration: