Auto Framing problem misalignment with poster image? #4376
Replies: 3 comments 3 replies
-
Hi @lordcraymen, I think I can help with this. |
Beta Was this translation helpful? Give feedback.
-
@diegoteran thanks for your support. I created a fiddle https://jsfiddle.net/lordcraymen/k6o3jv8a/42/ You can see that for "normal" camera positions the poster matches the model position perfectly. But if you zoom in quite a bit (and for me showing details of a model initially is a use case) the model is always slightly zoomed out a bit, and the viewpoint seems also to be a little bit higher than the one captured from the original camera. I suspect some auto framing behaviour that I don't understand. |
Beta Was this translation helpful? Give feedback.
-
@diegoteran After further investigation and experimenting with setting/reading the values and logging them to the console, I've made some observations: https://jsfiddle.net/lordcraymen/k6o3jv8a/53/ The getFieldOfView.toString() method behaves inconsistently compared to other cameraProperty.toString() methods. It returns a float value without a unit, whereas in reality, it represents degrees ("deg"). To ensure consistency, I found that adding "deg" before applying the value gives a more accurate representation. However, there seems to be an issue with this approach. I discovered that it's possible to zoom out beyond the bounds of the max field of view. I experienced this behavior on a MacBook with a Magic Mouse. When I zoomed in quite close (around 12 degrees) and then zoomed out rapidly, I could reach above 30.00 degrees. In such cases, the value returned by getFieldOfView incorrectly shows 30.00 degrees. This issue seems to occur sporadically after loading, especially when the initial field of view is not the default (12.00 degrees). Considering these observations, it appears that there might be a bug affecting the behavior of getFieldOfView. It's possible that others have encountered similar issues. If anyone can confirm or provide more information about this behavior, it would be greatly appreciated. Thank you for your assistance and support. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created a script that lets me save screenshots and camera target / orbit / fov values of a model in a database. I use the first screenshot as the poster for initial loading.
I noticed that if i leave the camera at the default values, the poster and model (both my model-viewer and poster images are always exactly square) match exactly, but the more I rotate the camera or move the camera target, the initial model view and poster are misaligned. I set the exact camera-orbit ,camera-target and fov ( I guess it is "deg" as getFieldOfView returns a value without unit? ) for the initial view that were used.
what could be the reason? is this a bug, or am I doing something wrong? Thanks for your support!
Beta Was this translation helpful? Give feedback.
All reactions