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

SceneViewer gets Rotation of some GLB Files wrong compared to Khronos glTF Sample Viewer #1067

Closed
4 of 11 tasks
cnsboth opened this issue Mar 2, 2020 · 2 comments
Closed
4 of 11 tasks
Labels
flag: not model-viewer Problems that are related to our project but are ultimately some other project's issue type: bug Something isn't working

Comments

@cnsboth
Copy link

cnsboth commented Mar 2, 2020

Description

In our company we are using Scene Viewer to enable AR for our 3D web viewer.
We noticed that some models have the wrong orientation in AR as well as in the Scene Viewer Preview but not in other gltf viewers like https://github.khronos.org/glTF-Sample-Viewer/

I analyzed the gltf-Files to see if I notice any difference that causes the issue but I couldn't find any.
It only happens to some of our generated gltfs and I have no idea why.
I think it has something to do with the transformation matrices in the gltfs. They are the same (rotation-wise) in the two examples I provide below but lead to different results somehow.

Here is how one example is oriented in SceneViewer in Front View:
pipe-scene-viewer-preview

Here is the same glb in Khronos gltf Sample Viewer in Front View:
pipe-gltf-sample-viewer

Here are two example .glb files. In pipe-valve.glb the issue occurs and in chair.glb the issue does not occur:
example-glbs.zip

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • Helios
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows
@cdata
Copy link
Contributor

cdata commented Mar 2, 2020

@Boris-Vincent thanks for the report!

cc @tpsiaki who may be able to comment on behalf of Scene Viewer

@cdata cdata added flag: not model-viewer Problems that are related to our project but are ultimately some other project's issue type: bug Something isn't working labels Mar 2, 2020
@cnsboth
Copy link
Author

cnsboth commented Apr 17, 2020

@cdata i've investigated the issue further and now I know where the problem lies.
SceneViewer throws away rotation information from a matrix if the scale factor is very small.

google-ar/sceneform-android-sdk#1058
I've recreated the issue on the sceneform github, so it can be closed here.
Thanks

@elalish elalish closed this as completed Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: not model-viewer Problems that are related to our project but are ultimately some other project's issue type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants