[This post has been split from the G3D model conversion topic on the Megaglest board, so as to avoid scattering the discussion.
-- John.d.h]I would anticipate the total megapack size when 7zipped has actually increased though?
(7zipping a BMP or TGA is typically better compressing than the GZip (deflate) used in PNG (even with the best PNG packer called
pngout).)
For fun I compressed megapack with
glest_mod_pack.py:
417.1 MB compressed to 156.0 MB (37.4%) -> /home/will/Games/megaglest-3.3.7.2.zip.xz
Out of curiosity I tried to get a rough idea of how much space
DDS would save.
My simple script running in techs/megapack found 106MB of TGA/BMP
before: 106456838, after: 18969576
Anyway, they all compress down to 18MB (that's how much RAM would be needed in the GPU to run it too)
The original TGA and BMP 7zipped to 21MB
And those DDS zipped to 6MB
#!/bin/bash
before=0
after=0
for f in `find -name *.bmp`
do
bef=$(stat -c%s "$f")
before=$((before+bef))
convert $f $f.tga
nvcompress -alpha $f.tga $f.dds
aft=$(stat -c%s "$f.dds")
after=$((after+aft))
echo $f $bef "->" $aft
rm $f.tga
done
for f in `find -name *.tga`
do
bef=$(stat -c%s "$f")
before=$((before+bef))
nvcompress -alpha $f $f.dds
aft=$(stat -c%s "$f.dds")
after=$((after+aft))
echo $f $bef "->" $aft
done
echo "before: $before, after: $after"