Semitransparency/translucency

Discussion in 'Track Modding' started by Guineapiggy, Jan 18, 2012.

  1. Guineapiggy

    Guineapiggy Registered

    Joined:
    Apr 22, 2011
    Messages:
    535
    Likes Received:
    0
    Is there any way to set a material semitransparent/translucent? What shader would I have to use to combine cube, bump and color maps with transparency and how do I set it? Is it controlled by a specific alpha layer?
     
  2. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    I'd be curious about that as well, because I thought I saw in a relatively early screenshot that the awning on the grandstands in Malaysia seemed to be translucent. If you can have a map that controls the transmission color, it would be interesting to use this with foliage as well.

    Here are the screenshots I was thinking of--you can clearly see the scaffolding through the awning, and the translucent 'glow'.
    [​IMG]

    [​IMG]
     
    Last edited by a moderator: Jan 18, 2012
  3. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    Do you mean like just having a material 50% transparent?
    Can't you just do that with alpha transparency where you set the material's blend options to InvSrcAlpha/SrcAlpha and use a 50% grey alpha channel in the texture?
     
  4. Guineapiggy

    Guineapiggy Registered

    Joined:
    Apr 22, 2011
    Messages:
    535
    Likes Received:
    0
    I'll give that a try and report on my findings, thanks.
     
  5. Guineapiggy

    Guineapiggy Registered

    Joined:
    Apr 22, 2011
    Messages:
    535
    Likes Received:
    0
    Nope, just makes the object invisible.
     
  6. D1Racer

    D1Racer Registered

    Joined:
    Jan 10, 2012
    Messages:
    193
    Likes Received:
    1
    Set the material options to SrcAlpha/InvSrcAlpha, with the 50%-75% grey alpha channel in the texure.
     
  7. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Ethone's method should work. This is one example where you HAVE to use alpha transparency and can't consider chroma. I'm guessing there is no alpha channel present (or white). That would explain it disappearing when you use an Inv Src Alpha/Src Alpha Source/Dest blend. I would use Src Alpha/Inv Src Alpha instead, but that's just personal preference in most cases.
     
  8. Guineapiggy

    Guineapiggy Registered

    Joined:
    Apr 22, 2011
    Messages:
    535
    Likes Received:
    0
    Oddly the latter works but the former doesn't. It does have the undesirable result, however, of making the object exceptionally pale, though that can be tweaked I guess.
     
  9. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Hmm, I've noticed that paleness too recently, and opted for Inv Src Alpha/Src Alpha without thinking at the time. Thanks for sharing that bit of info :) .
     

Share This Page