How to color the point cloud according to the dynamic point range

I have a Las generated point cloud data. and I want to color part of the points of the point cloud according to a dynamic spatial range.This dynamic spatial range consists of a collection of points positions and color values RGB. And the postions is a part of the point cloud.
Then how can I traverse every point of the 3dtiles cloud to find the points match with the dynamic spatial range?
Or how can I pass the variable dynamicSpatialRange into the following style setting so that I can change the points provided.

var dynamicSpatialRange ={
positions:[{x,y,z}],
colors:[{255,0,255}]
}
var style = {

            color: {

                conditions: [

                    ["${POSITION}.z >= 10", "rgba(255,255, 0, 1)"],

                    ["true", "rgb(255, 0, 0)"]

                ]

            }

        }

Thank you

Can you help me ? thanks

1 Like

Coloring point clouds based on a dynamic variable would require extending the 3D Tiles styling language. This isn’t currently supported, but there is a feature request and some experimental implementations in this GitHub issue: https://github.com/CesiumGS/cesium/issues/5343. The use case here was coloring a point cloud based on proximity to a moving entity:

Can you describe a bit more what you’re trying to visualize here and your use case?

This example is very good, very close to my needs. My application scenario is like this: I have a substation point cloud data and a patrol robot. The robot is equipped with visible and infrared cameras. When the robot patrols, it will take pictures of the local area of the substation. My demand is to match the pixel color value of the photo with the point cloud position in real time, and then change the color value of the point cloud within the scope of the photo.

How to dynamically match point cloud with visible or infrared photos,形成实景三维模型,局部更新点云像素值?

If you have the latitude, longitude, and height that the pictures are taken in, you could visualize these on top of the point cloud, but I can’t think of an easy way to update the individual point colors in real-time like this.

You may need to do this process offline on the source data, and then re-upload those processed point clouds with the new color to ion to visualize them in your app. You can automate this with the Cesium ion REST API: https://cesium.com/docs/tutorials/rest-api/

Is that something still under consideration?