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

Fix validation errors in Fox.glb #17801

Merged
merged 3 commits into from
Feb 11, 2025
Merged

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Feb 11, 2025

Objective

Fix gltf validation errors in Fox.glb.

Inspired by #8099, but that issue doesn't appear to describe a real bug to fix, as far as I can tell.

Solution

Use the latest version of the Fox from glTF-Sample-Assets.

Testing

Dropped both versions in https://github.khronos.org/glTF-Validator/

cargo run --example animated_mesh seems to still look fine.

Before:

The asset contains errors.
"numErrors": 126,
"numWarnings": 4184,

After:

The asset is valid.
"numErrors": 0,
"numWarnings": 0,

Discussion

The 3d testbed was panicking with

thread 'main' panicked at examples/testbed/3d.rs:288:60:
called `Result::unwrap()` on an `Err` value: QueryDoesNotMatch(35v1 with components Transform, GlobalTransform, Visibility, InheritedVisibility, ViewVisibility, ChildOf, Children, Name)

Which is bizarre. I think this might be related to #17720, or maybe the structure of the gltf changed.

I fixed it by using updating the testbed to use a more robust method of finding the correct entity as is done in animated_mesh.

@rparrett rparrett changed the title Fix validation errors in Fox.glb Fix validation errors in Fox.glb Feb 11, 2025
@Vrixyz
Copy link
Member

Vrixyz commented Feb 11, 2025

Cool!
nitpick: maybe refer to https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/Fox/glTF-Binary/Fox.glb (in the future?) ; I think it's the same model but I was surprised to see "latest model" linking to an archived repo.

@rparrett
Copy link
Contributor Author

Oops, updated link and confirmed that it's the same.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 11, 2025
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples A-glTF Related to the glTF 3D scene/model format S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Feb 11, 2025
Merged via the queue into bevyengine:main with commit 0cb3eae Feb 11, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-glTF Related to the glTF 3D scene/model format C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants