Rectangle entity on terrain clipping at negative elevations

34 views
Skip to first unread message

satten...@datalive.com.au

unread,
Dec 18, 2019, 8:50:46 PM12/18/19
to cesium-dev

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.

underwater-imagery-cutoff.jpg



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.

Omar Shehata

unread,
Dec 19, 2019, 9:14:31 AM12/19/19
to cesium-dev
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 sup...@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.
Reply all
Reply to author
Forward
0 new messages