Problem with the transparency of fences

Discussion in 'Track Modding' started by vicent-sollana, Apr 29, 2012.

  1. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    I'm having trouble with the transparency of the fences, it should appear the background trough them, but I don't know the reason why this isn't happening. Any sugestions??



    [​IMG]
     
  2. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    The fences use alpha Channel?
     
  3. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Yes, t1 srcalpha,invsrcalpha and sorted checked.
     
  4. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    It looks like a sorting issue. Try setting the image plane with the mountains material offset to a higher number.

    The track_technology pdf recommends this as a last ditch effort, though.

    Have you tried using "chroma" transparency?
     
  5. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Yes "chroma" transparency is checked. I'm gonna take a look at the mountain material, but I don't understand what to do there.

    Thanks a lot.
     
  6. feels3

    feels3 Member Staff Member

    Joined:
    Sep 4, 2011
    Messages:
    1,201
    Likes Received:
    142
    Do you use mipmapps for fence texture?
     
  7. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Yes,i use DXT3 interpolated alpha with 6 mipmaps,it´s correct?

    I tested the offset upgrading numbers from 0 to 4 and it didn't work, but, when I put it at -2 it worked perfectly.

    [​IMG]

    Thanks a lot.
     
  8. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Are you using both croma- and blending transparency on same material? I don't think it should work correctly and you should pick one of those.

    Chroma works much, much better in rF2 (comparing to rF1). In most cases it should be good enough for fence transparency.

    Cheers!
     
  9. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Yeah, only one can be enabled at a time. It's just some strange rFactor limitation, because these are actually independent on GPU and in DirectX.
     
  10. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    IMO it's good limitation, because transparency is very resource-hungry anyway. It teaches us behave. :p

    Cheers!
     
  11. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Not really.

    Blending is a bit expensive.
    Alpha test is equally fast to rendering non-transparent polygon or faster.

    Alpha test is just skipping rendering of pixels that are transparent anyway. Blending is performed on all pixels of a polygon, even those that do not change anything on screen.

    That's why I like using alpha test or discard instruction in pixel shader to optimize blending.
     
    Last edited by a moderator: May 1, 2012

Share This Page