Skip to main content

class LightshipMeshingExtension

(Niantic.Lightship.AR.Meshing.LightshipMeshingExtension)

Overview

This component allows configuration of the additional functionality available in Lightship's implementation of XRMeshingSubsystem.

	class LightshipMeshingExtension: MonoBehaviour {
public:
// properties

int TargetFrameRate;
bool FuseKeyframesOnly;
float MaximumIntegrationDistance;
float VoxelSize;
float MeshBlockSize;
float MeshCullingDistance;
bool EnableMeshDecimation;
bool EnableDistanceBasedVolumetricCleanup;
bool IsMeshFilteringEnabled;
bool IsFilteringAllowListEnabled;
List<string> AllowList;
bool IsFilteringBlockListEnabled;
List<string> BlockList;
bool EnableLevelsOfDetail;
int LevelsOfDetail;

// methods

void Configure();
void Update();
};

Detailed Documentation

This component allows configuration of the additional functionality available in Lightship's implementation of XRMeshingSubsystem.

Properties

TargetFrameRate

int TargetFrameRate

Get or set the frame rate that meshing will aim to run at.

FuseKeyframesOnly

bool FuseKeyframesOnly

Get or set whether only depth keyframes will be fused into the mesh.

MaximumIntegrationDistance

float MaximumIntegrationDistance

Get or set the maximum distance (in m) from the camera at which that the meshing system will integrate depth samples into the 3D scene representation.

VoxelSize

float VoxelSize

Get or set the size (in m) of individual voxel elements in the scene representation. Setting this to higher values will reduce memory usage but reduce the precision of the surface.

MeshBlockSize

float MeshBlockSize

Get or set the size (in m) of the Mesh Blocks used for generating the Mesh Filter and Mesh Collider. This value will be automatically rounded to be a multiple of the voxel size.

MeshCullingDistance

float MeshCullingDistance

Get or set the distance (in m) from the camera at which Mesh Blocks will be removed from the scene. A value of 0 indicates that Mesh Blocks will not be removed.

EnableMeshDecimation

bool EnableMeshDecimation

Get or set whether excess triangles will be removed from the mesh.

EnableDistanceBasedVolumetricCleanup

bool EnableDistanceBasedVolumetricCleanup

Get or set whether the volumetric representation will be cleaned up once it moves outside the region where new mesh is currently being generated. This saves memory and smooths latency.

IsMeshFilteringEnabled

bool IsMeshFilteringEnabled

Get or set whether filtering to select which semantic segmentation channels are included in the mesh is currently enabled.

IsFilteringAllowListEnabled

bool IsFilteringAllowListEnabled

Get or set whether to use the AllowList to determine which channels are included in the mesh. This property must be used in conjunction with the IsMeshFilteringEnabled property.

AllowList

List<string> AllowList

The list of names of channels included in the mesh. Both the IsMeshFilteringEnabled and IsFilteringAllowListEnabled values must be true in order for the allow list to have an effect.

IsFilteringBlockListEnabled

bool IsFilteringBlockListEnabled

Get or set whether to use the BlockList to determine which channels are included in the mesh. This property must be used in conjunction with the IsMeshFilteringEnabled property.

BlockList

List<string> BlockList

The list of names of channels excluded from the mesh. Both the IsMeshFilteringEnabled and IsFilteringBlockListEnabled values must be true in order for the block list to have an effect.