Hello,
I have a problem on visualizing entities. A “ghost” zone appears at a certain level of zoom and it hides all the entities I’m trying to show. I tried versions 1.18 and 1.19 and there are no differences.
I’ve also tried to use primitives instead of entities to show the polylineVolume Geometries.I used this code to initialize them:
var instance = new Cesium.GeometryInstance({
geometry : new Cesium.PolylineVolumeGeometry({
vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
polylinePositions : this.positions,
shapePositions: computeCircle(this.width, 8)
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(this.color)
}
});
var primitive = new Cesium.Primitive({
geometryInstances : instance,
appearance : new Cesium.PerInstanceColorAppearance({
translucent : true
})
});
this.viewer.scene.primitives.add(primitive);
and something strange happened: normally the problem does not appear with primitives but if I change the translucency then the problem appears again for that primitive.
this.mouseHandler.setInputAction(function(movement) {
var pickedObject = that.viewer.scene.drillPick(movement.endPosition, 2);
if (pickedObject && pickedObject.length > 0) {
pickedObject[0].primitive.appearance.translucent = false;
Yes, I have the same problem with firefox and the problem can also be seen in the sandcastle by modifying the size of the entities (It’s easier to see it with little entities near the ground)
I’m not sure that this is causing the problem, but make sure you’re using the correct vertexFormat for your geometry.
In this case, you should use vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT, instead of vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
Could you please provide a more complete example with some sample data? I’m having trouble reproducing this. It looks like a problem with our camera though.
Thanks for the code example!
The problem you’re seeing is because your polylinePositions have a negative height. They are being drawn under the ellipsoid surface, which is behavior that is not officially supported. The PolylineVolume is being drawn above the surface from some camera angles, but below the surface at other angles. If you remove the ‘-20’ height, you should no longer see the problem.
I cannot simply remove the “-20” because the project I’m working on is based on an undeground network, so the polylines have to be shown under the ground surface.
I’m not sure how up-to-date this is, but you could try using the ground push plugin: https://github.com/NICTA/cesium-groundpush-plugin
Other than that, I can’t think of any other workarounds, sorry. Maybe someone else will have a suggestion.