Home Technical Talk

Downsides of using PNG's for authoring textures?

[Deleted User]
polycounter lvl 2
Offline / Send Message
Pinned
[Deleted User] polycounter lvl 2
Hey guys. Like the title says I'm wondering if there are any downsides to using PNG's in this regard. To me it looks like there are a couple of advantages:
  • PNG's are using more commonly in other fields like the web, photography, etc
  • PNG's have built in windows preview support so you can see the thumbnail picture rather than just seeing the "TGA logo" or something similar in the Windows file explorer.
  • PNG's seem to be built for handling transparency and alpha channels.
And the only downside that I've found just looking through forums is that it only supports up to 16 bits per channel, but I've never seen a texture in a game be 32 bits per channel. Also, with some engines it gets converted into DDS anyway. 

So if anyone could let me know of any downsides that I don't know of, or anything else I should take into consideration I would really appreciate it. 

Thanks!

Replies

  • CharacterCarl
    Options
    Offline / Send Message
    CharacterCarl greentooth
    The only downside I know of is in the way Photoshop handles PNG transparency. When exporting, by default, PS does not retain color information where the image is transparent. This will become problematic as soon as you want use the alpha for anything else than actual transparency after export (for masks for example).
    Also whereas TGAs will import with a separate alpha channel to control transparency, PNGs will not. You can "extract" the alpha channel using Layer->Layer Mask->From Transparency from a PNG or use a plug-in like SuperPNG. This also allows you to use the alpha channel for transparency and avoid transparency compression on export.
    Most engines will compress textures on import, so usually it doesn't make a difference which file format you use as long as they are lossless (PNG/TGA, etc.).
    If you want explorer thumbnails for TGAs  in the explorer though, SageThumbs could be of help.
  • Zack Maxwell
    Options
    Offline / Send Message
    Zack Maxwell interpolator
    UE4 doesn't seem to handle PNGs well. They get all light and washed out on import. I always have to use TGAs with it.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    • PNG's are using more commonly in other fields like the web, photography, etc
    • PNG's have built in windows preview support so you can see the thumbnail picture rather than just seeing the "TGA logo" or something similar in the Windows file explorer
    • PNG's seem to be built for handling transparency and alpha channels.

    The first two points are irrelevant.
    On the third point : true, but the format specs dictate that Photoshop opens the channel as transparent pixels as opposed to a regular, readable alpha channel. This alone will cause you a great deal of trouble if you need to edit something after the fact. PNG also save extremely slowly at high pixel dimensions.

    All that said, nothing prevents you from experimenting with your pipeline - you will probably quickly run into some issues first-hand, and that's the best way to make an informed decision after all :) 
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] polycounter lvl 2
    I appreciate all the the feedback, guys. I'll take it all into consideration. 
  • radiancef0rge
    Options
    Offline / Send Message
    radiancef0rge ngon master
    Grimwolf said:
    UE4 doesn't seem to handle PNGs well. They get all light and washed out on import. I always have to use TGAs with it.
    This sounds like a srgb problem
  • Eric Chadwick
    Options
    Offline / Send Message
    We talked about this same subject recently in another thread. Worth a read.
    http://polycount.com/discussion/175048/targa-or-png-for-unity
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] polycounter lvl 2
    We talked about this same subject recently in another thread. Worth a read.
    http://polycount.com/discussion/175048/targa-or-png-for-unity
    Thanks. I'll take a look. 
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Grimwolf said:
    UE4 doesn't seem to handle PNGs well. They get all light and washed out on import. I always have to use TGAs with it.
    This sounds like a srgb problem
    Ue4 doesn't like 16bit per channel png - or at least didn't recently - it seems to upset the srgb interpretation thing and they come out all milky.
    This may be what you're seeing - there are also issues with substance output in some cases.  
    You can however make PNGs work perfectly fine in ue4

    I Assume they'll fix the 16bit thing eventually because it's ridiculous. 


  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    poopipe said:
    Grimwolf said:
    UE4 doesn't seem to handle PNGs well. They get all light and washed out on import. I always have to use TGAs with it.
    This sounds like a srgb problem
    Ue4 doesn't like 16bit per channel png - or at least didn't recently - it seems to upset the srgb interpretation thing and they come out all milky.
    This may be what you're seeing - there are also issues with substance output in some cases.  
    You can however make PNGs work perfectly fine in ue4

    I Assume they'll fix the 16bit thing eventually because it's ridiculous. 



    This, bad handling of 16bits png. Normal map are fine because it has been fixed. I reported the issue too for regular PNG (aka BaseColor) but don't know if it has been fixed recently. Another problem with PNG in UE4 is that by default it will discard pixels where the alpha (transparency) is at 0 (black). This is very annoying but can be disabled by editing the source code of the engine. That require a custom build, see : http://www.froyok.fr/blog/2015-01-ue4-my-engine-modifications .

    The native support of PNGs in Photoshop is really slow to save in this format, but that's more reasonable in our software (Substance Tools) : 2K textures should be fine, 4K/8K will start to take a bit of time.
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] polycounter lvl 2
    Froyok said:
    poopipe said:
    Grimwolf said:
    UE4 doesn't seem to handle PNGs well. They get all light and washed out on import. I always have to use TGAs with it.
    This sounds like a srgb problem
    Ue4 doesn't like 16bit per channel png - or at least didn't recently - it seems to upset the srgb interpretation thing and they come out all milky.
    This may be what you're seeing - there are also issues with substance output in some cases.  
    You can however make PNGs work perfectly fine in ue4

    I Assume they'll fix the 16bit thing eventually because it's ridiculous. 



    This, bad handling of 16bits png. Normal map are fine because it has been fixed. I reported the issue too for regular PNG (aka BaseColor) but don't know if it has been fixed recently. Another problem with PNG in UE4 is that by default it will discard pixels where the alpha (transparency) is at 0 (black). This is very annoying but can be disabled by editing the source code of the engine. That require a custom build, see : http://www.froyok.fr/blog/2015-01-ue4-my-engine-modifications .

    The native support of PNGs in Photoshop is really slow to save in this format, but that's more reasonable in our software (Substance Tools) : 2K textures should be fine, 4K/8K will start to take a bit of time.
    Base Color PNG in UE4 hasn't been fixed it looks like. I just ran into that problem.
Sign In or Register to comment.