Bug on the visibility of submeshes

I would like to report a bug regarding the visibility change of submeshes
Visibility of meshes are changing but the submeshes does not display less than 1

here is an example: Babylon.js Playground

It looks like you’re setting visibility on the SubMesh, which doesn’t have a visibility property. If you set it on the merged mesh then it works thou. :slight_smile:

When I checked the submesh properties though console.log() it has a submesh property called visibility
Actually, I want only to set the visibility of submesh

If I log merged.subMeshes[0] then it doesn’t show a visibility property thou, neither does the documentation. I think you were prob looking at a log of a mesh, not a subMesh.

You can do it using materials by setting alpha like below thou. :slight_smile:

EDIT: or if you don’t want to use multiple materials and draw calls for the merged mesh, you could set the vertex colors and change the alpha of the selected subMesh’s vertex colors instead…

1 Like

You are right, I looked at the log of mesh.
Unfortunately, My intention is to modify the material of submesh independently, and I already have control of alpha as well. So alpha is not the best parameter for me to be changed because it relates to the material. If it is possible to create this property in the future, it would be good.