Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

SuperPNG broken these days, any alternatives?

Ghogiel
greentooth
Offline / Send Message
Ghogiel greentooth
I think we are back to square one with photohop and PNGs alpha channels being oil and water. It's just mangling the RGB channels and adding white again. 

I can get it to work correctly if I make the RGB 1 solid color. As soon as I add in a load of color, the exported PNGs RGBs are fubar. 

these were all exported with SuperPNG:
Exhibit A (alpha mask working)

Exhibit B (alpha mask not working)

The whole RGB space is filled with either the green or gradient is the only difference. This is export: 

Reimported the RGB channels are fubar and filled with white. 


I'll probably use substance to export the channels correctly, but is there not working photoshop way anymore?

Replies

  • ZacD
    Offline / Send Message
    ZacD quad damage
    I use PNGs for anything 8 bit RGB and TGA for everything else. But been doing that for 15+ years now. It's crazy this is still an issue. 
  • Ghogiel
    Offline / Send Message
    Ghogiel greentooth
    ZacD said:
    I use PNGs for anything 8 bit RGB and TGA for everything else. But been doing that for 15+ years now. It's crazy this is still an issue. 

    I used to do the same way back in the day when most of my texturing was done in photoshop. But there was a solution about 15 years ago that solved the issue with pngs and photoshop, and somehow just migrated to use png as a default. Since a lot of texture outputs happen from other programs like substance, I've just not noticed that superpng is basically no more use than photoshops built in png handling until just now. 
  • gnoop
    Offline / Send Message
    gnoop sublime tool
     I  once used a fill layer in the Photodhop  with opacity:  6%  and Fill: 4% .    It crates an alpha value of  1  in 0-255 scale instead of pure black.     Renderers usually just clip such a small value on its own or it's  getting eaten of by texture compression I am not sure  but never seen an issue in game.    
    In Afinity Photo it had been possible to set it slightly bellow 1  by floating number in procedural filter  and it exported perfectly zero alpha and accurate RGB . But in last version it stopped to work for some uncertain reason.   
  • Eric Chadwick
    If you want to preserve the RGB values, you can force Photoshop by increasing the black level of your mask to be 1/255 instead of zero. Use Levels on the alpha, and set the lower Output to 1. Then it will look to the human eye as being completely transparent, but the full RGB will be preserved. 

    The PNG spec says in the simplest case to use a solid color for 0 alpha, usually white, and set a flag that tells readers to set that color as zero alpha. But it does also support separate RGB and Alpha, using a bit more work and also getting a larger file size, which SuperPNG supports. 
Sign In or Register to comment.