Issues with entity polygon (with per position heights) visualisation on complex 3d tilesets

Hi,

Still fairly new to CesiumJS. I am currently working on a viewer for 3d archaeological data. The plan is to have geojson files loaded into cesium as this is a format most archaeological data is in.

I am having an issue with polygons with per position heights. I can add the polygons fine but the issue is that due to their being no way of having depth test fail on polygon entity, the polygons are being clipped by the tileset geometry. I was wondering if there is a good workaround for this.

I am aware of the sandcastle tutorial of using classification that is baked into 3d tiles however this is not practical for most archaeological workflows.

Have considered maybe using primites but the tooling for them is not as good as for entities.

Any help on this would be appreciated. Sorry I can’t provide any screen shots due to data sensitivity.

Hi @BenDyson-Arch ,

Thanks for your post and welcome to the Cesium community.

There are probably a wide range of options available. One approach you could try is to convert your data to polylines, where we do support depth fail testing like in this example Sandcastle | CesiumJS

Please let us know how this option might work for you and we are happy answer further questions and discuss more options.

Thanks,
Luke

Hi @Luke_McKinstry ,

Thanks for the reply. I decided to go with a primitive collection with a custom depth fail appearance. This seemed to do the trick as far as I can tell although not entirely sure what the potential downsides of this might be.

apearance: ({

    flat: true,

    translucient: true,

    renderState: {

        depthTest: {

            enabled: false,

        }

    }

})