The question is answered, right answer was accepted
Transparent shaders make my custom plane completly invisible
Hello,
I have a simple black texture with an alpha that represents a square shadow (with a little fade on the borders, to look like a shadow).
So all I need to do next is affecting this texture to a material with a shader that handles transparency, for example "Unlit/Transparent" or "Standard" with the option "Fade".
Now the problem :
If I put this transparent material on the primitives "Plane" or "Quad", all is fine, I have my square shadow.
But if I put this material on a personal plane mesh my artist made, the mesh is completly invisible.
Does someone know what is happening ? Would it be something wrong with my fbx import parameters ? Or is it something I don't understand with the alpha ?
Note that if I use "Transparent" instead of "Fade" in the parameters of the Standard shader, my custom plane displays, but the effect is not sa expected (I'll do another test with my artist to check if the effect can be better with a UV rework).
Anyway I really would like to understand why "Unlit/Transparent" make my mesh invisible. Just a picture of my material with "Unlit/Transparent" shader :
Answer by Blue-Cut · Aug 25, 2016 at 12:52 PM
Hello again,
Short version :
If you want to have a transparent shader on a custom mesh imported from a 3D software, be sure to generate UVs for this mesh in your software, so the UVs will be imported in Unity. This makes sure that Unity knows the texture coordinates you want for your tris.
Long version :
After a small test, I can answer to my question. As I suspected, it sounds like a UV problem. The plane my artist send me was a simple mesh without any UV created in Maya. When the mesh is imported into Unity, you can apply a Standard material to it, but there still a problem, probably with texture coordinates.
I am not sure about what is happening, but it looks like the transparent shader doesn't know how to handle vertices if no UVs has been explicitly defined in the fbx. The "default UV" generated by Unity (I guess there is one) doesn't have correct coordinates and you can't apply a transparent material to it.
When my artist send me a new custom plane with UVs set, my problem was solved.
If someone want to add something about this behaviour, any comment will be appreciated.
Follow this Question
Related Questions
Make albedo transparent and keep the glossiness and reflection visible - standard shader 0 Answers
How to make my custom shader transparent? 0 Answers
Custom opaque shader looks transparent 0 Answers
Switching shader back and forth fixes transparency issue? 0 Answers
render order of transparent Surface shader is incorrect 0 Answers