To draw attention to a specific mesh or point cloud of a TileSet3DLayer, you can add an outline to it. You can also keep the 3D object visible when it’s obscured by another object.

Configure an outline

You can configure the outline on the TileSet3DLayer through the property:

  • outlineStyle: outline styling applied to the mesh or point cloud.

An OutlineStyle has the following properties:

  • outlineColorExpression: create an expression to decide the color of the outline.

  • outlineWidth: decide the width of the outline.

outlined house
Figure 1. TileSet3DLayer mesh of a house with a red outline

Keep an obscured mesh or point cloud visible

To visualize the part of the 3D object hidden by another layer, you can use the occlusionStyle property. You can set it directly on the TileSet3DLayer.

Occlusion means that one object hides another object.

You can configure the following parameters for OcclusionStyle:

  • bodyColorExpression: create an expression to decide the color for the body of the hidden part of the mesh or point cloud.

  • outlineStyle: outline styling applied on the obscured part of the mesh or point cloud.

You can apply the OcclusionStyle only to the parts of the 3D object that are hidden by objects of layers below the TileSet3DLayer in the LayerTree. LuciadRIA doesn’t consider transparent objects when it determines the occlusion.

partly occluded house
Figure 2. TileSet3DLayer mesh of a partly occluded house with a dark occlusion style

Creating the expressions

You must use ExpressionFactory to create the styling expressions. See Property-based styling and filtering of points on a WebGLMap for more information about styling through expressions. See the MeshStyle API reference documentation for example code.

You can’t use attribute expressions for the outlineColorExpression or the expressions on OcclusionStyle.