I am currently discovering Godot, developing a voxel engine, and I'm facing an issue creating multi-meshes during runtime. My engine is coded in a C++ native module.
I'm storing voxels in chunks but with a bigger cube count that classic engines ( i want to draw smalls colored cubes instead of one bigger textured cube ). So my chunks are 256 cubes wide, drawn with a multiMesh each.
The problem I have is that when I move in the rendering world, display is lagging when a new chunk is generating, because the multimesh instructions ( setinstancetransform, setvisibleinstancecount, setinstance_count ... ), are processed in the visual server, even if i run each chunk generation in a thread.
So the question is how can I effectively create multimeshes during runtime for a huge amount of instances ? ( maybe I am not doing it the right way )