Masks texture compression considerably degrading textures

(UE 4.18.3)

I am using a packed texture with different noises into each channel (I need 4 channels RGBA). I noticed using the Masks texture compression (often recommended when using packed textures), the textures are considerably degraded when compared to the original (which can be seen more or less using the UserInterface2D compression settings). Of course the Masks compression performs better in terms of output size, but the quality degradation is questionable. See below for an example.

Can we control the compression ratio for each compression type ?

If your texture cannot handle DXT compression then you need to disable it. Use user interfrace or vector displacement mode. DXT compression does not have any compression ratio parameters.

DXT compression can’t handle channel packing so I just don’t pack non related channels to same textures. This way I can use BC4 compression for mask textures. It’s really good quality compression for grayscale input textures. When texture are not channel packed you can choose appropriate size per mask instead of just using same size for all.

More info about texture compression.

masks compression is just the regular compression that disables srgb. no benefit to using the masks compression generally.
try saving it as an alpha compression if its just a grayscale.

the compression for multi-channel packing basically packs/merges rgb together which results in quality loss. the only channel that does not have this is the alpha channel since thats basically a unique RGB channel altogether. it also doubles filesize when using alpha.
so its often better to not use alpha and combine the alpha channel texture with two others in a new rgb packed texture.

I’m curious at what point it’s worth switching compression types versus doubling the resolution of the texture.

If you are not packing textures, you need to use more texture samplers in the material, this is a major drawback. Thanks for the excellent link on texture compression !

So you mean the best way to pack masks is to use a 3 channels texture and DXT compression?

Indeed, would be good to make some measurements on this, however this may highly be texture dependent…

You’ll lose some in compression yes, but since these are generally simple masks/noise textures this often wont be noticed by players.

imho yes, unless you would need a whole new sample just for one additional map. In that case sometimes using the alpha can be beneficial.

You’ll still save some regular filesize and memory on this when channelpacking, but from experience you can get away with quite small texture sizes if they are used for masks or noise textures.

Use Shared texture samplers(clamp or wrap) instead “Fom Texture Asset”.

This doesnt decrease texture lookups though.