-
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 Tileset getHeight
, and keeping camera above 3D Tiles
#11581
Conversation
Thanks for the pull request @ggetz!
Reviewers, don't forget to make sure that:
|
getHeight
, and keeping camera above 3D Tiles
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.
Hi @ggetz, I just have 2 preliminary comments for now--one minor, one about the API.
@jjhembd In the interest of moving things along, I've omitted incorporating 3D Tiles Exaggeration in this PR. Instead, you should ensure that the @jjspace Could you please take a look and review this PR? It's already been reviewed for the overall approach, but still needs a final pass on the code and on testing. |
@jjhembd I've added support for vertical exaggeration to this feature. Could you please re-review? |
Hi @jjhembd, just reminder to review. |
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.
Thanks @ggetz, I went through all the code and left a few minor notes.
I still need to run the tests locally and try out the Sandcastle.
packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
Outdated
Show resolved
Hide resolved
As a follow-up on the remaining items from my review:
I noticed one strange behavior when picking on the "Bentley BIM" model. Some parts of the tileset are picked by the After I move the camera slightly, both pick calls work well on the problematic feature. However, after moving the camera, some of the reported properties are missing--I no longer see the "assembly" and "category" properties in the pop-up. |
Interesting. I can reproduce at a very specific camera angle and zoom level (that can be difficult to replicate). From what I can tell, these are instanced parts of the model. However, the instanced node are quite similar to what is being tested in the instanced example. I also cannot find another tileset with similar issues. Finally, it is not returning an incorrect position, but rather
I don't think this is altered behavior in this PR. I can replicate in the last official release. I'm thinking this may be unique to the Bentley powerplant tileset. @jjhembd Let me know if you agree and if this is is a good place. |
Yes, I agree those minor quirks don't look like they are related to this PR. I wonder if there might be an existing issue in I have one question about a doc, and there are a couple failing specs. But other than that, this should be ready to go! |
Thanks @jjhembd! This should be ready. |
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.
Looks good, thanks @ggetz !
Fixes #11288, and sets the groundwork for #7044.
This PR includes 3D Tiles in camera "collision", which previously applied only to terrain, to 3D Tiles as well. It does not seek to refine or significantly alter how the camera collision itself works. Rather, this extends what is already in place for terrain to work with 3D Tiles.
It implements a
getHeight
function for 3D tilesets which copies tile data to the CPU for testing intersections, similar to the approach we take for terrain, intended for internal use such as the camera collision, and in a follow up PR clamping to 3D Tiles.I also exposed a private
pick
function on 3D tilesets and on model primitives. This is an implementation detail ofgetHeight
, but is useful for testing and internal development purposes. An example of how it works for tilesets is available in the development 3D Tiles Picking sandcastle example.By default, since viewers default to using WebGL 2, the picking implementation will require WebGL 2 to copy buffer data at runtime. To be compatible with WebGL 1, we take an approach similar to what we do for 2D projections of models and 3D Tiles where we allow a tileset option,
enablePick
, that keeps a copy of the loaded data on the CPU in a typed array. This is not enabled by default because it's an additional additional memory overhead.The behavior is enabled by default for all tilesets, but the
disableCameraCollision
options for a tileset can be used to turn it off. The biggest reason for this would be a case where the user is navigating inside of a 3D tileset, as illustrated in the "3D Tiles Interior" sandcastle example.Testing Plan
TODO: