Search Unity

colored glass in middle of texture?

Discussion in 'Editor & General Support' started by Sosuke, Jan 17, 2011.

  1. Sosuke

    Sosuke

    Joined:
    Dec 19, 2010
    Posts:
    13
    So basically what I want to do is create some stained glass windows in the middle of a building texture I am working on.

    I used the shape information i had for the windows I painted and created a 50% grey area in the same space as the windows in the alpha channel of the psd that I am working on. I am getting results that are not what I would expect when doing this and am pretty confused.



    on the left is what I have currently settled for. it is my texture set on transparent cutout bupped diffuse. as you see this makes all the glass completely clear, and playing with the alpha slider just hides or removes more of the glass. from the whole building gone to the glass full and colored in with only color information and no transparency.

    the left side is using the transparent diffuse only and I get a glass closer to what I want but it make the entire building semi transparent, some areas up to nearly 95% transparent, with no relation to the alpha channels on the texture.

    Pretty sure I am just missing something really simple since I am really new at this. thanks in advance for your help everyone.
     
  2. Ntero

    Ntero

    Joined:
    Apr 29, 2010
    Posts:
    1,436
    You'll have to make it a separate Mesh.

    Transparencies in Computer Graphics are a pretty big fake, and so having a circular mesh (or one you could possibly see twice on the same pixel) will cause unexpected reactions. Two options are to break the mesh up into walls, so you can then draw the back wall before the front, or you can split up the Opaque objects (wall) and transparent Objects(windows) into two separate meshes.

    You don't notice the issues in games or simpler geometry in Unity because they hide the complexity and failings of AlphaBlending.
     
  3. Sosuke

    Sosuke

    Joined:
    Dec 19, 2010
    Posts:
    13
    aw I was hoping that wouldn't be the case, oh well shouldnt be to hard to remodel that one little piece.

    thanks for the great quick response!