Highlight point cloud with specific position condition

1. A concise explanation of the problem you’re experiencing.

Hi, I’m trying to highlight part of the point cloud with position condition such as “${POSITION}[2]<2” in color yellow.

But when try the code below the rest points become white and the highlighted points seem solid without transparency as I set.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var tileset = new Cesium.Cesium3DTileset({ url: Cesium.IonResource.fromAssetId(3882) });


viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0.0, -1.0, 50.0));

tileset.style = new Cesium.Cesium3DTileStyle({

pointSize: 5,

color : {

conditions : [

[’${POSITION}[2]<2’, “color(’#FFFF00’, 0.5)”]




3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I attempt to achieve the volume highlight as shown like this:

4. The Cesium version you’re using, your operating system and browser.

Cesium 1.43; Windows 7, Chrome 65.0.3325.162

I’m noticing slightly different behavior, where all the points looks transparent. See the image in this Github issue.

If you don’t want the rest of the points to be pure white you can use the ${COLOR} built-in property. The style would look like:

color : {

conditions : [

[’${POSITION}[2]<1.5’, “color(’#FFFF00’, 0.5)”],

[true, “${COLOR}”]




And a live demo here.

By the way, the volume highlight in those screenshots was done with a ClassificationPrimitive, which is probably the better approach.

Thanks for your suggestions.
It’s truly the better approach. :slight_smile: