I am trying to set some meshes(multiple meshes) loaded from a model file alpha to blend with other objects in scene, but inside the meshes they are not transparent. What’s the best way to achieve this? Thanks! https://www.babylonjs-playground.com/#WGZLGJ#574
(This may not be a perfect example since it only has 1 mesh but you can get my point)
I found this by using the Inspector, if you look at Materials > BoomBox_Mat, there is a Transparency category there.
Granted, it doesn’t look like the mesh can completely disappear unless you change the Transparency Mode to be Alpha Blend and Test. There might be a better way though.
Thank you for the quick response. Your code works perfectly on the playground, but they are not exactly what I meant. My model file has multiple meshes, when I set the visibility to 0.5, they are blended with each other and makes the whole model looking weird. What I am trying to achieve is to create a group of meshes inside a node that are not transparent among each other, but transparent to outside objects in the world. (kinda like a hologram in star wars) Is there a quick way to do that without merging all the meshes into one? (assuming they have their own transformation and animation so it’s not a good idea to merge them)
@Deltakosh Thanks a lot for your answer, it works one step further! I can see will that flag turned on in a mesh faces are no longer transparent to each other. But what if I have multiple meshes inside a root node? Do I need to manually merge them into 1 mesh to achieve the same result or can the same trick apply to the root node?
It is a bit tricky but you can try to set that flag to all meshes. It should work if no other mesh is transparent
Else you will be forced to merge them