I cannot seem to figure out how to get a MultimeshInstance3D
to honor the alpha channel of a MeshInstance3D
. I have tried a tree made in Blender and one made in TreeIt without success. My issues with Blenders tree is that when using dupliface it imports each leaf as a separate mesh. I was able to fix that by using MeshMerger
but now the problem is it renders at run time like the image below
Blender MeshInstance

And Here is a rendered scene using multimesh. You'll see that if I put the single MeshInstance
into the scene it works fine. However the multimesh does not.

I'm having the same issue with the tree from TreeIt. Treeit imports as one single mesh so both trunk and leaves or combined and assigned different surface materials. Because I can't change the surface materials in the inspector (not sure why Godot doesn't allow it) I have to add the leaves as an override material and then I can use alpha scissor
. The tree looks fine as a single mesh.

But again multimesh doesn't honor the alpha. You can see a single instance in the front here and the multi in the back.

I have not come up with a reason why or a work around so hopefully someone can help. Here's my multimesh code
multimesh = MultiMesh.new()
multimesh.mesh = tree.get_child(0).get('mesh')
multimesh.instance_count = 0
multimesh.transform_format = MultiMesh.TRANSFORM_3D
for v in mdt.get_vertex_count():
if mdt.get_vertex_color(v) == Color(0.0, 1.0, 0.0):
positions.push_back(mdt.get_vertex(v))
count += 1
multimesh.instance_count = count