Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"scene3DOnly: true" causes Polyline to cull #7043

Closed
timoto opened this issue Sep 17, 2018 · 4 comments · Fixed by #7052
Closed

"scene3DOnly: true" causes Polyline to cull #7043

timoto opened this issue Sep 17, 2018 · 4 comments · Fixed by #7052

Comments

@timoto
Copy link

timoto commented Sep 17, 2018

scene3DOnly: true causes GroundPolylinePrimitive to be culled from the scene when zooming, tilting, rotating the polyline into certain positions.

First discussed here: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/Kbxc_UXRyww

Open this Sandcastle example and zoom into Australia to see the line disappear:

var viewer = new Cesium.Viewer('cesiumContainer', {
    scene3DOnly: true,
    timeline: false,
    animation: false,
    baseLayerPicker: false,
    geocoder: false,
    selectionIndicator: false,
    infoBox: false,
    skyBox: false,
    skyAtmosphere: false,
    homeButton: false,
    fullscreenButton: false,
    navigationHelpButton: false,
    terrainProvider: Cesium.createWorldTerrain(),
});

viewer.scene.requestRenderMode = true;
viewer.scene.backgroundColor = new Cesium.Color( 255, 255, 255, 1 );

var pathBoundaries = [4.88747, 52.367, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 5.11239, 52.09708, 10.18374, 53.39808, 14.42139, 50.08861, 11.26148, 43.76885, 23.71667, 38, 3.86403, 43.61175, 13.21341, 52.56254, 2.73766, 41.96195, 2.73766, 41.96195, 1.69659, 41.34703, 1.69646, 41.34581, 1.69944, 41.34472, -5.3446, 35.5786, -15.95829, 18.14911, -15.95829, 18.14911, -15.52113, 18.04593, 14.42139, 50.08861, -15.99672, 18.10819, -15.99672, 18.10819, -15.99672, 18.10819, -15.99672, 18.10819, -17.45836, 14.6822, -17.45836, 14.6822, -16.9519, 14.77151, -16.9519, 14.77151, -16.9519, 14.7715, -16.9519, 14.7715, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40833, 13.82591, -16.4083, 13.8245, -16.40831, 13.82451, -16.40831, 13.82451, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40732, 13.82349, -16.40824, 13.82576, -16.40824, 13.82576, -17.39357, 14.73907, -17.39357, 14.73907, -17.39357, 14.73907, -17.39357, 14.73907, -17.39357, 14.73907, -17.45835, 14.73988, -17.45835, 14.73988, -17.45835, 14.73988, -17.45835, 14.73988, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -16.4083, 13.8245, -16.41041, 13.82482, -16.40788, 13.82521, -16.40788, 13.82521, -16.4083, 13.8245, -16.4083, 13.8245, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -17.45265, 14.74699, -17.45265, 14.74699, -17.44507, 14.70131, -17.43493, 14.66651, -17.46015, 14.69313, -17.44799, 14.72749, -17.4249, 14.70612, -17.4249, 14.70612, -16.4083, 13.8245, -16.4083, 13.8245, -16.36792, 13.87559, -16.4083, 13.8245, -17.4249, 14.70612, -17.4249, 14.70612, -17.4249, 14.70612, -16.9519, 14.77151, -16.9519, 14.77151, -16.40892, 13.82595, -12.2012, 14.45826, -12.2012, 14.45826, -12.2012, 14.45826, -8.84305, 14.50781, -7.98814, 12.62048, -7.98814, 12.62048, -7.98825, 12.62033, -7.98825, 12.62033, -7.98825, 12.62033, -16.40907, 13.82514, -7.96672, 12.61115, -7.96672, 12.61115, -7.96672, 12.61119, -7.99969, 12.65832, -7.99968, 12.65832, -7.99969, 12.65832, -7.98825, 12.62033, -7.98825, 12.62033, -7.9928, 12.61987, -7.98825, 12.62033, -8.44697, 11.88726, -8.44698, 11.88726, -8.44698, 11.88726, -8.44698, 11.88726, -8.44698, 11.88726, -8.44698, 11.88726, -8.4469, 11.88756, -8.44735, 11.88908, -8.44735, 11.88908, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -7.9398, 12.6664, -8.44697, 11.88726, -8.44697, 11.88726, -8.44696, 11.88975, -8.44696, 11.88975, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44697, 11.88726, -8.44696, 11.88975, -7.9398, 12.6664, -7.9398, 12.6664, -7.9398, 12.6664, -7.9398, 12.6664, -7.99969, 12.65832, -4.55217, 13.90571, -4.55217, 13.90571, -3.61656, 14.35105, -4.55488, 13.90557, -4.55488, 13.90557, -1.55492, 12.37793, -1.55492, 12.37793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20416, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -8.4487, 11.88958, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.20417, 5.56793, -0.36556, 5.49561, -0.36556, 5.49561, -0.36722, 5.49638, -0.14813, 5.95954, 1.2101, 6.11841, 1.2101, 6.11841, -0.20414, 5.57036, -0.20414, 5.57036, 1.2101, 6.11841, -0.14577, 5.95869, -0.14577, 5.95869, -0.14577, 5.95869, -0.15029, 5.95849, -0.15029, 5.95849, -0.15385, 5.97743, -0.15029, 5.95849, -0.15386, 5.97742, -0.14577, 5.95869, -0.14577, 5.95869, -0.14577, 5.95869, -0.14577, 5.95869, -0.14577, 5.95869, -0.1506, 5.96022, -0.15059, 5.96023, -0.15046, 5.96087, -0.1506, 5.96022, -0.1506, 5.96022, -0.20414, 5.57036, -0.38376, 5.48419, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, 5.61732, 6.33371, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.37869, 5.48642, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.20414, 5.57036, -0.14813, 5.95954, 16.01831, -17.99718, 21.65546, -21.76295, -5.36498, 35.56161, 46.51402, -18.75897, 12.85042, -2.115, 46.47298, -18.76316, -38.4813, -12.9822, 17.2349, -19.34342, -48.01542, -9.46247, -42.50185, -13.45547, -71.59453, -39.34658, -64.3052, -19.027, -79.1203, -8.0795, -72, 11.9167, -96.72028, 17.06694, -88.91645, 14.91038, -101.60972, 19.51639, -71.5949, -39.34655, -133.7285, 68.3574, 174.00494, -35.14477, 128.61318, -18.79298, 123.59413, -10.15688, -215.7818, -51.82298, -211.02258, -52.1761, -201.91767, -53.24661, -197.2306, -52.61302, -191.98536, -53.70409, -219.4692, -49.88706, 115.26276, -8.6598];

