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

glTF Viewer Shows Different Size Than In Editor #133

Open
rpaladin opened this issue Nov 10, 2021 · 5 comments
Open

glTF Viewer Shows Different Size Than In Editor #133

rpaladin opened this issue Nov 10, 2021 · 5 comments
Assignees

Comments

@rpaladin
Copy link

Original Post
https://forum.playcanvas.com/t/solved-imported-glb-keeps-disappearing/22796/1

Imported binary GLB with morph targets (and embedded textures) displays different sizes in the PlayCanvas glTF 2.0 Viewer than in the PlayCanvas Web Editor.

Model Source:

https://github.com/RandomPandaStudios/hosting/blob/main/AC_PlayerModel_Red.glb

glTF Model Preview:

https://playcanvas.com/viewer/?load=https://raw.githubusercontent.com/RandomPandaStudios/hosting/main/AC_PlayerModel_Red.glb

@willeastcott
Copy link
Contributor

@rpaladin I was just reviewing this old issue. The model viewer has gone through many updates since this was logged. The GLB looks like it's correctly rendered in the viewer now. Can you confirm? If all is well, we can close the issue.

@rpaladin
Copy link
Author

rpaladin commented Sep 26, 2023

Hi @willeastcott. I just checked. I'm not sure if the PlayCanvas Viewer issue still exists.. It appears that if the window is resized + maximized on start (instead of starting in maximized window mode initially), the window aspect ratio / resolution isn't updated to reflect the new window mode + size. I'm not sure if this was perhaps what I was experiencing originally.

Chrome

Start Window Maximized:

image

Start Window Un-maximized + small size: -> Set maximized

image

Edge

Start Window Maximized:

image

Start Window Un-maximized + small size: -> Set maximized

image

Firefox

Start Window Maximized:

image

Start Window Un-maximized + small size: -> Set maximized

image

@willeastcott
Copy link
Contributor

I don't seem to be able to reproduce this. I just tried in Chrome and Edge. Here's what I saw in Edge, for example:

viewerresize.mp4

@rpaladin
Copy link
Author

rpaladin commented Sep 27, 2023

I think you're not able to reproduce it because your browser window is already in maximized mode. I can consistently reproduce the issue when I:

  1. Start the window unmaximized.
  2. On (or after) viewer load, maximize the window.
  3. The ratio/size of the window should not update for the newly maximized window.

@marklundin
Copy link
Member

Ok I can kind of replicate this. If you start with a small window with narrow/tall aspect ratio then maximise to a wide aspect ratio, the content zooms out. I think this is because the FOV adapts or does not change correctly with the window size

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

No branches or pull requests

5 participants