Closed AllenDang closed 1 year ago
@alice-i-cecile I know the core dev of bevy may not have time to fix it now, I'm wondering if you or anyone could give me a hint about where should I start to look at, I could start fixing this and contribute a PR.
This looks like a gltf file with multiple sub-scenes. Have you tried changing or removing #scene0
?
@alice-i-cecile Removing #scene0 still the same.
And changing it to e.g. #scene1? Does that change what's displayed? Are there multiple scenes withing the gltf file?
@alice-i-cecile I'm loading it directly with file path and omit #scene section like server.load(path)
. I think all meshes are loaded, because I can read all kind of information like face count, vertex and AABB from them, just cannot see them.
@mockersf you've looked into 3D much more than I have; any ideas on where to look?
after opening the glb file in blender and re-exporting it, I get something similar to the online gltf viewer:
and when moving the camera inside the cube
Do you know how the original gltf file was produced? Would it be possible to create a smaller file showing the same kind of issue?
@mockersf It is created by Blender. Here is the blender file. lowpoly_final.blend.zip
@AllenDang there are two scenes in your blender file (and your glb too I guess)
If in blender you delete the "Library" scene, or if you try to display the second scene in Bevy, you will get what you expect.
@mockersf I think we should iterate and display all models from all scenes if no scene is specified.
Bevy version
0.9.0
[Optional] Relevant system information
If you cannot get Bevy to build or run on your machine, please include:
cargo --version
)What you did
Load a gltf scene from file.
What went wrong
Additional information
Here is a minimal code to reproduce. Make sure to enable "jpeg" feature for bevy in
Cargo.toml
.Here is the gltf model to repo. shu.glb.zip