The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I will explain it as simple as possible,First im trying to create a minecrafty voxel game, i am instancing around 10,000 mesh's obviously this isn't very performant, and I started looking for a way to optimize performance, and I found multi-mesh instance it sounds great and exactly what im looking for, but I go to the docs and Im clueless I have no clue on how to implement it into my code.

To make it easier for you guys to understand what I want I will post my code in a link here:

Godot version 3.2.3
in Engine by (161 points)

1 Answer

0 votes

GridMaps are much closer to what you want to implement.

Edit: Since you really want to use MultiMesh.

Mesh and MultiMesh are Resources, containing information about what to display. MeshInstance and MultiMeshInstance are Spatials which can display them.

Basic code to create a MultiMesh can be found here. Once created, simply put it into a MultiMeshInstance in the tree to display it.

Since you will probably have quite a few blocks, you may want to use MeshLibrary anyway, even without any GridMap (for convenient storage). If the default way of creating one is insuficient for you, see this answer to create one by code.

by (2,720 points)
edited by

Thanks, I'm aware of gridmaps but I like to accomplish this without it.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.