How would you do partial gameobject transparency on a custom mesh?

Hello all. I am currently building a custom mesh, with each part potentially having a different material. Picture legos that combine to form a larger structure.

Now, I want to have portions of the terrain ‘phase’ in and out in a trap fashion. If a player hits a trap, the ground below will become transparent and fade out, causing the player to fall and die. Unfortunately, this leads to issues where the trap can be placed on a non-transparent block that then needs to become transparent. Can this be done?

I was thinking of using either the alpha in vertex colors for the mesh, or using a cutout shader that blends transparency into the blocks it encompasses. But before I ventured into either route, I wanted to know if anyone else has had experience with making non-transparent materials transparent somehow, or if the cutout path would even work.

Tl;dr: Is there a way to layer something onto a non-transparent material to make said material appear transparent/fade in and out?

Thank you all for your help.

For fading in and out objects, use either a shader that supports transparency (Transparent Diffuse, for example), or one that support Vertex colors nad change the vertices’s alpha. What exactly is your question? :slight_smile: