Partially hidden entities

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.

The problem can be seen at this link.

Is there a way to avoid this problem?

Thank you in advice,

Matteo

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;
        [...]
   

Here another git that shows the problem

Hello Matteo,

i have a similar problem from some days ago but only with google Chrome. Do you find the same problem with multiple browsers?

If you look at the geometries demos in Sandcastle do you see the same problem… looking polylines, walls etc… ?

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)

Hello,

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.

What is your OS and graphics card?

Thanks,

Hannah

This code can show you exactly the problem: https://jsfiddle.net/chaj6qjy/3/
I set a flyTo that shows an half hidden pipe.

I tried the script with:

Windows 10 Enterprise x64 - nVidia GTX970

Windows 7 Professional x64 - nVidia GTX295

(The screen resolution is 1080p)

I can’t reproduce the problem with the entity positioned over the surface.

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.

Best,

Hannah

Hello Hannah,
thank you for your support.

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.

Matteo

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.

-Hannah

Thank you Hannah, this plugin is very interesting, I will certainly try it.