Hello,
I started wondering. Textures compressed by dxt1, dxt5,... always has the same file size if resolution is the same. Isn't that the more detail on the texture, the bigger loss of data (higher compression)?
My assumption is straight from jpg compression, where making big parts of texture highly simplified (i.e. flat colors), the final size is much smaller with the same compression level (Photoshop)/percentage(irfanview). So... keeping constant file size and by simplifying texture of unsubstantial parts (i.e. space between uv islands) we can get lower compression of substantial parts. Are the same rules apply to DXT?
Replies
So yeah, fine detail will often get more noticeable artifacts than medium detail due to the limitations on the gradient of colours across the chunk, but at the same time, any large or subtle gradients or details also get more noticeably compressed due to the lowering of the bit depth.
The chunks all store the same volume of data regardless of what's there in the texture, which is why the textures don't get smaller as there is less information in the texture to encode. Ultimately the texture is uncompressed by graphics card anyway, so the size on disk is really only really beneficial for storing and sending the textures around (less data = more things sent faster).
Also, if you start to introduce more complex encoding algorithms (variable compression based on how detailed the texture is, etc - like PNG) then you also have to make the decoding process more complex and take longer (loading times increase/streaming issues). And you have to have the hardware support those methods, too (more standards to adhere to).
The final size is always the same.
Subtle gradients get compressed badly. It's better to decrease normal map's intensity in material's settings instead of making it almost flat on the texture.
Compare gradients here:
http://www.reedbeta.com/blog/2012/02/12/understanding-bcn-texture-compression-formats/
BC1 = the most common DXT type