Rectangle entity on terrain clipping at negative elevations

Using custom terrain (generated by cesium-terrain-builder, using quantized mesh branch) with underwater elevations, and a rectangle with image material classified against the terrain, the image doesn’t render below around -20m.

Here’s the code for adding the rectangle. Same behaviour occurs even if it’s just a material with a solid RGB colour and no transparency.

viewer.entities.add({
rectangle: {
coordinates: Rectangle.fromDegrees(…bounds),
material: new ImageMaterialProperty({
image: filename,
color: Color.WHITE.withAlpha(transparency),
transparent: true
}),
classificationType: ClassificationType.TERRAIN
}
});

``

Using Cesium 1.64, but it was happening back in 1.58.1 and possibly before. I know you’re not the authors of ctb, but the terrain behaviours correctly as far as I can see.

Using Cesium Ion to generate terrain tiles, then adding a rectangle in the sandcastle produces the same result, albeit at a different elevation. Mouse interaction with the rectangle ceases where rendering cuts off.

Using Cesium Ion to generate map tiles for a raster, then adding this to viewer.imageryLayers with the Ion generated terrain, correctly renders the raster.

Hey Stuart,

Would you be able to share a Sandcastle link to the ion generated versions, the one that is correct and the one that isn’t? You can email it to support@cesium.com if you can’t share it publicly.

There’s a few known issues in CesiumJS right now that prevent underwater/underground rendering from working correctly (see https://github.com/AnalyticalGraphicsInc/cesium/issues/5665) but I’m curious to log what’s going on here/why it’s working in one case but not the other.