forked from mtcontrib/homedecor_modpack
f9ca183f2a
This commit performs both lossless and lossy compression on every .obj and .png in homedecor. The .png files were all 100% losslessly compressed using ect.exe and optipng.exe (more details below) at maximum settings. The .obj files were lossy-compressed so that comments were removed, trailing 000's were removed and all numbers rounded to 3 decimal places max. Blender exports at 6 decimal places but for minetest, 3 decimal places is the absolute maximum a person with anything under a 256K screen will ever need. ## Results ``` Original entire modpack size: 6343.5 KB New entire modpack size: 5312.2 KB Total Reduction: 1031.3 KB (16.3% less) ``` Please note that actual media size is likely more like 4,500 KB so media reduction is more around 20-25%. ## Details / What actions were actually performed Used these programs: https://github.com/ExeVirus/Compress-Obj https://sourceforge.net/projects/optipng/ https://github.com/fhanau/Efficient-Compression-Tool Ran this command on every .obj: (fast) ``` luajit.exe compress.lua -f <file> -precision 3 ``` Ran these commands on every .png: (slow) ``` ect.exe -9 -strip --allfilters-b <file> optipng.exe -o7 -strip all -clobber <file> ``` Note that for future compression, I recommend only using optipng.exe instead of both. ECT can get better results but it takes a LOT longer and only ever saves another 1-2% of the file size. Not worth an extra 10-20 seconds per texture file in my opinion. ## Time spent Roughly 2 Hours from start to finish + commit + PR
160 lines
3.0 KiB
Plaintext
160 lines
3.0 KiB
Plaintext
v -0.5 -0.5 0.5
|
|
v -0.5 -0.5 0.375
|
|
v 0.5 -0.5 0.375
|
|
v -0.5 0.5 0.5
|
|
v -0.5 0.5 0.375
|
|
v 0.5 0.5 0.375
|
|
v -0.437 -0.5 0.5
|
|
v -0.437 -0.5 0.375
|
|
v -0.437 0.5 0.5
|
|
v -0.437 0.5 0.375
|
|
v -0.437 0.5 0.406
|
|
v -0.437 -0.5 0.406
|
|
v 0.375 0.5 0.406
|
|
v 0.375 -0.5 0.406
|
|
v -0.437 0.5 0.469
|
|
v -0.437 -0.5 0.469
|
|
v 0.375 0.5 0.469
|
|
v 0.375 -0.5 0.469
|
|
v -0.437 0.438 0.406
|
|
v 0.375 0.438 0.406
|
|
v -0.437 0.438 0.469
|
|
v 0.375 0.438 0.469
|
|
v -0.437 -0.437 0.406
|
|
v 0.375 -0.437 0.406
|
|
v -0.437 -0.437 0.469
|
|
v 0.375 -0.437 0.469
|
|
v -0.437 0.438 0.438
|
|
v -0.437 -0.437 0.438
|
|
v 0.5 -0.5 -0.5
|
|
v 0.5 -0.5 0.5
|
|
v 0.375 -0.5 0.5
|
|
v 0.375 -0.5 -0.5
|
|
v 0.5 0.5 -0.5
|
|
v 0.5 0.5 0.5
|
|
v 0.375 0.5 0.5
|
|
v 0.375 0.5 -0.5
|
|
v 0.5 -0.5 -0.437
|
|
v 0.375 -0.5 -0.437
|
|
v 0.5 0.5 -0.437
|
|
v 0.375 0.5 -0.437
|
|
v 0.406 0.5 0.375
|
|
v 0.406 -0.5 0.375
|
|
v 0.406 0.5 -0.437
|
|
v 0.406 -0.5 -0.437
|
|
v 0.469 0.5 0.375
|
|
v 0.469 -0.5 0.375
|
|
v 0.469 0.5 -0.437
|
|
v 0.469 -0.5 -0.437
|
|
v 0.406 0.438 0.375
|
|
v 0.406 0.438 -0.437
|
|
v 0.469 0.438 0.375
|
|
v 0.469 0.438 -0.437
|
|
v 0.406 -0.437 0.375
|
|
v 0.406 -0.437 -0.437
|
|
v 0.469 -0.437 0.375
|
|
v 0.469 -0.437 -0.437
|
|
v 0.375 0.438 0.438
|
|
v 0.438 0.438 -0.437
|
|
v 0.375 -0.437 0.438
|
|
v 0.438 -0.437 -0.437
|
|
v 0.375 -0.5 0.375
|
|
v 0.375 0.5 0.375
|
|
v 0.438 0.438 0.375
|
|
v 0.438 -0.437 0.375
|
|
vt 0.875 0.938
|
|
vt 1 0.938
|
|
vt 1 1
|
|
vt 0.875 1
|
|
vt 0.063 0
|
|
vt 0.063 0.125
|
|
vt 0 0.125
|
|
vt 0 0
|
|
vt 0.875 0.125
|
|
vt 0.875 0
|
|
vt 1 0
|
|
vt 1 0.125
|
|
vt 0.906 0.125
|
|
vt 0.969 0.125
|
|
vt 0.969 0.938
|
|
vt 0.906 0.938
|
|
vt 0.875 0.094
|
|
vt 0.063 0.094
|
|
vt 0.063 0.031
|
|
vt 0.875 0.031
|
|
vt 1 0.063
|
|
vt 0.875 0.063
|
|
vt 0.063 0.875
|
|
vt 0.063 1
|
|
vt 0 1
|
|
vt 0 0.875
|
|
vt 0.875 0.875
|
|
vt 1 0.875
|
|
vt 0.969 0.063
|
|
vt 0.969 0.875
|
|
vt 0.906 0.875
|
|
vt 0.906 0.063
|
|
vt 0.875 0.906
|
|
vt 0.875 0.969
|
|
vt 0.063 0.969
|
|
vt 0.063 0.906
|
|
vt 0.063 0.938
|
|
vt 0.063 0.063
|
|
vt 0.938 1
|
|
vt 0.125 1
|
|
vt 0.125 0.938
|
|
vt 0.938 0.938
|
|
vt 0.938 0.063
|
|
vt 0.125 0.063
|
|
vt 0.125 0
|
|
vt 0.938 0
|
|
vn 0 1 0
|
|
vn 0 -1 0
|
|
vn -1 0 0
|
|
vn 1 0 0
|
|
vn 0 0 1
|
|
vn 0 0 -1
|
|
g 1
|
|
s off
|
|
f 40/1/1 39/2/1 33/3/1 36/4/1
|
|
f 9/5/1 10/6/1 5/7/1 4/8/1
|
|
f 62/9/1 35/10/1 34/11/1 6/12/1
|
|
f 41/13/1 45/14/1 47/15/1 43/16/1
|
|
f 54/16/1 53/13/1 55/14/1 56/15/1
|
|
f 13/17/1 11/18/1 15/19/1 17/20/1
|
|
f 26/20/1 24/17/1 23/18/1 25/19/1
|
|
g 2
|
|
f 32/10/2 29/11/2 37/21/2 38/22/2
|
|
f 8/23/2 7/24/2 1/25/2 2/26/2
|
|
f 61/27/2 3/28/2 30/3/2 31/4/2
|
|
f 52/29/2 51/30/2 49/31/2 50/32/2
|
|
f 46/30/2 42/31/2 44/32/2 48/29/2
|
|
f 20/33/2 22/34/2 21/35/2 19/36/2
|
|
f 14/33/2 18/34/2 16/35/2 12/36/2
|
|
g 3
|
|
f 5/4/3 2/10/3 1/11/3 4/3/3
|
|
f 50/37/3 49/1/3 41/4/3 43/24/3
|
|
f 44/5/3 42/10/3 53/22/3 54/38/3
|
|
f 32/8/3 38/5/3 40/24/3 36/25/3
|
|
f 61/10/3 31/11/3 35/3/3 62/4/3
|
|
g 4
|
|
f 47/39/4 45/40/4 51/41/4 52/42/4
|
|
f 56/43/4 55/44/4 46/45/4 48/46/4
|
|
f 37/46/4 29/11/4 33/3/4 39/39/4
|
|
f 30/8/4 3/45/4 6/40/4 34/25/4
|
|
f 8/45/4 10/40/4 9/25/4 7/8/4
|
|
f 64/44/4 60/43/4 58/42/4 63/41/4
|
|
g 5
|
|
f 31/10/5 30/11/5 34/3/5 35/4/5
|
|
f 38/10/5 37/11/5 39/3/5 40/4/5
|
|
f 7/5/5 9/24/5 4/25/5 1/8/5
|
|
f 17/4/5 15/24/5 21/37/5 22/1/5
|
|
f 26/22/5 25/38/5 16/5/5 18/10/5
|
|
g 6
|
|
f 36/40/6 33/25/6 29/8/6 32/45/6
|
|
f 3/8/6 61/45/6 62/40/6 6/25/6
|
|
f 2/11/6 5/3/6 10/39/6 8/46/6
|
|
f 20/41/6 19/42/6 11/39/6 13/40/6
|
|
f 24/44/6 14/45/6 12/46/6 23/43/6
|
|
f 59/44/6 28/43/6 27/42/6 57/41/6
|