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

Stretch-and-squash implicit XZ scale changes not visible in Unity (but fine in MSFT 3D Builder) #690

Open
Arakade opened this issue Apr 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Arakade
Copy link

Arakade commented Apr 23, 2024

Describe the bug
Stretch and squash animation not imported as expected.
Expected:

  • to see horizontal axes (Unity's XZ) to scale out as the vertical (Unity Y) scale is reduced by the animation.
    Actual:
  • no change to the horizontal seen as vertical scales.
    Validation of expectation:
  • Microsoft 3D Builder importing the same file shows the horizontal scale.

Zip file includes video demonstrating difference, GLB file and blender source (can provide export settings used if needed).
This has an Action animation called "Hop" that scales the blender Z axis. It also has a "Maintain Volume" constraint which causes Blender's XY scale to change inversely proportionally to the Blender Z scale changes.
The fact that the MSFT tool sees presents the horizontal scale changes implies it's in the GLB. However Unity's does nothing with this..

Ran the file through the glTF Validator as instructed. No errors.

Files

For-bug-report.zip

To Reproduce
Steps to reproduce the behavior:

  1. Load the GLB file in an empty Unity project.
  2. In the "Project" tab, select the imported file
  3. Switch the "Animation" type to "Legacy".
  4. Press "Apply"
  5. Open Window | Animation | Animation
  6. Ensure the little target icon below the frame number "Filter by selection" is not selected (so you can see all timelines in the animation).
  7. Add prefab to an empty scene.
  8. Select the in-scene instance
  9. The animation should appear in the "Animation" window.
  10. Ensure "Preview" is selected in the "Animation" window.
  11. Move the time cursor to frame 2 (point of lowest Y scale where the XZ scale should be greatest).
  12. Observe lack of XZ scale change
  13. This correlates with lack of change if you switch the "Animation" window's to showing the the "Curves" (near bottom).

Expected behavior
Expect to see the XZ scale of the capsule mesh change.
This is seen in Blender (due to the "Maintain Volume" constraint).
This is seen in MSFT "3D Builder" GLB viewer (implying info is in the GLB).
It is not see in runtime nor Editor-time import.

Screenshots

20240423-gltfast-lacks-scale-xz.mp4

Desktop:

  • glTFast version:
    • Unity 2020.3.48 with glTFast 4.8.3 -- used in actual project.
    • Unity 2022.3.7 with Unity glTFast 6.3.0 -- reproduction with latest glTFast.
  • Unity Editor version 2022.3.7f1
  • Render Pipeline and version:
    • Unity 2020.3.48 with URP 10.10.1
    • Unity 2022.3.7 with built-in (and presumably URP)
  • Platform: Windows Editor

Additional context

@Arakade Arakade added the bug Something isn't working label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant