Hi. I’m using .blend and i was wondering if using the same mesh data (i don’t really know if that’s the correct name) on multiple object is better than just normal duplication.
For exemple: i’m modeling a plant and i use the same mesh data for all the leaves. In blender, the number of triangle in the scene statistics doesnt change if i add more leaves but i don’t know if it really make a difference in godot.
It should in theory. If the mesh data can be shared there will be a performance gain by allowing it to reuse the same mesh data for each leaf. But I couldn’t confirm that. I do have a mesh of my own with such features, but I never inspected it closely in Godot.
I did a little test with 200 spheres that had around 20k tris. Using the same mesh data got me slightly better performance but i didn’t test it deep enough to know if it’s that relevent.
But with the duplication of all the mesh data, the file was very VERY heavy (300MB) compare to the one with same mesh data (around 3MB).
So the .blend file you export with this leaf instancing in blender, what do you see/get when you import that into godot?
I am not familiar with .blend or it’s use of glTF and what you can get from an exported scene when in godot.
Does it give you a MeshInstance3D node for every leaf that is an instance in blender, or does it do something else?
It create a MeshInstance3D for each object, but uses the same mesh.
This is the Advanced Import Settings for the Scene
That is pretty cool it does that, but for anything outside of some simple scene construction, I wouldn’t recommend you export setups like that, especially for foliage.
In blender it’s great to use some instancing setup to place the leaves or other parts that can be instanced, it’ll make editing the parts so much easier and your .blend files smaller, but you’ll want to export that plant as a single mesh or at least import it into godot as a single mesh.
For some other types of assets, that have a smaller number of instanced parts that are more detailed, importing them the way you have it could be useful, though you’d want the similar meshes to come in to godot as a MultiMeshInstance3D for all of the unique meshes and store all of the instances of those in that node, not as a MeshInstance3D for each one. From what I know godot doesn’t support that yet from blender though I have seen requests for that about 7 months ago or so.
but you’ll want to export that plant as a single mesh or at least import it into godot as a single mesh
That’s what i did later ! but didn’t know if it was the right things to do, thanks for confirming it was.
And i agree on the rest, thank you for your answer