-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
animations: convert skinning weights from unorm8x4 to float32x4 #9338
animations: convert skinning weights from unorm8x4 to float32x4 #9338
Conversation
77203b0
to
2686bdf
Compare
This doesn't fix it in the case of my modified It's 24MB here (sorry Microsoft for eating your storage space 🙏): There is a lot of mess in the file, but yeah bevy still shouldn't panic with a cryptic error message. |
As the error obviously says for your model, it has too many joints (1484, Bevy supports up to 256 joints)
So... obvious. If I raise the bevy/crates/bevy_pbr/src/render/mesh.rs Line 54 in 4209819
I get something that doesn't crash, but still not what you expect... ![]() So this PR doesn't fix your issue, but it still need to be done to follow the GLTF spec |
I can confirm that this solved an issue importing a .gltf generated from Unreal Engine for me! Looks great! |
merging as trivial as this PR follows glTF spec without introducing new concept to do so |
…engine#9338) # Objective - Fixes part of bevyengine#9021 ## Solution - Joint mesh are in format `Unorm8x4` in some gltf file, but Bevy expects a `Float32x4`. Converts them. Also converts `Unorm16x4` - According to gltf spec: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#skinned-mesh-attributes > WEIGHTS_n: float, or normalized unsigned byte, or normalized unsigned short
…engine#9338) # Objective - Fixes part of bevyengine#9021 ## Solution - Joint mesh are in format `Unorm8x4` in some gltf file, but Bevy expects a `Float32x4`. Converts them. Also converts `Unorm16x4` - According to gltf spec: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#skinned-mesh-attributes > WEIGHTS_n: float, or normalized unsigned byte, or normalized unsigned short (cherry picked from commit 3aad5c6)
Objective
Solution
Unorm8x4
in some gltf file, but Bevy expects aFloat32x4
. Converts them. Also convertsUnorm16x4