Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PNG is not transparent with Texture Importer?!

Discussion in 'General Graphics' started by FeastSC2, Apr 24, 2021.

  1. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Some of my PNG's simply cannot be transparent.
    As you can see below I am saying the alpha source should be from greyscale and the alpha should be the transparency. However, the preview image still displays the black as black as opposed to transparent.

    upload_2021-4-24_23-39-18.png


    This issue has happened when I transitioned from Unity 2020.1 to 2020.3 and it has happened to multiple images breaking a lot of my effects.

    I can fix it by:
    Copying the image into photoshop and export it out again as a PNG, and then the transparency is being applied properly.

    I have this on a lot of my images so I cannot go through all of them import them into Photoshop then re-export them... Any idea why the PNG will not display transparency?
    Maybe there is something I don't understand?


    Any help would be greatly appreciated!

    PS: I have attached the files, feel free to test the images.
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The bugged PNG is a 48 bit, 16 bit per channel, RGB PNG. It's absolutely a bug that it doesn't work when you set the source alpha to greyscale, and you should report it using the Help ? Report a Bug... dialog in the editor. But I'd suggest you also just save your PNG files with an alpha channel to begin with to avoid this, and figure out why you have 16 bit per channel PNGs.
     
    FeastSC2 likes this.
  3. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    I'll report it. Thanks!

    I have deleted the entire library of my project and this has fixed the problem. (I don't know why).
    I was having another problem, sometimes when I would open up my project it would import files forever. That's actually why I deleted my entire library but I don't know if that has been fixed.