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?
4.4
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:
Move all your MeshInstances into a Node3D (so you can easily move and edit them).
Export your models as a .gltf file (File → Export), import it into Blender, then export it from Blender and import it back into Godot.
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:
Yes they do.
Are the collisionshapes complex or are they basic shapes like a box or a sphere?
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.
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.
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:
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?
Otherwise, @herrspaten he is also right!
Ok lemme try that.
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)
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.