Cesium3DTileColorBlendMode.REPLACE can not replace the model color


i use Cesium3DTileStyle to set the model color with #ff4500,
but the model color show not #ff4500
the shown color like this
1

the model is gltf 2.0 using the _3DTILESDIFFUSE semantic

In order to help you, we need to see the Cesium code you’re using, though. If you put it in a Sandcastle, even better.

Cheers,

Alex

1 Like

@hxboxy-xh

Welcome to the community! :confetti_ball: :rocket: As @Alexander_Johannesen said, seeing a sandcastle demo with your work would be helpful. You can get started with sandcastle here:

-Sam

in this demo,
the changed:
tileset.colorBlendMode = Cesium.Cesium3DTileColorBlendMode.REPLACE;
addStyle(“Color by building”, {
color: {
conditions: [
[“${building_name} === ‘building0’”, “color(‘#ff4500’)”],
[“${building_name} === ‘building1’”, “color(‘#ff4500’)”],
[“${building_name} === ‘building2’”, “color(‘#ff4500’)”],
[“true”, “color(‘blue’)”],
],
},
});

if not set tileset.colorBlendMode = Cesium.Cesium3DTileColorBlendMode.REPLACE;
the color is looked like right, but set replace, the color near yellow(?)
but not set tileset.colorBlendMode,(HIGHTLIGHT), when set color to model that already has some color, it ,en ,not right

Hiya,

Works perfectly fine for me. In the Sandcastle example I just changed the colors to red, green and blue to make it more explicit;

In your example code you’re changing all of them to your orange color, and from your screenshot that’s exactly what you see, so maybe explain what you expected to see instead?

PS. You can make all your changes in the Sandcastle, then just hit that Share menu / link and drop that here in the forum, that way the Sandcastle you’re sharing has exactly the code you’re having issues with. :slight_smile:

Cheers,

Alex

use #ff4500, this color is near red,but when set REPLACE, it orange
tileset.colorBlendMode = Cesium.Cesium3DTileColorBlendMode.REPLACE;

addStyle(“Color by building”, {
color: {
conditions: [
[“${building_name} === ‘building0’”, “color(‘#ff4500’)”],
[“${building_name} === ‘building1’”, “color(‘#ff4500’)”],
[“${building_name} === ‘building2’”, “color(‘#ff4500’)”],
[“true”, “color(‘blue’)”],
],
},
});

and