Closed n0ahwint3r closed 1 month ago
the current api of MeshLibrary doesn't support setting material of mesh all I can recommend is merging model into 1 mesh and using mesh surfaces for loading any materials and textures
Basically make sure materials with textures are assigned to mesh. if you used Scene -> Export As -> MeshLibrary each MeshInstance would be treated as separate object that can be painted in world. You could use smart material(shader material) for your mesh.
I found a workaround for the lack of support for setting textures in a MeshLib:
I changed the MeshLibItem.gd to export a StandardMaterial3D (probably going to do the same for ORM), which I can access in the editor. I also changed the MeshLibDefiner.gd so that it recognizes and applies said Material to override the inaccessible Material of the Mesh when generating the MeshLib.
It‘s only one OverrideMaterial, so it doesn‘t work for multiple subsurfaces for now, but for my main project I‘ll have to implement that as well… I‘ll upload the changed scripts afterwards, since it seems to be a useful feature to have in this plugin!
In editor mesh importer you can set material of mesh, assign it.
Hey,
Not sure if this qualifies as an issue or if it‘s just a request for a patch… As far as I can see, the MeshLibDefiner does neither support .gltf files nor can textures of MeshLibItems be added/changed within the Inspector, which seems a bit inconveinient… I can make great textures in Blender and properly export them to .gltf files, which look okay in Godot… but can‘t use them in the MeshLib. I can make good textures with Material Maker, export them to .gltf and they look good in Godot… still can‘t use those… Same for making textures within Godot… Do I miss something here? Like… I see all the stats of the Mesh and it‘s Material within the Inspector but I can‘t change any of the properties or override the base texture… is there a fix for this?