-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
When importing 3d project in 3.4.beta2, materials are not assigned (glTF import regression) #51292
Comments
If you can compile from source, can you try bisecting the regression? This would greatly speed up troubleshooting. Also, check the Output panel (or, better, the terminal output) for error messages. |
It does indeed seem to complain quite a lot in the console when I open it. I'll see about besecting. EDIT: I probably won't have time for this until Saturday. |
I can reproduce the issue in both 3.4 beta 1 and 3.4 beta 2. I had an old build laying around of a69cc9f (May 20) which imports fine, so the regression is between a69cc9f and beta 1 (207fb16). There's a lot of errors spammed like this:
Note that to properly reproduce it one needs to reimport materials (deleting Edit: Seems related to glTF import, so deleting |
I bisected the regression to 6ec9468 (#49120), CC @lyuma @fire.
(For the reference 6ec9468 doesn't build... There's a stray |
I have debugged this and I think I can provide a highly likely explanation for this regression. The line in question is line 603
which results in a naming conflict since the node containing the meshes end up with the same name as root node and will increment the name by appending a number to it. This subsequently breaks the material assignment paths in the inherited scenes set up in this project. The original GLTF importer from 3.3 used this line instead:
We can revert to the old behaviour, but that could introduce naming conflicts of its own, and I'd be curious if anyone knows the reasoning behind the change. Any feedback is appreciated. |
Okay, have a fix for this, but in the interest of not making PRs when I'm tired, I'll sleep on it first. The basic fix here is to not generate a unique scene name at first, simply assign it directly, but then run it through _gen_unique_name at the end of the _assign_scene_names method. This will ensure that the scene_name will always be assigned last and end up with incremented name. Since Godot's general scene importer supercedes the root name anyway, this would make the naming conflict irrelevant. However, there still questions which may need to be addressed: how do we have consistent GLTF Import/Export with a duplicate root node name and is it possible that we could run into other naming conflicts with other empty-named nodes. |
Fixed by #53140. |
Godot version
3.4.beta2
System information
Windows 10, GLES3, GTX 980Ti
Issue description
When importing my cellar project in the beta, some materials are not assigned and reflection probes appear to be wrong.
https://github.com/Arnklit/godot_cellar
Project in 3.3.2.stable
Project in 3.4.beta2
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: