You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the Google Filament library to render 3D models in our Flutter app. By default, the library supports turntable movement for interacting with the model, but we require trackball movement for more flexible interactions.
To achieve this, we implemented custom user interaction logic for rotation and zooming. While this works well for most use cases, we are encountering an issue with the transformToUnitCube() function when using our custom interaction method:
When the model is initially rendered, it fits perfectly into the unit cube as expected.
However, as soon as we interact with the model for the first time, it zooms out significantly.
After this initial zoom-out, subsequent interactions work fine, and the model maintains its position and scale.
Our current approach involves applying transformations (rotation and scaling) manually using a custom method. However, the problem seems to arise from a misalignment between our custom transformation logic and the transformToUnitCube() function.
Here’s a summary of our setup:
Custom interaction logic: Handles gestures for rotation (trackball movement) and zooming (pinch-to-zoom).
Model transformation: Combines scaling and rotation into a transformation matrix applied to the model.
Issue: The first interaction causes the model to lose the scaling from transformToUnitCube, but subsequent interactions work as expected.
We would appreciate guidance on the following:
How can we ensure that the model consistently retains the transformation applied by transformToUnitCube even with custom user interactions?
Are there best practices for implementing trackball-like movement in the Google Filament library?
The text was updated successfully, but these errors were encountered:
We are using the Google Filament library to render 3D models in our Flutter app. By default, the library supports turntable movement for interacting with the model, but we require trackball movement for more flexible interactions.
To achieve this, we implemented custom user interaction logic for rotation and zooming. While this works well for most use cases, we are encountering an issue with the transformToUnitCube() function when using our custom interaction method:
When the model is initially rendered, it fits perfectly into the unit cube as expected.
However, as soon as we interact with the model for the first time, it zooms out significantly.
After this initial zoom-out, subsequent interactions work fine, and the model maintains its position and scale.
Our current approach involves applying transformations (rotation and scaling) manually using a custom method. However, the problem seems to arise from a misalignment between our custom transformation logic and the transformToUnitCube() function.
Here’s a summary of our setup:
Custom interaction logic: Handles gestures for rotation (trackball movement) and zooming (pinch-to-zoom).
Model transformation: Combines scaling and rotation into a transformation matrix applied to the model.
Issue: The first interaction causes the model to lose the scaling from transformToUnitCube, but subsequent interactions work as expected.
We would appreciate guidance on the following:
How can we ensure that the model consistently retains the transformation applied by transformToUnitCube even with custom user interactions?
Are there best practices for implementing trackball-like movement in the Google Filament library?
The text was updated successfully, but these errors were encountered: