top of page

On this Page

​

Scanning

​

Meshing

PhantomEngine-Logo-Icon-W-Text.png

Docs

Docs       Manual       Reference       Changelog       Main Site

Manual

Spatial Mapping.

Scanning

​The Scanning script automatically converts depth information received from the device's sensors into 3-dimensional points, which it stores as a "point cloud" in the OctreeManager.

​

While the script is enabled, new points will be scanned continuously. While the script is disabled, you can treat Scanning as 'paused'.

 

You can customise Scanning's parameters (such as the rate at which points are scanned) in the "Scanning" section of SpatialMappingParameters.

​

Scanning is a singleton and can be accessed from any script as long as you have an instance of the Scanning script in your scene.

​

Call Scanning.Instance to get a reference. Subscribe to the Scanning.Instance.FrameScanned event to receive updates when new information is scanned.

Scanning.PNG
Scanning_Diagram-1.PNG
Scanning_Diagram-2.PNG

Meshing

The Meshing script is responsible for taking the point clouds from the OctreeManager and converting them into meshes in your scene. The process is automatic.

 

One potential use of this mesh is to provide collision information inside the engine. This (and other properties of the mesh) can be customised in the "Mesh Generation" section of SpatialMappingParameters.

 

Meshing is still in active development, and the current mesh may not be suitable for display at runtime due to visual artifacts. We recommend developers to put the mesh on a layer that won't be rendered and use it for collision purposes.

 

Meshing is a singleton and can be accessed from any script as long as you have an instance of the Meshing script in your scene. Call Meshing.Instance to get a reference.

 

Subscribe to the Meshing.Instance.MeshGenerated event to receive updates when new meshes are spawned.

​

Call Meshing.Instance.ClearAsync() to clear the meshes in a scene. You may also want to OctreeManager.Instance.Clear() to erase points stored within the OctreeManager.

Meshing.PNG
Meshing_Diagram-1.PNG
Meshing_Diagram-3.PNG
Meshing_Diagram-2.PNG
Scanning
Meshing
bottom of page