- Home /
How come Transparency is not working
I'm not sure why Transparency isn't working here's what I did.
In Gimp Image Editor; create new image 512x512 Fill With: Transparency <---- yes... transparency.
Draw some black lines (making a gate, or trying to..)
save image as .PNG and import into Unity3d.
Select my object and pick TransparentDiffuse shader. select my black line drawing and it shows up on the little ball icon in the inspector.
ok... but when I look at the object it's transparent (the whole thing, there are no bars) so I play with the tiling, the offset, the shaders and nothing works. I can't figure out why because the little ball icon shows it up just fine, like it's working, but in the program it's just not there.
Can anyone help :(
Answer by Grady · Sep 30, 2011 at 09:58 AM
You need to use a transparent shader on your image, but instead of explainging it all, here are some links:
http://answers.unity3d.com/questions/18929/transparency-on-images.html
http://answers.unity3d.com/questions/63838/png-image-to-transparent-on-applying-to-plane.html
Hope this helps!
Comment back if you need more help
-Grady
Thanks for the answer! but, I... am still lost. I'm not sure what it means to add a transparent shader. Is this referring to something in Unity or something I do in Gimp Image Editor? sorry to be a noob.
the transparent shader would be set in unity...
Here is the documentation for the transparent shader family: http://unity3d.com/support/documentation/Components/shader-TransparentFamily.html
What I would do if i was you, is make sure that when you exported it from Gimp, that it definately had transparency in it... Then, (assu$$anonymous$$g that you want the image to just be like an image in your game), create a new plane, GameObjects > Create Other > Plane, and then drag your image onto the plane.
Then click on the plane in the Hierarchy, and click on the drop down menu for the shader. Scroll down and select something in the Transparent section. try them all and see if one works!!!!!!
Answer by discoelf · Oct 01, 2011 at 05:32 AM
That helped me figure something out. The transparency is applied to any Unity3d created object easily but not to my imported .fbx model. I made a lighthouse in Blender and tried to import it but Unity said for some reason there was a problem importing the .blend file so instead I exported as .fbx and imported that, and it worked. but the transparency doesn't.
hmmm very odd.
yeah, unity is not made to import transparency, even if the model has transparency in the 3d modelling program. Once again I would explain it to you, but here is another link. This is a question that I posted a while back when I was having trouble with transparency on fbx models: http://answers.unity3d.com/questions/138556/google-sketchup-fbx-problem.html