Home Unity

Why does my opaque texture seem to be transparent?

polycounter lvl 7
Offline / Send Message
salimmatta polycounter lvl 7
Hey guys, 

I have a very basic fence model in Unity. I textured it in Substance Painter and export it for unity 5 specular. In Substance Painter the object is divided to 2 phases, opaque (wooden part) and transparent (perforated metal), so far in Substance painter it works perfectly fine, but when I export it in Unity and create the materials based on my texture export, for some reason the opaque part becomes transparent and it is frustrating.

However, I have created 2 materials in maya for the model and re-textured it in Substance Painter and export it to Unity and created also 2 materials there and it works perfectly fine, but the question is: Isn't too expensive to create 2 materials for a basic fence model that is going to be used for mobile? 

Is there a way to fix the opaque part without creating another material for it? 

Thank you!

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Without seeing the example, it's hard to say. But it's generally better to cut transparent meshes as close as possible, so there's less alpha blending to render.

    I would separate the model into opaque parts (no alpha blending in the shader) versus transparent parts.

    You can also try alpha test instead of alpha blend, then you have no partially-transparent errors. But alpha test is slower in iOS than alpha blend; Apple advises avoiding it whenever possible.
  • salimmatta
    Options
    Offline / Send Message
    salimmatta polycounter lvl 7
    @Eric Chadwick
    Thank you mate, that was so useful!!


Sign In or Register to comment.