Doom3 -- High and Ultra settings -- compression

Mark0 said:
How about trying PNG also, instead of a general purpose compressor like ZIP / RAR? It seems the most efficent & handy way to store a bitmap losslessy.

Uhm, and how would you use PNG to store compressed textures? It's not a regular bitmap anymore.
 
Dio said:
If going this far I'd suggest a few other things to try:
- tile the endpoint data a bit for better locality of reference. Even 2x2 blocks would probably help.
- store all the R's then all the G's then all the B's, as they probably correlate better than with each other.
- possibly store the first and second endpoints separately too.

I quickly tested splitting first and second end point. It didn't do much for the RAR compression, but did quite a lot with ZIP. I didn't keep the test file I used for yesterdays testing, so this is with another file. Grabbed a regular wood texture this time, cropped some stuff out of a photo yesterday.

Original: 131,200
Rar: 42,904 - 32.7%
Zip: 73,705 - 56.2%

With color/index splitting only:
Rar: 37,259 - 28.4%
Zip: 66,364 - 50.6%

With color/index splitting and endpoint splitting:
Rar: 36,389 - 27.7%
Zip: 55,559 - 42.3%


Regarding locality. Maybe it could even be expanded to work with mipmap in a pyramid fashion? 2x2 block from first mipmap, then the corresponding block from the mipmap below.
 
Humus said:
Uhm, and how would you use PNG to store compressed textures? It's not a regular bitmap anymore.
Well, no, it's not, but isn't PNG supposed to be lossless? It might not work quite as well on a compressed texture, but since it's aligned so that it could be interpreted as a bitmap, I don't see why you couldn't try using PNG.
 
Well, no, it's not, but isn't PNG supposed to be lossless?
It also uses a generic variation of the same compression algorythm as Zip (and maybe also Rar, don't remember right now).
It'd still make interesting experiment if someone tries it I guess, but I predict it'll do worse then either general purpose archiver did. :p
 
Well, ok, I guess you could pass a 512x512 DXT1 texture as 512x256 L8 to the compressor. But I suspect the compression rate of this will be worse than rar or zip.

Edit: Indeed, it's far worse.

Original: 131,200
Rar: 42,904 - 32.7%
Zip: 73,705 - 56.2%
Png: 109,217 - 83.2%

This is no wonder. DTX1 data interpreted as regular image data is not very compressible. There's little correlation between near pixels in such an image. The picture looks like any random garbage.
 
Back
Top