-
Notifications
You must be signed in to change notification settings - Fork 376
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
Points and polygons without elevation are drawn underneath terrain #702
Comments
I wrote some hacky code in The actual solution is a complicated Cesium feature, and it is in the works: |
Cesium now has built-in support for polygons and billboards on terrain. We just need to do some things to make it work in TerriaJS. Specifically, I believe we need to pass a Cesium Scene into data sources with on-terrain features, which is a hassle because we sometimes create data sources before the Scene is even created. Plus the Scene can come and go during the lifetime of the DataSource. Oh and even then, polygons on terrain have hardware and browser requirements, so it won't work on every system. So this is still tricky, but we're closer. |
Has there been any recent progress with this in TerriaJS?. Would be nice if KML and GeoJSON lines and polygons were 'clamped-to-ground' in 3D by default. |
No progress yet, sorry @geoffrowland. It's probably not terribly hard to make Cesium's support work in TerriaJS, though even Cesium's support has lots of caveats. |
@kring we should just disable drawing selected polygons when in terrain mode, because it looks pretty terrible. What do you think? |
I fixed this for the digital twin project, just need to merge it. It might be in one of the pull requests I've already opened actually. |
Does this mean KML and GeoJSON lines and polygons will be 'clamped-to-ground' in 3D? At the moment, I have reverted to using CesiumJS to support this, but miss all the other lovely features of TerriaJS. |
Just noticed that the latest releases have a clampToGround property for GeoJSON CatalogItem. |
When you load polygon or point data with no associated elevation set, these features are drawn by Cesium on the geoid underneath any 3D terrain. This isn't a problem as long as you keep the view looking straight down, but as soon as you tilt the view the points/polygons "move" across the landscape due to the parallax effect.
For points with no elevation might it be possible to find the terrain elevation at the point and draw it "clamped to ground"?
I can see that things might be a bit trickier with polygon data, which I guess would essentially have to be projected on top of the terrain.
The text was updated successfully, but these errors were encountered: