Home Adobe Substance

PNG Vs. TGA question in Substance

polycounter lvl 10
Offline / Send Message
supremedalek925 polycounter lvl 10
Hello. Here's something I've been trying to figure out a workaround for.  I'm outputting my textures from Substance Painter, and I've noticed that a PNG exports as 16 bit, but a TGA exports as 8 bit.  I prefer using TGA in Unreal 4, but the TGA export from Substance Painter looks oversaturated and muddy in Unreal 4.

I have tried opening the TGA in Photoshop and changing the image mode to 16 bit to see if that improves the in engine quality, but then I lose the ability to save as a TGA.  If anyone has a suggestion I would be appreciative. 

Replies

  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    You can't save at higher than 8bits/channel with the targa format.
  • supremedalek925
    Options
    Offline / Send Message
    supremedalek925 polycounter lvl 10
    m4dcow said:
    You can't save at higher than 8bits/channel with the targa format.
    Then why do people say targa and png look practically identical in engine when in my experience I get a bad result when using tga exported from Substance?
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    IIRC ue4 doesn't support 16bit textures (for materials) and the engine converts them to 8bit. I remember seeing some people with problems with washed out textures in ue4 with the sRGB check box not doing what it was supposed to.

    As for the TGA looking dull and oversaturated it might be that the sRGB property isn't checked for that texture, or even that the PNG is actually washed out when it is imported.

    The lighting in the scene itself could be darkening things also.

    I guess open both versions in Photoshop and confirm they visually look the same (with one being 16bit vs 8bit) and then open them up in engine and see how they look, also try toggling sRGB check box, this should be on for an albedo texture but as I mentioned can sometimes it doesn't work as expected or images import with it unchecked.
  • supremedalek925
    Options
    Offline / Send Message
    supremedalek925 polycounter lvl 10
    m4dcow said:
    IIRC ue4 doesn't support 16bit textures (for materials) and the engine converts them to 8bit. I remember seeing some people with problems with washed out textures in ue4 with the sRGB check box not doing what it was supposed to.

    As for the TGA looking dull and oversaturated it might be that the sRGB property isn't checked for that texture, or even that the PNG is actually washed out when it is imported.

    The lighting in the scene itself could be darkening things also.

    I guess open both versions in Photoshop and confirm they visually look the same (with one being 16bit vs 8bit) and then open them up in engine and see how they look, also try toggling sRGB check box, this should be on for an albedo texture but as I mentioned can sometimes it doesn't work as expected or images import with it unchecked.
    Ah, interesting.  I have found that my base color PNG looks almost completely the same whether SRGB is checked or not, however, unchecking SRGB for my TGA base color texture fixes the oversaturation, making it look the same as the PNG.
  • radiancef0rge
    Options
    Offline / Send Message
    radiancef0rge ngon master
    Correct. The 16-bits per channel image has no gamma curve (tonemapping) applied to it. 8-bit images are stored with a gamma curve is applied. This is  back when photographs first became digital, in order to represent on a computer screen what you see in real life (because a lack of bit-depth in displays) it was found that applying a curve to the image showed results closer to what we would expect. Then you have 16-bit images and there is no gamma curve applied to them as the screen would not be able to represent the full gammut of colors anyway. 

    For images that are not storing data and don't require a lot of dit-depth, like for example color (albedo), its assumed you do not need high dynamic range textures. Most game engines and game pipelines assume you are using 8 bit albedo as it can be represented well. So for UE4 the correct image is actually the correct(er) tonemapped texture on the right . 

  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    There is a bug in UE4 regarding the import of 16bit PNG, they have a wrong sRGB correction. If you force your PNG to 8bits, it should fix the issue. The Targa format doesn't have the issue.
  • supremedalek925
    Options
    Offline / Send Message
    supremedalek925 polycounter lvl 10
    It's weird because now I'm finding that for my base color textures, the TGA looks too saturated in UE4, and the PNG looks too washed out. 



    SRGB is checked for the base color texture of each in UE4.  
  • radiancef0rge
    Options
    Offline / Send Message
    radiancef0rge ngon master
    The discrepancies are most likely post effects now
Sign In or Register to comment.