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

Cannot Load Saved Materials #66700

Closed
cybereality opened this issue Oct 1, 2022 · 7 comments · Fixed by #66795
Closed

Cannot Load Saved Materials #66700

cybereality opened this issue Oct 1, 2022 · 7 comments · Fixed by #66795

Comments

@cybereality
Copy link
Contributor

cybereality commented Oct 1, 2022

Godot version

v4.0.beta2.official [f8745f2]

System information

Ubuntu 22.04, AMD RX 6800 XT

Issue description

I can create a material (either standard or ORM) on a mesh. However, if I save this, I cannot load it anywhere else, even on the same mesh. It gives an error: "The selected resource (StandardMaterial3D) does not match any type expected for this property (BaseMaterial3D, ShaderMaterial)". This is a new project, with nothing else but a cube.

Godot_Beta_2_Material_Error

Steps to reproduce

Create a MeshInsance.
Give it a material (standard or orm). It can be on the mesh or the override.
Save the material.
Click on the material drop-down and choose load or quick load.
Choose the same material.
Watch the error.

Minimal reproduction project

MaterialBug.zip

@Chaosus Chaosus added this to the 4.0 milestone Oct 1, 2022
@Chaosus Chaosus moved this from To Assess to Todo in 4.x Priority Issues Oct 1, 2022
@Chaosus Chaosus moved this to To Assess in 4.x Priority Issues Oct 1, 2022
@manueldun
Copy link
Contributor

Does this count for hacktoberfest? If it does i am going to give this a try

@Calinou
Copy link
Member

Calinou commented Oct 1, 2022

It's strange that this happens, as ORMMaterial3D and StandardMaterial3D both inherit from BaseMaterial3D.

Does this count for hacktoberfest? If it does i am going to give this a try

Yes, any issue counts.

@Zylann
Copy link
Contributor

Zylann commented Oct 1, 2022

I had an existing scene containing various mesh instances with a StandardMaterial3D assigned to them. Some of them inexplicably lost that material, and I can't assign it back because of this error. Despite that, some mesh instances still have the material assigned just fine.

Interestingly, after I re-save several times the scene:

  • If I use Quick Load, it shows the error.
  • If I use Load, it also shows the error.
  • If I use New, it doesnt appear to do anything, but reloading the scene shows a new material assigned.
  • If I drag and drop from the FileSystem dock, it assigns the material, but any mesh I hovered while moving over the 3D viewport prior to reaching the inspector, loose their material.

@Calinou
Copy link
Member

Calinou commented Oct 1, 2022

If you can compile the engine from source, you could look into bisecting the regression to greatly speed up troubleshooting.

Assuming this issue doesn't occur in 4.0.beta1:

  • 4.0.beta1's commit hash (good) is 4ba934b.
  • 4.0.beta2's commit hash (bad) is f8745f2.

@manueldun
Copy link
Contributor

If you can compile the engine from source, you could look into bisecting the regression to greatly speed up troubleshooting.

Assuming this issue doesn't occur in 4.0.beta1:

  • 4.0.beta1's commit hash (good) is 4ba934b.
  • 4.0.beta2's commit hash (bad) is f8745f2.

I will start bisecting tomorrow morning to get an idea of how it should be fixed. I just found the code where it shows the warning. Thanks.

@fracteed
Copy link

fracteed commented Oct 2, 2022

Just wanted to confirm that I also have this issue in beta2, that didn't exist in beta1. Meshes that already had materials are fine and the material can be edited, but another material can no longer be applied.

@clayjohn
Copy link
Member

clayjohn commented Oct 3, 2022

For posterity, this bug was introduced by #62413 and will be closed by #66795

Repository owner moved this from Todo to Done in 4.x Priority Issues Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants