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

Add gltf sample viewer #1962

Merged
merged 15 commits into from
Feb 16, 2021
Merged

Add gltf sample viewer #1962

merged 15 commits into from
Feb 16, 2021

Conversation

UX3D-haertl
Copy link
Contributor

This PR integrates the current alpha version (published to npm) of the gltf-sample-viewer from Khronos into the render fidelity tools.

I did not include the golden screenshots, since on my machine the scrollbar is visible on the right side. This also happens for me with the babylon and filament renderers. There is already an issue for filament: #720

Furthermore, I suppressed a typescript error during importing the npm package (error TS7016: Could not find a declaration file), which seems to appear if someone wants to import js into ts. I did not see how this was solved with the other renderers.

@google-cla
Copy link

google-cla bot commented Jan 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Jan 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@elalish
Copy link
Collaborator

elalish commented Jan 25, 2021

Thanks, glad to see this! It looks like you may need to run npm run update:package-lock from the root of the repo, and then commit all the files that changes. Also, can you sign the CLA? I can't take your code until you do.

@UX3D-haertl
Copy link
Contributor Author

@googlebot I signed it!

@google-cla
Copy link

google-cla bot commented Jan 26, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@UX3D-haertl
Copy link
Contributor Author

@googlebot I signed it!

@UX3D-haertl
Copy link
Contributor Author

npm run update:package-lock didn't work for me, since npm i --only=production deletes the content of node_modules/.bin.
If I run it without the production flag the following error occurs:
'@google/model-viewer-shared-assets@^0.0.1' is not in the npm registry.

@elalish
Copy link
Collaborator

elalish commented Jan 26, 2021

I'm guessing you just did something in the wrong order. You have an updated package-lock file, but it's at the root where you didn't change the package.json. Go ahead and revert that file. Since you've made a change to package.json in the fidelity package, that's the package-lock file that should change when you run npm run update:package-lock. You'll need to commit it.

@elalish
Copy link
Collaborator

elalish commented Jan 26, 2021

After you've made these changes, test it by running npm run bootstrap at the root, and then npm run build and npm test.

@UX3D-haertl
Copy link
Contributor Author

I reverted all my package.lock.json files but the error ('@google/model-viewer-shared-assets@^0.0.1' is not in the npm registry.) still appears. I tried deleting all node_modules and executing npm run update:package-lock in root and in packages/render-fidelity-tools. In both cases the error appears. '@google/model-viewer-shared-assets@^0.0.1' seems to be a private package. I found this closed issue #1021 but npm run bootstrap runs fine for me. Is it possible that one can only run npm run update:package-lock if one has access to the private npm package?

@elalish
Copy link
Collaborator

elalish commented Jan 28, 2021

shared-assets is just another sub-package of our repo, so you've already got it. Can you be very specific about what commands you're running in which directories? It sounds like you might be down in a package when you should be at the repo root.

…ampleViewer

# Conflicts:
#	packages/render-fidelity-tools/package-lock.json
#	packages/render-fidelity-tools/package.json
@UX3D-haertl
Copy link
Contributor Author

I created all goldens yesterday and run the test, and now it seems to work. I'm not exactly sure what changed.
The test here fails since I didn't upload the goldens yet. But as I mentioned above, on my machine a scrollbar appears on the right side of the screenshot (this happens for me with babylon, filament and gltf-sample-viewer). Do you know how I can resolve this?

@elalish
Copy link
Collaborator

elalish commented Jan 29, 2021

Great, thanks! Now that the unit tests are passing, I'll update the screenshots and push them for you.

@elalish elalish mentioned this pull request Jan 29, 2021
@elalish
Copy link
Collaborator

elalish commented Jan 29, 2021

I don't have access to your fork, so I pushed my own version with the updated goldens: #1990, so you can look there. Did you actually look at the renders you were producing and compare them to the others? Things that need work:

  • Camera config
  • It's not rendering with a transparent background
  • Your renders are dark; possibly needs the same tone mapping adjustment we added for Babylon
  • DirectionalLightTest hangs, possibly due to not handling both types of HDR files.

@UX3D-haertl
Copy link
Contributor Author

Thanks. Yes the npm package is still in development and should be finished in the next two weeks. I already resolved most of the issues locally, but I have to wait until we update the package. I will comment again when this is finalized. Should I work on your PR or on this one? I can also give you access to our fork

@elalish
Copy link
Collaborator

elalish commented Feb 1, 2021

No problem. Might be easiest to work on this branch and give me access to your fork.

@UX3D-haertl
Copy link
Contributor Author

I sadly cannot give you access to our fork, since we would need to pay for this. So it would be good if you create a new PR with the goldens when all is updated.
Do you know how to resolve the current CLA message? (CLAs are signed, but unable to verify author consent)

@elalish
Copy link
Collaborator

elalish commented Feb 8, 2021

Okay, to make this simple how about you go ahead and upload your own goldens when they're ready (even if they have the scrollbars). That will allow us to do the visual inspections. I'll do a separate PR after that's merged to update them and get rid of the scrollbars. Are you familiar with using our results viewer to see the side-by-sides in your local commit?

As for the CLA, the issue is almost always with email address, as that's how the googlebot tracks a given user. Check that all of your commits were authored with the same Git email that you used to sign the CLA. If you don't set user.email then it won't work.

@UX3D-haertl
Copy link
Contributor Author

Yes I'm familiar with the tests/html page. I will upload the goldens tomorrow or on Friday.

For the CLA, I checked all commits so the user.email should not be a problem. Maybe there is a conflict, because we first tried to sign the employer CLA, but that didn't seem to work. Therefore, I also signed the personal one. Can I somehow get a more useful error message? Maybe with the google-cla bot? unable to verify author consent sounds like I need to approve something, but I'm not sure how to do it.

@elalish
Copy link
Collaborator

elalish commented Feb 11, 2021

@googlebot I signed it!

@elalish
Copy link
Collaborator

elalish commented Feb 11, 2021

Looks like the CLA is happy now; must have just not refreshed.

@UX3D-haertl
Copy link
Contributor Author

I uploaded the goldens, but there is currently an issue with blending which will be resolved on Monday.
When this issue is resolved, we can merge this PR or is there anything else to do?

elalish
elalish previously approved these changes Feb 12, 2021
Copy link
Collaborator

@elalish elalish left a comment

Choose a reason for hiding this comment

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

This looks great, thanks!

@UX3D-haertl
Copy link
Contributor Author

I have updated the gltf sample viewer version. I did not upload the new goldens since they need to be redone anyways.

@elalish elalish merged commit cee02f7 into google:master Feb 16, 2021
@elalish
Copy link
Collaborator

elalish commented Feb 16, 2021

@UX3D-haertl Thanks, see the comments on #2018; I need these issues addressed so that our comparisons can be useful. Thanks!

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.

2 participants