Lines are randomly clipped

I'm using CZML to render polylines. Portions of the lines do not appear on the globe, but the condition seems to be fixed if I zoom in and out.

Cesium - 1.30
Browser - Firefox 44.0.2
OS - Red Hat Linux 6.2

Thanks,
  Tony

To elaborate a bit more there seems to be an artifact fixed to the browser window. If I move the map any line that passes through the artifact looses visibility. It's almost as if a clipping region has been added.

One more thing I just noticed is that the clip region is in the shape of a circular strip. The problem happens at around 1,000,000 meters camera altitude, as I zoom out the region shrinks towards the center of the screen, if I zoom in the region expands outside the screen. The affect happens within a very small range, i.e. I start seeing it at 950 KM, and stop seeing it at round 995 KM. If I had to guess it looks like there's a clip region being defined to account for earth curvature that's not being setup properly.

The exact camera altitude in my case where I notice the problem is 991851 meters. Zooming in or out from that range moves the artifact.

Hi Tony,

Could you provide some sample data and give us a snippet of example code?

It sounds like they could be clipping against the depth plane, but we can’t be sure without an example.

Thanks,

Gabby

Is there anyway to manipulate the depth plane so I can test on my end?

Below is some code I copied from Sandcastle and edited to help make the problem easier to see. The camera altitude seems to be the key, at or around the altitude you'll see the circle shape appear over the red lines that cross the country. For the map type I used 'Natural Earth II', last one on the list. Again this was with Cesium 1.30, Firefox 44 on Red Hat Linux

var viewer = new Cesium.Viewer('cesiumContainer');

var redLine = viewer.entities.add({
    name : 'Red line on the surface',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArray([-75, 35,
                                                        -125, 35,
                                                        -75, 34,
                                                        -125,34,
                                                        -75, 33,
                                                        -125,33]),
        width : 5,
        material : Cesium.Color.RED
    }
});

var glowingLine = viewer.entities.add({
    name : 'Glowing blue line on the surface',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArray([-75, 37,
                                                        -125, 37]),
        width : 10,
        material : new Cesium.PolylineGlowMaterialProperty({
            glowPower : 0.2,
            color : Cesium.Color.BLUE
        })
    }
});

var orangeOutlined = viewer.entities.add({
    name : 'Orange line with black outline at height and following the surface',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 39, 250000,
                                                               -125, 39, 250000]),
        width : 5,
        material : new Cesium.PolylineOutlineMaterialProperty({
            color : Cesium.Color.ORANGE,
            outlineWidth : 2,
            outlineColor : Cesium.Color.BLACK
        })
    }
});

var purpleArrow = viewer.entities.add({
    name : 'Purple straight arrow at height',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 43, 500000,
                                                               -125, 43, 500000]),
        width : 10,
        followSurface : false,
        material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.PURPLE)
    }
});

//viewer.zoomTo(viewer.entities);
viewer.camera.setView({
    destination : Cesium.Cartesian3.fromDegrees(-90, 37, 996851.0)
});

viewer.screenSpaceEventHandler.setInputAction( function() { console.log( viewer.camera.positionCartographic.height ); }, Cesium.ScreenSpaceEventType.MOUSE_MOVE );

Ah, I can duplicate this.

I think this may be a multi-frustum issue and related to this bug. I bumped that issue, but there is a proposed solution in that thread if you have the bandwidth to make a contribution.

Thanks!

Gabby

Any update to the status of this?

Hi Tony,

No updates yet, the team hasn’t been able to take a look yet. If you have the bandwidth, we’d deeply appreciate of you could help in narrowing it down or propose a fix. That would help speed this up!

Thanks,

Gabby

This appears to have been fixed with 1.45. I'm guessing here, and it's really a guess, is that it was fixed as part of https://github.com/AnalyticalGraphicsInc/cesium/pull/5851

Thanks,
  Tony

Hi Tony,

Log depth may have indeed fixed this. Instead of several view frustums, Cesium now used only one, which would keep the polyline rendered as part of one frustum instead of breaking it across multiple.

Regardless, I’m glad the issue is fixed!

Thanks,

Gabby