-
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
3d tiles height reference #11604
3d tiles height reference #11604
Conversation
Thanks for the pull request @ggetz!
Reviewers, don't forget to make sure that:
|
…hicsInc/cesium into 3d-tiles-height-reference
In #11655 it was pointed out that this PR might need to account for vertical exaggeration, see #11655 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a couple comments in addition to the performance issue above.
I only got about halfway through the code and will finish up the rest on monday but wanted to leave these so you can start on them
@jjspace This should be addressed. The root of the issue was a missing flag due to a bad merge. Additionally, I further optimized the 3D Tiles picking function by sorting the bounding sphere before reading any mesh data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that the horrible framerate on the entities sandcastle seems fixed. I reviewed the rest of the code and think it all looks good apart from a few typos I spotted. I would appreciate a second glance through this though as I'm still newer to this area of the code.
I did re-run through the testing plan though and found an issue when changing view types. When switching between 2D and CV there's a "normalized result is not a number" error getting thrown. It doesn't happen when going from 3D to CV, only 2D -> CV
simplescreenrecorder-2024-01-16_17.17.02.mp4
Co-authored-by: Josh <[email protected]>
Co-authored-by: Josh <[email protected]>
Good catch @jjspace. This is because an existing issue in the camera is causing the camera height to be set to Thanks for your review @jjspace! @ptrgags Would you mind doing a final pass and merge if everything is good? |
@ggetz I'm trying out the Sandcastles first before I look at the code. I'm noticing a couple things in the Clamp Entities to Ground Sandcastle:
|
I also tried using Terrain Exaggeration (Sandcastle) It works, though the scene is very slow until everything loads. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggetz I had some minor comments and questions, but overall this is looking good
}); | ||
|
||
it("changing height reference works", function () { | ||
return loadAndZoomToModelAsync( | ||
it("changing height reference works", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I'm not able to reproduce this locally in the command line or in the browser.
Co-authored-by: Peter Gagliardi <[email protected]>
…hicsInc/cesium into 3d-tiles-height-reference
Thanks @ptrgags! Your comments should be addressed.
From what I can tell, this is an existing issue with clamping to terrain and would be outside of the scope of this PR |
@jjspace I believe all the feedback here has been addressed. OK to merge? |
@jjspace Bump? |
@ggetz It mostly looks good, I did spot a small issue in the sandcastles The Clamp Entities sandcastle isn't loading the google tiles correctly it seems. This then prevents switching between terrain and 3d tiles in the viewer. Actually it seems like something else weird is going on here and all sandcastles seem to be running twice every time...? note the double options I'm observing this on |
@jjspace In this example? |
@ggetz it seems like the double run might be a problem with my extensions because running in the chrome guest profile doesn't make it happen. I have no idea why any of them would cause that but I'll have to investigate later. interestingly it only happens locally and in that ci link, not the deployed version of sandcastle... I am seeing some test errors when running locally though. Not sure why CI didn't catch them. I confirmed I see the fog one in |
Thanks @jjspace, that should fix the failing spec. I'll make sure an issue is open for the others, but there's no need for those to hold up this PR. |
Confirmed that test no longer fails on my system, thanks |
To be merged after #11581
Fixes #7044
Fixes #9680
CC #11544
Building on this previous PR, this allows more user-friendly APIs for clamping to 3D Tiles as well as or instead of terrain by extending the
HeightReference
types:CLAMP_TO_GROUND
/RELATIVE_TO_GROUND
now clamps to or is relative to terrain or 3D Tiles, whichever is higherCLAMP_TO_TERRAIN
/RELATIVE_TO_TERRAIN
to clamp to or position relative to terrain onlyCLAMP_TO_3D_TILE
/RELATIVE_TO_3D_TILE
to clamp to or position relative to terrain onlyThis was to align to the possible
ClassificationType
values,TERRAIN
,CESIUM_3D_TILE
, orBOTH
.I've replaced the sandcastle for the (now outdated)
scene.clampToHeight
method of clamping, which is now Clamp Model to Ground. I've also extended this and the Clamp Entities to Ground sandcastle a bit to showcase available options.Testing Plan:
clampToGround
work on 3D TilesTODO: