Hi,
I have a room map saved as blend file. When I import the model in godot I can edit the materials. Apply normal, AO textures etc. But when I close godot and re-open it, all my textures get removed from the materials. No normal, no AO textures. I need to re-edit the materials again. I save the room as tscn file also, still it does not save the materials. How do I save the materials on the imported mesh?

Thank you.

When you import the model, you need to right click on it and then choose new inherited scene. Make your changes there and save it before adding it to the world scene or whatever. I'm not sure that's it or anything, though. That's what I do and I don't have that problem. Actually, I don't use the blend file so it might not apply.

It is not only happening with blend files but with all other formats also. It is happening with inherited scene. Only work around I found is use geometry material override. But the problem with it is I can't use more than one material with a mesh.

    BirdaoGwra
    "In Godot, you can't use several materials on a mesh instance because the instances will be rendered in a single draw call1. However, you can use a single material that depends on the custom data of each instance1. Alternatively, you can use the set_material() function on SurfaceTool to add different materials to different parts of the mesh2. You can also use the material_override property to have different materials per MeshInstance3. To fix issues with the ShaderMaterial, you can turn the Local To Scene checkbox to On4."

    In Godot, you can't use several materials on a mesh instance because the instances will be rendered in a single draw call1.

    This statement is wrong. Meshes and mesh instances with multiple materials are fully supported. The only thing that is limited to one material are the material override and the material overlay.

      I have an object with two material attach. It renders correctly in editor but as soon as I play the game that object becomes white.

        Zini I probably should have checked how old that quote was.

        BirdaoGwra Have you tried gltf separate textures for export? The blend import is pretty new. You may need to apply modifiers if you used them. I think I've had to add textures in the past, but I'm pretty sure they stayed there with a save. Not sure if I had multiple materials, though. There's only one material isn't there? You can export multiple objects with multiple materials. I do kind of simple stuff.

        There are so many options in material tab but it is read only option. glb format imported the textures correctly. But still can't edit the material in godot. There are no material tab in glb mesh.

        Either you are doing something wrong or there is an issue with Godot 4, borderline enough that nobody else noticed it yet. Hard to say. But changing a material on MeshInstance level works perfectly fine on Godot 3 and I would expect it to usually do so on Godot 4 as well. Are you sure that you are changing the material in the right place (the MeshInstance itself)?

        I imported an object as glb. Import as new inherited and you can see the mesh in the scene called cube for me. Gave it a new material, put texture on it. Saved it. It came up again. I don't know if you have to do that because the texture was already applied and the normal etc would probably also be applied.

        I have downloaded a model from sketchfab. It is a fps gun model. If I import it as fbx, it loads but without textures on it. But in inspector the material option is available. But when I import it as glb, it loads with textures but in inspector the material option is not available.
        And with fbx model, even if I assign the material it does not show in play mode. But it shows the textures in editor.
        Could you kindly tell me how to import it correctly.

        This might be a Godot 4 specific issue with which I can not help you because I am still on Godot 3. However what I noticed is that you are looking at the wrong node in the glb case. Not sure why these nodes are even there. But you should look at the children of the Skeleton node (which is currently folded).

        I did not even thought about that folded armature, that solved the problem. Now just to figure out how to save two material in a mesh, once I edit it. Thanks for the reply.

        What I did to assign a new texture was click on the mesh in the scene, click on the picture of the mesh in the upper right side, go to geometry, material over, click the little down arrow, and new standard material. Then in the albedo, etc, you can assign texture. I don't know if it runs in the game or not. I don't quite understand why you can't use the glb if it has the texture applied.

        I can use the glb. Only problem is even if I edit the materials godot does not save it. Once I close and reopen godot the materials reset to just albedo. Godot save the material if I go to grometry and use material override. But the problem is if I have two material in the object, material override applies only one and removes the other.

        Weird. I am out of ideas. Can you show us where and how exactly you set the material? Maybe it is something so obvious that it is easy to overlook (like with the folded node).

        Edit: Also to make sure, this is a inherited scene you are working on, right? Not the original glb file?

        Just got it. Yes I just overlooked it like the folded node. I was applying the textures on the mesh surface. While I should apply the textures on surface material override. Thank you for your reply and help.