I’m using Cesium with a custom elevation dataset created by CesiumTerrainBuilder. Elevation looks good, but on some cases, labels appear with letters shifted mostly on Camera.Up direction (upwards or downwards). This can be easily reproduced, but it doesn’t happen all the time or for the same labels and view angles. The more the altitude angle is shallow, and the more the camera approaches the entity with the label, the more the letters tend to stray off from the label normal area.
However, all are normal when using the online STK World Terrain. Since my terrain is produced by CTB and STR is in quantized-mesh format, there might be a connection with the garbled labels effect I’m seeing.
Thanks for putting me on the right track!
Some more experimenting: I noticed thta when I’m not using heightReference : Cesium.HeightReference.CLAMP_TO_GROUND for the labels, the problem disappears. However, this seems necessary in order to keep the label close to the entity point. Here’s how I create my entities:
var simplePointLabel = new Cesium.Entity({
id: “POINT_L”+entity.id,
name : entity[“name”],
position : entity.position,
point : {
pixelSize : 10,
color : Cesium.Color.GREEN,
heightReference : Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance:0
} ,
label : {
text : entity[“name”],
font : ‘15px arial’,
fillColor : Cesium.Color.BLACK,
//heightReference : Cesium.HeightReference.CLAMP_TO_GROUND,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
disableDepthTestDistance: 0
}
});
``
Adding another screenshot with labels using background, makes it easier to understand. Issue is stil valid for Cesium 1.39. I’ve confirmed it in Chrome and Firefox, on Windows 7.
Hi Thanassis,
Thanks for the code sample, sorry for the wait. With your clarification, this looks like an issue we’re tracking on GitHub. I bumped the issue, and hopefully we can get to it soon.
Thanks,
Gabby