- Home /
Why are most of my materials displayed as black or transparent?
Of course I Googled this before posting here.
Is there a Dos $ Don'ts specializing in the usage of Materials. I read everything in the Unity docs but still can't use them very well at all. I try to select a Texture and a Shader and put the material on a game object and I can see the results displayed correctly in the preview but in the Scene or Game window the textures are either transparent or black. And I did try lighting my scene.
NOTE: I could find many how-tos but nothing about the Gotchayas.
I tried using all of the shaders and most of them did not work like expected. One weird thing I was experiencing is I had two very flat cubes side by side: the 1st bigger and closer to the camera than the 2nd. The one closer to the camera had a material with a nice texture, the one further from the camera had a material with just a color (no texture). When I slid the front flat cube halfway in front of the back flat cube. The texture on the front was clipped out to the size of the overlapping area of the rear flat cube. It's as if the rear cube was slid between the front cube's mesh and the front cube's texture...but there was a big Z distance between the two. weird. Does Unity have some limitation on what kinds of materials can be shown in front of other materials?
do u have proper lighting in your scene? u can also try self ilu$$anonymous$$ated shaders just to confirm
can you post a few images to illustrate the issue a bit further?
Answer by TokyoDan · Jul 14, 2013 at 10:33 PM
Well, I have tried lighting with no effect. I tried both directional and spot, pointing in the correct direction and covering the proper area. The self-illuminated shaders work but I'm trying to use the others, mostly for comparison of how they look.
please dont post as an answer, its not the same logic as forums here, just post as comment.
now as for your issue, if the self ilu$$anonymous$$ated shader works, then lighting is your issue. did u try raising the ambiant light in the global settings? this should give u a nice base light