Home Technical Talk

Packing 4 channels question

polycounter lvl 10
Offline / Send Message
melviso polycounter lvl 10
From this vid on photogammentry,
https://www.youtube.com/watch?v=U_WaqCBp9zo
RGBA was used for the detailed textures, RG for Normal, B for roughness, A for Color.

From here, someone wrote:https://answers.unrealengine.com/questions/699690/is-it-possible-to-use-all-4-channels-rgba-in-textu.html

''yes, you can use all 4 texture channels. but please keep in mind, that using only 3 channels allows to compress texture into DXT1-format, while additional alpha will force you to compress tex into DXT5-format, which is twice bigger in size. for instance, you have tex 512x512. In DXT1 it will take ~170 Kb, while in DXT5 it will consume ~340 Kb.''

So I am wondering is this still an issue or the engine used by battlefront devs doesn't make this an issue. 

Replies

  • Ghogiel
    Options
    Offline / Send Message
    Ghogiel greentooth
    Assuming the same resolution, a DXT RGBA, ie DXT5 (BC3), is double the file size compared to a DXT1 (BC1) with only 3 channels (RGB).

    I'd guess they probably made a lot of use of BC7 as well. Save a texture in each format to see the difference in file size yourself.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Tried it. Should have done that. Thanks.
    The one without alpha was 128kb, one with alpha 256kb. Seems both have 128kb on import into ue4. There isn't any difference.
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    Battlefield likely valued the rendering time over the memory cost. If you use too many texture samples already, this might be smarter. Also might be better for workflow (or not) and in the end you have to release a game
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Very true. I agree it is a smarter move and makes organisation of textures and streamlining the workflow to be more efficient. Their environments seem to perform well and looks very stunning. 
    Also  png files does not work well with this method. The alpha channel for color shows completely white when imported to ue4. TGA files saved out at 32 bit seems to be the only way to get the alpha channel loaded with the texture to work.

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Keep in mind that this may not be an issue with small textures but it can quickly get crazy with 4k ones. You are essentially using double memory when you have an alpha channel. So generally I would not do this as using a separated texture would allow you to pack 2 more extra textures. These 2 have the same memory size, but the separated texture method allows to pack 2 more things if you want to. So using an alpha channel is a waste in my opinion. Of course you can have a different opinion.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Thanks for the info, Obscura. Now that you have mentioned it. Since its double memory, using a 3 channel texture instead of just an alpha channel may be the best move.
    More textures to pack, the more textures can be utilized towards more realistic looking materials and memory is saved.
Sign In or Register to comment.