Mesh with Transparent material makes TextMesh in front of it invisible

Okay, so I have a problem with my game. I have Text Mesh objects generated via a script above 3 doors in my game Normally, it looks like this (albeit with an easier to see font).

alt text

This works fine, however, because the wall is in the way when you open the door to a new room, we put in a transparency script that makes the room semi-transparent when the character is covered by a wall. However, when we enable this by changing the room’s material from Bumped Diffuse to Transparent Bumped Diffuse to enable the alpha channel, this happens.

alt text

The text over the doors disappears. I have no idea why, especially considering the text is positioned in front of the wall and is not intersecting. The textMeshes still appear on my hierarchy though and when I activate the transparenct feature I mentioned, they suddenly reappear while the room is transparent.

alt text

When the room returns to relatively solid form, the text meshes no longer appear. Additionally, I can see them in the scene view, but ONLY at certain angles, most notably behind the room.

alt text

alt text

My programmer and I are utterly baffled as to why this is happening. It looks fine with regular material but this messes up as soon as I switch to a material type with a transparency.

Does anyone have any idea why this is happening?

I never tested this, and I just found it when I was googling for the same problem:
There seems to be problems with text mesh materials and transparent materials, as stated in this question, Why does my textmesh dissappear from certain camera angles? - Unity Answers, when you use cutout instead, the problems go away.

http://forum.unity3d.com/threads/shader-depth-issue-object-disappears.74181/
here the solution seems to be editing the shader code, as the problem seems to be the render queue of both the wall and text mesh are at the same time, so their rendering order is never clearly determined, therefore fucking up the rendering. I couldn’t find a way to edit the default shader for the text mesh, but if you find a way, you try using the solution.

Look forward to you solving this :slight_smile:

This is because, you are using Transparent Shaders for both Room and your text. Since both shader’s Zwrite is off, you will experience depth sorting problems. Try to use “Transparent/Cutout/TransparentDiffuse” shader for your “Text”.
If you are using unity 5, use Standard shader and keep the rendering mode to cutout for the text.

Had the same problem using TextMesh Pro in front of objects that I needed to fade transparency in and out, so I couldn’t just switch it to Cutout since it doesn’t let me fade. The solution for me was to change the Standard Shader (actually using Holotoolkit/Fast Configurable, but it’s the same) Rendering Mode from Transparent to Advanced, then change the Render Queue from 3000 Transparent to 2999 Transparent-1 and I was able to see the text from all angles again… That glitch was annoying me for a while, hope this helps someone facing the same issues…