How would I make a couple MeshInstance3D's into one?

Godot Version

4.4

Question

How would I make a couple MeshInstance3D's into one? Because I want to make a house but all of the MeshInstance3D's cause the game to lag. Is there a way to make them into one MeshInstance3D? to make the game less laggy?

Theres something called MultiMeshInstance which improves rendering of the objects

I’m sorry but I’m kind of new to the Godot game engine and I don’t know how to make a wall using MultiMeshInstance3D do I create the “walls” (using MeshInstance3D) inside of the MultiMeshInstance3D?

i recommend to watch a tutorial, but you basically have to spawn these walls in code and assign them to the specific place.+
I think the GridMap also uses Multimesh-logic in the background so you can try this

The lag can also come from the physics. Do all the walls have a collisionshape?

Hello there!

If you want to merge a MeshInstance into one, it’s not possible directly. However, you can achieve this using the following methods:

  1. Move all your MeshInstances into a Node3D (so you can easily move and edit them).

  2. Export your models as a .gltf file (File → Export), import it into Blender, then export it from Blender and import it back into Godot.

  3. Create your own plugin for merging meshes. This is possible but can be challenging.

Similar Topic:

As you described, you wanted to make walls, here is the best steps for it:

  1. Add a CSG Combiner
  2. Add a CSG Box inside it as a wall
  3. Adjust the sizes/positions and duplicate it if you want to create four walls.
  4. Enable collision in the CSG Combiner
1 Like

Yes they do.

Are the collisionshapes complex or are they basic shapes like a box or a sphere?

1 Like

For Number 1. They are all already in a Node3D
For Number 2. Blender isn’t really working for me and its lagging like crazy and it for some reason doesn’t allow me to export or import things into Blender anyway.
For Number 3. As you said its challenging to make a plugin for merging meshes and I don’t think I have the time or the resources for creating one.

1 Like

Basic like a box.

You can follow my these steps for it, if you`re not using any specific wall model.

Okay. I recommend to first try out the Godot-profiler to see what causes the lag so you dont change things which dont need a change.


I think it might be pretty obvious for what’s causing the lag because there are 2 floors and about 4 more “walls” that this screenshot doesn’t show. But it could be because of the textures.

Its not unusual to have a lot of meshes in a scene. I still recommend to look at the profiler, its not that difficult to use

There are several things to try:

  • Multimeshinstance for repeating meshes
  • GridMap is easier to use then multimeshinstance, but you need to put them in a predetermined grid
  • Occlusionculling: to prevent meshes from rendering which are behind other meshes and therefore not visible
1 Like

The MeshInstances contain StaticBodies, right? Probably with TriMesh collision. Try deleting all StaticBodies, then select all meshes and go to Mesh > Create Collision Shape.

Like this?


If you model is not too complex? You can also try the other shape types, while avoiding the trimesh… as it costs some performance.

Otherwise, @herrspaten he is also right!

1 Like

Ok lemme try that.

1 Like

IF YOU HAVE A SOLUTION PLEASE TELL ME IN THIS FORUM:

Yes that worked it made it less laggy but the next problem is I made a light and light switches using a video by Omogonix* and when I turn it on it lags the game when its on and I think its because the size of the OmniLight3D but I tried resizing it and that worked a little bit but it still lags when it is on. Is there any way to fix the lag completely?

*https://www.youtube.com/watch?v=-MbPJjbIX4c&list=PLWI8H56cvVoLri4Z2hr152v2NGKTI-nio&index=2 (At 21:04 he makes the light)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.