Nothing Special   »   [go: up one dir, main page]

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

Update Model3DTileContent specs to have parity with 3D Tiles 1.0 formats #10633

Merged
merged 11 commits into from
Aug 4, 2022

Conversation

ptrgags
Copy link
Contributor
@ptrgags ptrgags commented Aug 3, 2022

This PR adds specs from Batched3DModel3DTileContent, Instanced3DModel3DTileContent and PointCloud3DTileContent to Model3DTileContent (and sometimes other places like the loaders)

Some notes:

  • I discovered that Model3DTileContent.getFeature() wasn't throwing exceptions like the interface expects, so I updated the code there
  • The point cloud back face normals is a little more involved than I first thought so I xit()-ed the test and opened Support point cloud back face culling in ModelExperimental #10632 so we don't have to hold up the staging branch.

@j9liu could you review?

@ptrgags ptrgags requested a review from j9liu August 3, 2022 19:55
@cesium-concierge
Copy link

Thanks for the pull request @ptrgags!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.

Copy link
Contributor
@j9liu j9liu left a comment

Choose a reason for hiding this comment

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

@ptrgags left some comments, let me know if you have any questions

Source/Scene/ModelExperimental/Model3DTileContent.js Outdated Show resolved Hide resolved
Specs/Scene/ModelExperimental/I3dmLoaderSpec.js Outdated Show resolved Hide resolved
@@ -13,6 +14,7 @@ import {
VertexAttributeSemantic,
} from "../../../Source/Cesium.js";
import createScene from "../../createScene.js";
import pollToPromise from "../../pollToPromise.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing the "renders point cloud with tile transform" test from PointCloud3DTileContentSpec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a reason why this comment is in PntsLoaderSpec?

for the tile transform tests, we only wanted to have one set of them since it works the same for each content type. For this one I kept the b3dm ones since I was having difficulty getting the camera setup right for the glTF ones.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why this comment is in PntsLoaderSpec?

Because most of the tilesets tested in Point3DTileContentSpec were copied over to PntsLoaderSpec, except for the one with the tile transform. So if we don't duplicate it, the tileset associated with it will never get tested

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I understand now. I added a test in PntsLoaderSpec, though it seems of limited use, since the transform is applied in the tileset.json, not the .pnts file itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ptrgags ah I see... let's just leave it there for now so we don't hold up the PR, we can move things around later.

Specs/Scene/ModelExperimental/Model3DTileContentSpec.js Outdated Show resolved Hide resolved
Specs/Scene/ModelExperimental/Model3DTileContentSpec.js Outdated Show resolved Hide resolved
Specs/Scene/ModelExperimental/Model3DTileContentSpec.js Outdated Show resolved Hide resolved
Comment on lines 1369 to 1370
// only have one destroy test (this one)
it("destroys glTF content", function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI there's a "destroy pnts content" test, so either this comment or that test should be removed to be consistent

Copy link
Contributor

Choose a reason for hiding this comment

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

And if we're keeping this comment, maybe reword this more formally...

Suggested change
// only have one destroy test (this one)
it("destroys glTF content", function () {
// Since all content types are loaded as a Model3DTileContent, only one destroy test is necessary
it("destroys", function () {

... and move the test outside the glTF suite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah I forgot to put TODO in the comment so I missed a spot.

This comment was saying keep the glTF destroy test, but remove the pnts/b3dm/i3dm equivalents. I updated these.

Source/Scene/ModelExperimental/Model3DTileContent.js Outdated Show resolved Hide resolved
@ptrgags
Copy link
Contributor Author
ptrgags commented Aug 3, 2022

@j9liu updated everything except for a couple questions I left in the comment threads

@ptrgags
Copy link
Contributor Author
ptrgags commented Aug 4, 2022

@j9liu thanks for answering my questions, I updated the PR!

@j9liu
Copy link
Contributor
j9liu commented Aug 4, 2022

@ptrgags looks good, merging now!

@j9liu j9liu merged commit fcd4f7d into replace-model Aug 4, 2022
@j9liu j9liu deleted the content-spec-parity branch August 4, 2022 13:44
@ptrgags ptrgags mentioned this pull request Aug 5, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants