Tileset colorising have some odd colors?

Hi, me again,

Getting some odd colors when 3DTileset colorising. The attached image gives you the run-down; there’s basically two values for the property, and they set the color of the Feature to either white or black. However, the white is rendered blue. What could be causing this? I’ve played around with various things, from opacity to globe.lighting and so on, can’t seem to hit the problem. Any obvious reasons why the colors towards the white might be off like this?

I noticed the Sandcastle example with building materials also looks a bit, uh, off? Like the colors are washed out? White is kinda middle-gray? Indian red is dark red? Could this be related? Cesium versions related?

I’ve searched around and can’t really find anything obvious, so any help or hint is much appreciated.

Cheers,

Alex

Hi @Alexander_Johannesen,

Apologies for the delayed response; I was digging around old threads on the forum and realized this was never answered.

This might be related to an observation in a more recent forum post:

The color white is a special value. […] It will render the tileset’s original color for meshes.

I wonder if that’s what is going on here. What happens if you set the color from #ffffff to something a tad darker, like #eeeeee? Let me know if that works.

Best,
Janine

Hi,

Thanks for the follow-up. Not sure if that’s it (but it could well be part of the story), it seems to be dependandt on the original color of the tiles. For example, if the tiles originally are red, putting a color of green makes them look mustardy, and so on. It seems that you’re not coloring the tiles, you’re mixing a layer of color on top of some older color. Should note that I’m (mostly) always using some transparency, and I think the transparency of the two colors together causes this (or at least, make it more obvious). There seems to be no way for me to color a red tile (for example) to be some other primary color, it’s always going to be some kind of mix. However, there’s no documnetation that sheds much light on how colors are actually applied. I thought about going through the code to find out, but I don’t have that much free spare time lying around … :slight_smile:

Cheers,

Alex

Have you tried setting tileset.colorBlendMode to Cesium3DTileColorBlendMode.REPLACE? The default is HIGHLIGHT which mixes the color with the original color. REPLACE should set the color you provide (except in the special case of white).

1 Like

Fantastic! This solves at least half my problem (blending on White is still an issue as we use that for default transparency on various tilesets, but maybe I can resort to some kind of approximation or material).

You’d think after working with Cesium for a year or so you’d know most things or at least what to look for, and then it turns out I missed something obvious. Thanks heaps!

Cheers,

Alex