-
-
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
Faile to load a gltf file which can be loaded successfully after "pbr work" #1785
Comments
Whatvis the exact message with which it crashed? And preferably can you get a backtrace? ( |
backtrace doesn't have anything really interesting |
There's a PR up to fix it: #1771 |
fixed above issue but found a new one:
|
That's because we now support normal maps and require the As a workaround until we can generate the vertices on the fly (#121) you can load the file into blender, then export as gltf and check the |
OK,that's the result. Maybe it can be beautiful as above if HDR is used :) |
Could we sneak in some quick workaround to at least not crash (like maybe render without normal maps if there are no tangents) into 0.5? It can see this becoming a common issue / pain point for new bevy users. Try to load a model ... bevy barfs and crashes. |
Yes, my above gltf file is exported from Substance Painter directly. Its' based on an sample file though some tweaks. |
There is no simple and quick fix for this... It's an issue we already have in 0.4 and 0.3 with attribute Comments on #1010 may be relevant |
Wouldn't a quick fix be to not load the normal maps if the texture doesn't contain the tangent attributes? |
Currently, the gltf loader:
For the quick fix, it's not a small refactor of the loader, we would need to:
I think your pr (#1795) is the right way forward as soon as it's available on crates.io, feature or fork |
yes #1795 is the proper solution I simply asked if anyone who is more familiar with the code base could think of a quick fix, because it would have been nice to avoid the breakage in the release. But oh well, if there is no quick fix, doesn't really matter. As you said, previous bevy releases were broken in many ways, too. |
Confirmed that this was fixed by #1795 |
Bevy version
94c4184
Operating system & version
MacOS 10.14.6
What you did
Try to load attached gltf file with tweaked example load_gltf but failed.
I tried it a couple of days before and It can be loaded after the recently change for "PBR work".
I just changed the below line in the example
What you expected to happen
The attached gltf file should be loaded as before.
What actually happened
example load_gltf crashes. Maybe there are something wrong in latest change for "pbr textures" by mtsr
Additional information
I have attached my gltf file and snapshot as below:
xiaorentou-2.zip
![xiaorentou](https://user-images.githubusercontent.com/179429/112889205-eb18c600-9107-11eb-95b3-b88722d21ae4.png)
The text was updated successfully, but these errors were encountered: