- Home /
Closed by OP
Models becoming transparent
My .obj files exported from Blender seem to be unable to support any texture with a transparent section (as dictated by the alpha channel). When I use the default diffuse shader and use a texture without an alpha channel, the texture is shown on the model, which tells me that my normals and my UV maps are, at the very least, functional. However, when I use an image with a transparent section as my texture, the model become completely transparent. This issue persists regardless of whether the image was made using Photoshop or GIMP (.png format), and regardless of whether the shader used was the default diffuse shader or the default transparent diffuse shader. The same textures work on models exported from other game engines. I've double checked my models in Blender and the normals are all facing outwards. Even a regular primitive plane exported from Blender suffers from the same problem.
Any ideas?
Answer by Eric5h5 · Oct 18, 2012 at 02:00 AM
Use a transparent cutout shader if possible. Otherwise you will need to divide the model into separate parts, and only use transparency on the specific parts that need it, while the rest uses a non-transparent shader. This is because of transparency sorting issues in 3D graphics.
The default transparent cutout shaders don't work either. As long as there is any transparency in the texture used, even if just a single pixel, the whole model becomes transparent. If I use a non-transparent texture on the transparent/transparent cutout shaders, on the other hand, the model starts to function properly again. I've never had any trouble with transparency prior to this issue, and only with the models from Blender. (And yes, I really need to use Blender. =P)
Follow this Question
Related Questions
[Solved] Shader: cutout shader over a texture 1 Answer
apply transparent png, material color shine through 3 Answers
Remove white edges on texture help 2 Answers
PNG or TGA32 for semitransparent material 2 Answers
Shader for overlaying textures 1 Answer