-
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
Drawing and picking issues on terrain with negative WGS84 elevation #7092
Comments
Hmm the behaviour has changed with Cesium 1.50. There can be large discrepencies between results from |
For the second gif I'm also seeing discrepancies in 1.49. I wonder though if the problem is the pickPosition is hitting the label object rather than the terrain. I tweaked the pixel offset so the label is above the cursor and the results seemed much better. |
Ah, my mistake @lilleyse, thanks for looking. After some further investigation it seems some of the issues we're seeing in our app are specific to having |
Here's an example which more clearly shows the rendering issues. The red polygon in particular doesn't appear until viewed from afar. |
It looks like some of the rendering issues are related to going below the limits specified in |
Initial testing shows these workarounds address picking and rendering: PropellerAero@e25b163 |
@ggetz We're continuing to try to contribute modifications in our Cesium fork back into CesiumGS/cesium. I'm re-investigating this issue at the moment. The following change in particular: To contribute this type of change it would be good if we could control the max excavation depth. e.g. normally there is no offset applied, but we (or other users who run into this issue) can set it to -250. I'm not sure how to do that since |
Thanks @chris-cooper! Long term, relying on ApproximateTerrainHeights is likely something we'll want to move away from. I'm not sure I see where |
It sounds like a good idea to move away from For this current issue it's createGroundPolylineGeometry but there may be other indirect calls to it too from other workers. |
Got it, thanks @chris-cooper. Besides the other issues Perhaps a custom ellipsoid, or a new property on If you do have any further bandwidth to work on #8480, please let us know! |
I tried adding an attribute to Ellipsoid and Polyline and the render looks good, bounding box needs some fixing. const WGS84 = new Cesium.Ellipsoid(6378137.0, 6378137.0, 6356752.3142451793); Little catch WGS84 etc are frozen objects, so this fails Any preference on how to handle it? I would just add getWGS84withOffset() |
We're also considering another workaround which is to monkey patch This is relying on the json file being loaded asynchronously. It would break if the cesium build changed to e.g. inline the json files within the web workers. Are there any plans to do that @ggetz, or do you see |
@chris-cooper We've tossed around the possibility of inlining JSON files, and |
I just hard coded the ellipsoid custom values to test above and if it has the values its fine, just passing ellipsoid is kind of tricky. |
@katSchmid We don't have immediate plans to work on #3543. But we'd be happy to discuss details and/or accept a Pull Request for this feature. |
Since picking is used for camera controls, we've noticed this causing issues when the camera goes below the ellipsoid, such as what is described @mramato's comment here. |
This should be fixed as of #11983. There's still a slight discrepancy due to the differing picking approaches, but they are much closer in value. |
Hi Cesium team!
There seems to be various issues with rendering and picking at negative WGS84 elevations. Appologies for the poor capture but hopefully you can still see the issues with the lat/lon display disappearing and the line also disappearing at certain angles. Note that I think this issue predates the work done on log depth buffers.
Sandcastle Repro
The text was updated successfully, but these errors were encountered: