Godot Version
Godot 4.6.1 stable
Problem
When trying to do a MeshLibrary for a GridMap, even though the meshes are correctly formatted, the GridMap tiles have their mesh overwritten for seemingly no reason at all. Additionally, the actual mesh when I place it and the preview are not the same.
In this image, I placed every mesh in the order of the menu (a, b, c, d, e, f). As you can see, a and b do not correspond to their preview, while c, d, e and f do not correspond at all to the mesh that they should (as explained below).
Everything I did
In Blender
I modelled different tiles, which are their own object, which have their point of origin at the center, which are all named differently (a, b, c, d, e, f) (I did this to make sure this would not be an issue), they all have -col at the end of their name for collision, they are all spaced (although I tried different spacing and I tried putting all of them at the same place and it doesn’t seem to have any impact). Additionally, I also renamed the mesh data block for each mesh in blender to be 100% sure.
I then export the whole file to glb (by selecting the option “export to glTF 2.0”), to the directory of my Godot project.
In Godot
- I open the glb as a new inherited scene, which looks like this:
At this stage everything is exactly like in the .blend file, nothing indicates any problem at all.
-
I export the scene to MeshLibrary, it gives me a .tres file
-
I put the MeshLibrary .tres file into the MeshLibrary slot of my GridMap node.
What is going wrong?
It seems to me that the conversion to MeshLibrary is at fault, I tinkered for a few days with different ways to do it and it seems nothing works. I don’t understand why some meshes are overwritten, why some are not, why the preview doesn’t work for some. I would greatly appreciate if anyone could tell me what is going on and/or what I did wrong.
Thank you for your time!


