New IBL Chroma Transparency sorting issue

Discussion in 'Track Modding' started by Wizzo58, Jun 2, 2022.

  1. Wizzo58

    Wizzo58 Registered

    Joined:
    Apr 15, 2022
    Messages:
    40
    Likes Received:
    23
    Probably something easy that Ive missed. Ive got a mesh with a group of trees with chroma setup in Max.
    Load in viewer and show correctly. Loaded the material editor and set to L2IBLVegetation, exported the jason file and modified the script as required by dev guide. Now Ive got transparency issues with trees in a group showing through each other. Any ideas why?
     
  2. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    That sounds as if Alpha Transparency gets used now.
    To avoid this Effect with Alpha Transparency, there are Alpha Sort Values that can be set.
    But with Objects like Trees, they are useless and so Alpha Chroma gets used.
    In which Way did you edit the JSON File (Link to the DevSide with the Instruction?)?
     
  3. Wizzo58

    Wizzo58 Registered

    Joined:
    Apr 15, 2022
    Messages:
    40
    Likes Received:
    23

    Im using alpha chroma and I edit the jason file according to the guide;
    • "dstBlend":"CUBEAB_INVSRCALPHA"
    • "srcBlend":"CUBEAB_SRCALPHA"
    • and adding "CUBEMAT_ALPHACHANNEL"
    • I also compared their material sample.
    Also I would like to say it worked fine using the older rf2 shader pre IBL
    and it still works with it if I change it back to using stamp vertex shader
     
    Last edited: Jun 2, 2022
  4. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    What happens if you remove the Lines
    "dstBlend":"CUBEAB_INVSRCALPHA"
    "srcBlend":"CUBEAB_SRCALPHA"
    ?
     
  5. Wizzo58

    Wizzo58 Registered

    Joined:
    Apr 15, 2022
    Messages:
    40
    Likes Received:
    23
    Viewer crashes.
    If I remove "CUBEMAT_ALPHACHANNEL",
    it doesnt crashes but no transparency
     
  6. Wizzo58

    Wizzo58 Registered

    Joined:
    Apr 15, 2022
    Messages:
    40
    Likes Received:
    23
    So Ive got it working ;)

    You have to add the RED highlighted script to use chroma transparency.

    },
    "refName":"",
    "shader":"L2IBLSTANDARD",
    "sortOffset":0,
    "srcBlend":"CUBEAB_ONE",
    "textures":[
    {
    "AnisoLevel":0,
    "ChromaColor":0,
    "Flags":[
    "CUBETF_CHROMAKEY",
    "CUBETF_OWNEDBYMATERIAL"
    ],
     
    redapg likes this.
  7. Wizzo58

    Wizzo58 Registered

    Joined:
    Apr 15, 2022
    Messages:
    40
    Likes Received:
    23
    Thanks for your help, cheers
     
    redapg likes this.
  8. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    It wasn't really helpful, but thanks. :)
     
  9. Wizzo58

    Wizzo58 Registered

    Joined:
    Apr 15, 2022
    Messages:
    40
    Likes Received:
    23
    Yes you were, your advice triggered me to look in a different direction and that's why I worked it out, cheers
     
    redapg likes this.

Share This Page