Skip to content
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

iTwin Reality Data integration #12334

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

iTwin Reality Data integration #12334

wants to merge 10 commits into from

Conversation

jjspace
Copy link
Contributor

@jjspace jjspace commented Nov 25, 2024

Description

This PR is building off of #12289 to add an easy function to load Reality Data meshes. Currently we are only supporting 3D Tiles meshes and pointcloud types of Reality Data to keep the initial integration simple. More can be added in the future but they will require different datasources and constructors in CesiumJS and will require a little more thought on how to design the API.

Issue number and link

No issue

Testing plan

  • Running the test sandcastle
    • Load the new sandcastle and make sure it loads.
    • Check that the reality mesh in that iTwin loads and shows in the surrounding area.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @jjspace!

✅ We can confirm we have a CLA on file for you.

@jjspace
Copy link
Contributor Author

jjspace commented Nov 25, 2024

@ggetz I know we discussed it this morning but can you do a quick pass on the API here just to confirm it looks good? then I'll start adding tests.

Base automatically changed from itwin-integration to main November 25, 2024 18:31
Copy link
Contributor

@ggetz ggetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall API looks good @jjspace! Just a few comments.

packages/engine/Source/Core/ITwinPlatform.js Outdated Show resolved Hide resolved
Other: "Other",
});

ITwinPlatform.SupportedRealityDataTypes = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this and ITwinPlatform.RealityDataType be marked private for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shifted this supported list into the only function that uses it. RealityDataType cannot be made private if I want to set it as the type of the param in createTilesetForRealityDataId because of the way types get generated and skipped for private

packages/engine/Source/Scene/ITwinData.js Outdated Show resolved Hide resolved
packages/engine/Source/Scene/ITwinData.js Outdated Show resolved Hide resolved
packages/engine/Source/Scene/ITwinData.js Show resolved Hide resolved
@jjspace
Copy link
Contributor Author

jjspace commented Nov 25, 2024

@ggetz I've added tests now and I think addressed all your comments above. Should be ready for another look and I think it's close to done if not already there

Copy link
Contributor

@ggetz ggetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good @jjspace!

I noticed that the reality mesh looks a bit blurry at the default settings. I was getting a comparable visual to other photogrammetry tilesets after setting the max SSE to 4

realityMesh.maximumScreenSpaceError = 4;

I'm guessing this may be because the geometric error of the tileset is balanced against the iTwin viewer, what may have different tile selection metrics. Have you seen the same for other Reality Data meshes?

What do you think of passing a default of 4 for all with the type of RealityMesh3DTiles?

*
* If the <code>type</code> or <code>rootDocument</code> are not provided this function
* will first request the full metadata for the specified reality data to fill these values.
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with createTilesetFromIModelId.

Suggested change
*
*
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants