-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Difference in sphere projection #1406
Comments
I don't know what I can do. The angles are applied to the mesh here https://github.com/mistic100/Photo-Sphere-Viewer/blob/main/packages/core/src/services/Renderer.ts#L269-L275 I tried every permutation of the last parameter and only |
I have no clue how all of this works, could it be related to sphere shape simplification ? Its position in 3D space or its scale ? |
I don't think so, the sphere and the camera are both positionned at 0,0,0 so only the rotations should matter. |
Try this instead, I get the same result as pannelum (excluding the heading, which pannelum seems to ignore ?) mesh.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, 'YXZ'); it seems my mistake was to try to apply the inverse transformation before: mesh.rotation.set(-cleanCorrection.tilt, -cleanCorrection.pan, -cleanCorrection.roll, 'ZXY'); |
Tried it locally and this is far better 😁 This may also apply to |
I don't think changing If |
I understand the need for retro-compatibility. I was asking this for |
It should not matter isn't it ? If your configuration page is made for the current angles order used in sphereCorrection, every correction is still possible, this is independant of panoramaPose. |
This would mean those corrected angles only work with PSV, not other third-party software that rely on XMP correction angles. The straightforward solution would be to put XMP angles in-file directly, but we don't do it to avoid too much disk RW operations and lose performance. That's why we'd like to stick with a kinda-like If that's not possible, that's okay, I already have some patches on our side over PSV, and as you find out the correct code to overcome this projection issue, I can easily patch |
I don't understand how this is a problem as sphereCorrection is specific to PSV, and as you said you don't put the data back in the file itself. But of course I don't know all your integration details. If your use case is "embedded XMP" or manual settings, you can set |
We don't integrate back in file yet, but could be something we do on-demand later. That will be handy when we will actually have a web UI for editing those angles. Are you talking about |
They are, for the base image only. I removed it from the doc because there was a big misunderstanding between that and sphereCorrection. |
Having two differents behaviour is bad though, so let's go for an option to switch between old and new. But I have no idea how to handle the migration. Obviously most people won't read the deprecation warning in the release note and it will break at once. |
If you keep old fashion as default, this will not cause migration issues. And a good bit of docs will help make it clear that you may actually want to switch to new fashion 😁 |
That means I will never be able to remove the old behaviour, and I don't want that. |
So a minor release + warning in console if function is used ? I mean that's why semantic versioning exist, if users update without testing before release, that's a shame but not your fault 😅 |
Migration plan, inspired by ThreeJS :
|
This feature/bug fix has been released in version 5.10.0. |
Describe the bug
Hello,
I'm working with some images with strong XMP correction, it seems that the way they are projected on PSV sphere doesn't fully compensate shifts (comparison with Pannellum, same image) :
This happens with either XMP metadata read from image, as well as setting manually
sphereCorrection
values.Online demo URL
https://files.pavie.info/clients/panoramax/psv_xmp/
Photo Sphere Viewer version
5.9.0
Plugins loaded
None
OS & browser
Linux, latest Firefox & Chromium
Additional context
Started working on this topic due to an issue started here : https://gitlab.com/panoramax/clients/web-viewer/-/issues/148
Part of it is my fault (inverted
sphereCorrection
values), but even with this fix, I wasn't able to have something satisfying. As suggested by the person who reported the issue, I tried with Pannellum and was surprised by the rendering difference.If that's of any help, examples images I used.
The text was updated successfully, but these errors were encountered: