Pointcloud models
@cognite/reveal
supports point clouds through a third-party library, potree-core
. The viewer
supports loading both point clouds and CAD models at the same time. Point clouds can be generated from various sources including
laser scans and photogrammetry models.
Loading point clouds is done with identical code to when loading CAD models - Reveal will determine that the model
is a point cloud model and act accordingly.
Point size
You can use pointSize
property to set the size of each rendered point in a point cloud model.
Point budget
The point budget limits the number of points loaded and rendered at any given time, which helps to adapt performance requirements to the capabilities of different hardware. Recommended values are between 500.000 and 10.000.000. The budget is shared among all loaded point clouds.
Point shape
You can set the point shape of each rendered point in the point cloud. Values are defined by PotreePointShape
enum.
Point color type
You can specify in which way points should be colored. Values are defined by PotreePointColorType
enum.
Other useful coloring schemes are Rgb
(color) , Classification
(color by point class) and Intensity
(strength of the backscattered signal in a laser scan).
Classification filtering
Some point clouds have classification information associated with each point. This can be used for coloring or to filter the point cloud.
note
The demonstration model doesn't have classification data so the examples below are not runnable.
To list classes available in a point cloud model, use CognitePointCloudModel.getClasses
:
It's also possible to check if a model has a given class by using CognitePointCloudModel.hasClass
.
A list of well-known point class codes are defined in WellKnownAsprsPointClassCodes
. These definitions
by the ASPRS LAS 1.4 specifications.
To filter away certain classes, use CognitePointCloudModel.setClassVisible
:
To check if a class currently is visible, use isClassVisible
:
Unloading models
Point clouds (and CAD models) can be unloaded using Cognite3DViewer.removeModel()
: