-
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
globe.getHeight randomly returns 'undefined' #3411
Comments
I had the same problem and it was solved with #4598 |
@xtassin @chris-cooper this should be fixed in master (and the Cesium 1.29 release next week) thanks to #4622 by @duvifn. Let us know if you still have issues. |
Hi @pjcozzi, I'd like to mention that this PR didn't address @chris-cooper 's issue. So I think that there is a need to open a different issue for @chris-cooper 's problem. There could be use cases where this can be significant. |
OK, reopening. |
I looked a bit more into the edge issue.
Here is a new code to reproduce this issue (@chris-cooper's code no longer reproduces this after the update). Copy and paste it into sandcastle and wait until tiles are fully loaded. Then click on
To
(which seems to me more correct anyway), The problem almost completely disappeared: a. With original tiles (not upsampled ones) the problem still exists, but it much smaller, and I believe it depends on the original data. With STK terrain this is very rare (I got 8 @pjcozzi, if this seem to you, I would make a PR for this rounding issue. There will still be an I think that doing some threshold checking (even 1/4000 of the tile width/height) when creating the mesh, as in the upsampling process, will further improve this case... |
I can reproduce #3710 before this change but not after. So I think this is at least part of the reason to #3710 |
@bagnell what do you think of @duvifn's suggested change, #3411 (comment)? |
I can't reproduce this either. The change suggested in #3411 (comment) is a good change. @duvifn, can you open a PR? |
@pjcozzi @lilleyse @bagnell thanks!
FYI, I checked this issues again on my machine, with 1.31 (before your fix), and I can still reproduce both the |
After moving to 1.32 I noticed that the way I calculate terrain normal (sampling elevation for three points at 1m distance) sometimes returns wrong values around tiles boundaries. (my humble physics engine did not like that) I reverted back to 1.31 which still returns the "undefined" value that, by now, I managed to work around. 1.32 never returns "undefined" but will, every now and then, return a value that if off by a couple of meters. It was easy to discard "undefined values" and use the best neighbor sampled elevation. Having results slightly off is much more difficult to filter out. |
Normals can be turned on for lighting the terrain in the terrain provider. Can I get access to that information just as I can get access to the height being used in the rendered terrain? I don't want to have to calculate the normals myself if I don't have to. |
getHeight still return undefined, so its still broken :/ |
Following up on a discussion in the forum https://groups.google.com/forum/#!msg/cesium-dev/NvnW8_cNEQM/L6FCmkVABgAJ
I made this post with a test case to run in Sandcastle:
https://groups.google.com/d/msg/cesium-dev/08DYCm0z5sM/yWgltqPkDQAJ
The text was updated successfully, but these errors were encountered: