Skip to content

GLTF animated meshes produce a non-representative AABB #18921

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

Closed
Threadzless opened this issue Apr 24, 2025 · 1 comment
Closed

GLTF animated meshes produce a non-representative AABB #18921

Threadzless opened this issue Apr 24, 2025 · 1 comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled

Comments

@Threadzless
Copy link
Contributor

Bevy version

v 0.15.3

What you did

Loaded a scene from a *.gltf file which contains a mesh with skin animation

What went wrong

Bevy loads, renders, and plays animations as expected, but the mesh sometimes gets culled while still in the camera's view.

By drawing the Aabb component with gizmos, I found that the generated bounding box for the mesh doesn't
accurately represent the mesh.

Additional information

The gltf model was created in blender. There is a single scene with two nodes:

  • An Armature, as the parent in the scene
  • A mesh node, as the armature's child

I was able to correct the aabb misalignment by changing the model in blender. I adjusted the mesh so that both nodes had an identity transformation.

The same problem happens when only the armature node has a non-identity transformation.

This suggests that bevy's SceneSpawner is not properly accounting for transforms between parent and child elements when calculating the bounding boxes for mesh nodes.

@Threadzless Threadzless added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 24, 2025
@mockersf
Copy link
Member

duplicate of #4971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

2 participants