var entity = viewer.entities.add( {
    polyline : {
    positions : Cesium.Cartesian3.fromDegreesArray( pathBoundaries ),
    width : 5,
    clampToGround : true,
    material : Cesium.Color.RED
    }
});

var polyline = entity.polyline;

then comment out scene3DOnly: true run and try again. Now line does not disappear.

It's even possible to perform on a much shorter polyline such as var pathBoundaries = [0,0, -30,0] if the line is then zoomed right in, tilted and rotated to the bottom of the screen.

Seen on
iOS 11.4.1 in Safari, Chrome, DuckDuck
Windows 7 64bit SP1 in Chrome, FireFox

Present in Cesium 1.48 and 1.49

@likangning93
Copy link
Contributor

Thanks for the report and the easily-reproducible Sandcastle @timoto! We'll try to get to this soon.

@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/forum/?hl=en#!topic/cesium-dev/Kbxc_UXRyww

If this issue affects any of these threads, please post a comment like the following:

The issue at #7043 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@hpinkos
Copy link
Contributor

hpinkos commented Sep 20, 2018

Thanks for the bug report @timoto! This has been fixed and will be included in the 1.50 release available on October 1st

@timoto
Copy link
Author

timoto commented Sep 21, 2018

@hpinkos Thanks for the fast turn around. Will certainly test on release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants