Home Technical Talk

Best PBR texture compression and channel layout

Offline / Send Message
Pinned
Hi! So I want to find the best possible setup for the following textures:
  • Albedo RGB
  • Opacity
  • Normal RG
  • Height
  • Emission RGB
  • Ambient Occlusion
  • Metallic
  • Roughness
I've prepared the initial layout, which is the best I can think of by myself, but I'd be happy to hear your suggestions on that. And I don't care if I'll have to use DirectX 11 / OpenGL 4 features. I want to keep the whole material under 16MB or 18MB at 2048x2048 resolution while maintaining it's decent quality. The layout:
  • BC1 RGB: Metallic + Roughness + Ambient Occlusion (2MiB)
  • BC1 RGB: Emission R + Emission G + Emission B (2MiB) (Optional and toggleable)
  • BC7 RGBA: Albedo R + Albedo  G + Albedo B + Opacity (4MiB)
  • BC5 RG: Normal R + Normal G (4MiB)
  • BC4 R: Height (2MiB)
Total: 14MiB (12MiB without emission)
Also is there a format that'd let me store Normal and Height in one texture?

Replies

  • RacePeaceDay
    Options
    Offline / Send Message
    RacePeaceDay polycounter lvl 6
    When I tried to pack normal map with other texture, it looked really bad. Default normal map compression looks better.

    If there are no metallic details, I would pack height instead of metal. Theres no reason to have full-black metal texture for brick wall, for example.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Typically i would try to put any kind of binary information, or information that doesn't require a lot of precision (metallic is a good example) in the blue channel, as that is the most heavily compressed.
  • Crimz8n
    Options
    Offline / Send Message
    When I tried to pack normal map with other texture, it looked really bad. Default normal map compression looks better.

    If there are no metallic details, I would pack height instead of metal. Theres no reason to have full-black metal texture for brick wall, for example.
    Well, actually I want to keep some flexibility when adjusting metallic factor and that's why I want to keep it there. Also height map should NOT be compressed using DXT1, as I think about that... Isn't height just as important as normal map? For example look how similar they are when using bump instead of normal mapping.
    Typically i would try to put any kind of binary information, or information that doesn't require a lot of precision (metallic is a good example) in the blue channel, as that is the most heavily compressed.
    Then what do you think about using ARM map instead of MRA? (That's a lot more awesome name tho!)
  • Eric Chadwick
    Options
    Offline / Send Message
    Roughness and Occlusion most of the time have much more information than Metalness (which is nearly always black or white, with few grays). So use that to your advantage.
  • rexo12
    Options
    Offline / Send Message
    rexo12 interpolator
    Crimz8n said:
    Then what do you think about using ARM map instead of MRA? (That's a lot more awesome name tho!)
    My understanding is that this is what's usually done. At the very least that's the default packing for Substance, and most example shaders i've seen use this scheme (although I mostly use UE4). 

  • RacePeaceDay
    Options
    Offline / Send Message
    RacePeaceDay polycounter lvl 6
    Is there difference between MRA and ARM? Both R and B have 5 bits.

    I want to keep some flexibility
    what you mean by that?
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    With BC7 the quality is almost as good as the uncompressed texture, provided you have the hardware and have accounted for codec times. BC7 essentially replaces 1-5 and can select modes based on the channel data so 'which map in which channel' isn't as big a deal in packing.
  • Crimz8n
    Options
    Offline / Send Message
    what you mean by that?
    I mean that I don't want to put metallic in DXT1 Alpha channel or skip it.
    With BC7 the quality is almost as good as the uncompressed texture, provided you have the hardware and have accounted for codec times. BC7 essentially replaces 1-5 and can select modes based on the channel data so 'which map in which channel' isn't as big a deal in packing.
    I want to save some space when using BC1 for ARM and emission. But if I could store normal and height together in 4MiB BC7 texture, then I'd go for BC7 ARM (smooth AO transition) and optional BC7 emission compression (but the gradient appears very rarely here). And the main issue is here, when Chris_F writes, that BC7 introduces cross talk between different texture channels and that's why it's not ideal for normal maps.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    I've also read that Normal maps using BC5 can result in black when the blue channel is dropped by the shader which results in a sort of multiply effect that can darken the NM.

    Same thread advised BC7 instead for NM. I think it was one of the Skyrim devs talking about their switch from the older DXTs.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Yeah... you could compress a normal map with DXT5 or something so you can put other info in the blue and alpha, but that typically leads to artefacts so you should only really do it as a last resort, and if you're able to cover up the artefacts with other means.
Sign In or Register to comment.