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

Cannot seem to keep aspect ratio when zooming in or changing to fullscreen #1159

Open
Macfelon opened this issue Apr 27, 2023 · 5 comments
Open
Labels

Comments

@Macfelon
Copy link

Hi, I was able to setup my view to have the correct aspect ratio on a large pano style image, and if I don't touch it, it looks fine, but if I go to Fullscreen or scroll out, it crushes the horizontal width and I have looked at many options on the project, but I don't see one that keeps it in step with the original sizing.

@mpetroff
Copy link
Owner

To isolate whether or not the issue is with your configuration, do you see similar issues with the pannellum.org examples?

If you don't see issues with the examples, do you have an example you can link to that shows this behavior, or at least screen shots?

@Macfelon
Copy link
Author

Macfelon commented May 12, 2023 via email

@mpetroff
Copy link
Owner

Okay, the problem is due to the aspect ratio of your image and has nothing to do with zoom or fullscreen. For some reason, your image doesn't contain Photo Sphere XMP data, despite PTGui including it by default for equirectangular panoramas since v9.1.9, released almost a decade ago. For images that aren't full 360 x 180 deg panoramas that do not include Photo Sphere XMP data, the haov, vaov, and vOffset parameters need to be manually specified when they differ.

In the case of your DSC05589Panorama.jpg image, it's a full 360 deg and seems to be approximately centered vertically, so you would just need to specify the vaov (vertical angle of view) parameter. Based on the image aspect ratio, it should be 65.3 deg.

I would also strongly advise against using images that big without using Pannellum's multiresolution format. Due to the image dimensions, I couldn't open it on a relatively new laptop and could only open it on my desktop machine, which has discrete graphics. To maintain compatibility across the widest range of devices, equirectangular images should not be used directly when more than 8192px wide.

@Macfelon
Copy link
Author

Macfelon commented May 14, 2023 via email

@Macfelon
Copy link
Author

My goodness the speed improvement on multires is mindblowing! This is intensely well written.

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

No branches or pull requests

2 participants