-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GroundPolylinePrimitive has incorrect height with custom ellipsoid #7552
Comments
Hey @OmarShehata thanks for all your help on this issue! After playing around with Re: the initial lunar example posted in the forums: While the above pull request means the line is now drawn near the surface, it tends to be hidden beneath terrain when moving the camera from anything but a straight top-down view. Initial experiments with a custom |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/d/msg/cesium-dev/LxJDKmIDu8I/S-j10RcLFQAJ If this issue affects any of these threads, please post a comment like the following:
|
@malaretv just followed up, same forum thread. Here's a Sandcastle with a polyline on a lunar crater. Notice that tilting the camera causes the polyline to get occluded/culled somehow? @likangning93 is this a separate issue, do you think? |
This is an |
This is part of several issues that came up when clamping to terrain with custom terrain and a custom ellipsoid on the forum: https://groups.google.com/d/msg/cesium-dev/LxJDKmIDu8I/S-j10RcLFQAJ
This Sandcastle code will create a polyline somewhere on the earth using a smaller ellipsoid (to represent the moon):
Live link.
Everything looks fine, but then uncomment
//clampToGround: true
and you'll see that the polyline disappears into space. If you apply the following monkey patch to turn on debug bounding volumes for the GroundPolylinePrimitive (or just set it to true when running this locally inGroundPolylinePrimitive.js
.You can see that the bounding volume is way high, I'm guessing hardcoded to the Earth's ellipsoid height?
My best guess is that this is because
GroundPolylinePrimitive
uses theApproximateTerrainHeights
which is all the Earth's terrain heights?https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/GroundPolylinePrimitive.js#L359-L368
Maybe we should allow overriding a min/max terrain height when creating polylines on non-earth ellipsoids? There's a similar problem that can be seen for the shadow volumes for groundprimitives that I can open a separate issue for.
The text was updated successfully, but these errors were encountered: