MeshLibrary won't have all the Items I put in them

Godot Version

4.2.2

Question

I am attempt to create a MeshLibrary to use in a GridMap. However, when I do so I am only getting one mesh to go into the library. I should have two in total. The following process is what I’m doing. Any help would be appreciated, I’ve been banging my head against this for 5 hours now.

  1. Import different assets. In this case two glb files named ‘dirt’ and ‘grass’.

  2. Create a new 3D scene and rename the root Node3D ‘Tiles’

  3. Drag the dirt and grass glb files onto the ‘Tiles’ node so that they are both children of the Tiles Node3D.

  4. Select ‘Tiles’ Node3D and select scene>export as> name it tiles.meshlib.

  5. Go back to world scene and create a GridMap that extends from the root Node3D.

  6. Within the inspector for the GridMap node I drag the tiles.meshlib into the mesh library property.

1 Like

Hi, I’m having the same issue. Did you manage to fix it?

What I ended up doing was making sure that when I exported my files from blender they were named differently. Instead of ‘Cube’ in blender and exporting as grass, then recoloring and exporting as dirt I went ahead and changed the name of the object to ‘Grass’ then exported as grass, then changed the name of the object in blender to dirt, recolored it and exported it as dirt.

I had some other issues trying to assign glb files to MeshInstance3D so I ended up exporting them in the same way except to .obj files which seemed to do the trick.

From what I understand the better way to go about it is to import a .blend file and create multiple ‘objects’ in blender within the same file just spaced apart. Then I believe there’s tools or something within godot to select objects from the blend file to import into it’s own .obj file that is instanced from godot and gets updated as you change it? Something like that but I’m not 100% sure.

It’s worth reading more into though, I’ve taken a break from the gridmap to go over some of the documentation godot has. I haven’t gotten to gridmaps yet, I’ll update this again once I understand it fully. Or if you have a breakthrough and can figure it out please come back and let us know! Best of luck!

This renaming trick did not work for me :smiley:
I had multiple objects in one blender file, spaced apart. Importing them in godot and making a gridmap from them also did not work for me - same issue as yours.
So what I did is I exported each blender scene one by one in .glb. Meaning for each object I selected one scene from my scene collection, deleted the rest scenes with their hierarchies and exported the remaining scene. After exporting one scene, I used “Undo” and then did consecutively the same just with another scene

1 Like