This is the general interface that describes a PointCloud style object.

The PointCloud style object defines styling expressions used by TileSet3DLayer layer to style PointCloud data. All properties are optional.

2018.0

interface PointCloudStyle {
    blending?: boolean;
    colorExpression?: null | Expression<string>;
    density?: null | DensitySettings;
    displacementExpression?: null | Expression<Vector3>;
    gapFill?: number;
    normalOriented?: boolean;
    pointShape?: PointCloudPointShape;
    pointSize?:
        | null
        | { mode: PIXEL_SIZE; pixelSize?: number }
        | { minimumPixelSize?: number; mode: WORLD_SIZE; worldSize: number }
        | {
            minimumPixelSize?: number;
            mode: ADAPTIVE_WORLD_SIZE;
            worldScale?: number;
        };
    scaleExpression?: null
    | Expression<number>;
    scalingMode?: null | ScalingMode;
    visibilityExpression?: null | Expression<boolean>;
}

Properties

blending?: boolean

Enable a post-processing effect that blends overlapping points to present a smoother surface.

It has an impact on performance. The frame rate can decrease by 30% to 40%.

It's best to increase the size of points so that more points blend together.

  • The blending effect can't be used together with density setting. Blending will be disabled if density is enabled.
  • The transparency setting is ignored when blending is enabled.
  • Using blending with SPHERE shape doesn't improve the blending effect's quality — consider choosing either blending or SPHERE.

2024.0

colorExpression?: null | Expression<string>

An expression to specify what colors to apply to PointClouds points.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a color value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

Note that alpha component in color is ignored, color will be fully opaque.

<code>null</code> If not set, points use colors as defined in the PointCloud data.
density?: null | DensitySettings

Set or get the density painting settings for a point cloud. Use null to disable density painting.

The density settings object has one property: colorMap, the color map used to map density values to color.

The density at a particular location is the sum of the alpha channel values for all overlapping objects. For a single opaque object you would get a density value of 1.0, for 2 opaque objects 2.0, etc.

Density painting notes:

  • The color aspect of the points is ignored. The alpha value of the color is used as a per-point weight.
  • Density is not computed across multiple point cloud layers.
  • Gap filling does not work with density painting and will be ignored if density is set.
  • SPHERE is not compatible with density painting and will be ignored.
  • blending setting is not compatible with density and will be ignored.

For more information, see the article Density painting of point cloud data

null

2024.0

displacementExpression?: null | Expression<Vector3>

An expression to displace points.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a point value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

  // Example of a displacement expression that pushes down everything inside a shape.
var _ = ExpressionFactory;
var shape = _.orientedBox(layer.orientedBox);
meshStyle.displacementExpression = _.pushDown(shape);
null points are not displaced by default.

2022.0

gapFill?: number

Enable a graphical post-processing effect to intelligently fill or "in-paint" small holes or gaps between your points.

This helps creating a visually closed surface. It works best if you already have high-density point cloud: you can use a small point size to retain visual detail and reduce overlap, but still avoid see-through effects.

The effect works well for 1, 2 or 3 pixels. You can go higher, but depending on your dataset the quality can degrade.

The effect generally has only a little overhead and impact on performance.

The default is 0, disabled.

2022.0

normalOriented?: boolean

Draw point cloud dots based on the direction of their normal vector.

Point orientation is available only if the dataset has normal vector values. If the dataset doesn't have normals, this parameter is ignored.

The effect has a little overhead and impact on performance.

Enabled by default.

2024.0

This option influences how points are drawn, specifically when they overlap.

  • When using DISC, overlap can result in a more pixelated, low-resolution display even if you have high point density.
  • When using SPHERE, overlap results in a high quality visual coverage of your data, but at the cost of performance.

The visual effect is most noticeable if you have large points (> 4 pixels) and a high point density. When you have small points (< 5 pixels), we recommend to use DISC.

The default is DISC for HSPC, SPHERE for OGC 3D Tiles.

2022.0

pointSize?:
    | null
    | { mode: PIXEL_SIZE; pixelSize?: number }
    | { minimumPixelSize?: number; mode: WORLD_SIZE; worldSize: number }
    | {
        minimumPixelSize?: number;
        mode: ADAPTIVE_WORLD_SIZE;
        worldScale?: number;
    }

Specify the point cloud dot size.

Choose one of the following modes:

    PIXEL_SIZE: the dots have a fixed size in pixels, specified by pixelSize. The default is 3 pixels.
    WORLD_SIZE: the dots have a fixed size in meters, specified by worldSize. Additionally, you can specify a minimumPixelSize, so your points are never too small.
    ADAPTIVE_WORLD_SIZE: the dots have size in meters, computed from the tile's density. Additionally, you can specify a minimumPixelSize, so your points are never too small. You can tune the computed world size with the worldScale parameter. This is the preferred mode for LuciadFusion OGC 3D Tiles point clouds as well as HSPC point clouds.

Any scaleExpression is applied on top of the base size given here.

Note that the points will have a maximum size that is platform-dependent, usually around 60 pixels.

2022.0

scaleExpression?: null | Expression<number>

The expression that determines the scale factor to apply to PointClouds points.

  • Scale 1 corresponds to the default size of the point that is calculated based on the pointSize value.
  • Scale is smaller than 1 will shrink the point size.
  • Scale is greater than 1 will enlarge the point size.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a number value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

1 If not set. The point size is not rescaled by the expression.
scalingMode?: null | ScalingMode

The scaling mode identifies the way point cloud data points are scaled for visualization. Note: The initial point size, that is calculated based on the scaling mode, is additionally modified by the results of the scaleExpression. The scale expression is used as a multiplier on top of internal point size of 3.

ScalingMode.ADAPTIVE_WORLD_SIZE By default OGC 3D Tiles are scaled using ScalingMode.PIXEL_SIZE.

Use pointSize instead.

visibilityExpression?: null | Expression<boolean>

An expression to filter PointClouds points.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a boolean value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

true PointCloud points are visible by default.