1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-14 20:00:17 +02:00

# Compression Commit

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
This commit is contained in:
ExeVirus
2021-01-23 07:28:20 -05:00
parent a57723df7d
commit f9ca183f2a
827 changed files with 88657 additions and 89231 deletions

View File

@ -1,114 +1,111 @@
# Blender v2.73 (sub 0) OBJ File: 'plasmascreen.blend'
# www.blender.org
o Cylinder
v -1.500000 -0.312500 0.500000
v -1.500000 -0.312500 0.375000
v 1.500000 -0.312500 0.375000
v 1.500000 -0.312500 0.500000
v -1.500000 1.500000 0.500000
v -1.500000 1.500000 0.375000
v 1.500000 1.500000 0.375000
v 1.500000 1.500000 0.500000
v -1.312500 -0.125000 0.437500
v 1.375000 1.375000 0.375000
v -1.312500 1.312500 0.437500
v 1.375000 -0.187500 0.375000
v -1.375000 1.375000 0.375000
v 1.312500 -0.125000 0.437500
v -1.375000 -0.187500 0.375000
v 1.312500 1.312500 0.437500
v 1.500000 1.375000 0.375000
v 1.500000 -0.187500 0.375000
v -1.500000 1.375000 0.375000
v -1.500000 -0.187500 0.375000
v -1.312500 -0.187500 0.375000
v -1.312500 1.375000 0.375000
v 1.312500 -0.187500 0.375000
v 1.312500 1.375000 0.375000
v -1.375000 -0.125000 0.375000
v -1.375000 1.312500 0.375000
v 1.375000 -0.125000 0.375000
v 1.375000 1.312500 0.375000
v -1.312811 -0.125310 0.437500
v -1.312811 1.312810 0.437500
v 1.312811 -0.125310 0.437500
v 1.312811 1.312810 0.437500
vt 0.953125 0.984375
vt 0.921875 0.984375
vt 0.921875 0.531250
vt 0.953125 0.531250
vt 0.906250 0.984375
vt 0.875000 0.984375
vt 0.875000 0.531250
vt 0.906250 0.531250
vt 0.812500 0.984375
vt 0.781250 0.984375
vt 0.781250 0.593750
vt 0.812500 0.593750
vt 0.015625 0.953125
vt 0.765625 0.953125
vt 0.765625 0.984375
vt 0.015625 0.984375
vt 0.015625 0.812500
vt 0.765625 0.812500
vt 0.765625 0.843750
vt 0.015625 0.843750
vt 0.765625 0.796875
vt 0.015625 0.796875
vt 0.015625 0.343750
vt 0.765625 0.343750
vt 0.828125 0.593750
vt 0.859375 0.593750
vt 0.859375 0.984375
vt 0.828125 0.984375
vt 0.015625 0.890625
vt 0.015625 0.859375
vt 0.765625 0.859375
vt 0.765625 0.890625
vt 0.015625 0.937500
vt 0.015625 0.906250
vt 0.765625 0.906250
vt 0.765625 0.937500
vt 0.031250 0.296875
vt 0.031250 0.281250
vt 0.687500 0.281250
vt 0.687500 0.296875
vt 0.687500 0.312500
vt 0.687500 0.328125
vt 0.031250 0.328125
vt 0.031250 0.312500
vt 0.375000 0.250000
vt 0.375000 0.265625
vt 0.015625 0.265625
vt 0.015625 0.250000
vt 0.703125 0.296875
vt 0.703125 0.281250
vt 0.015625 0.234375
vt 0.015625 0.218750
vt 0.375000 0.218750
vt 0.375000 0.234375
vt 0.703125 0.328125
vt 0.703125 0.312500
vt 0.015625 0.328125
vt 0.015625 0.312500
vt 0.015625 0.281250
vt 0.015625 0.296875
vt 1.000000 1.000000
vt -0.000000 1.000000
vt -0.000000 -0.000000
vt 1.000000 -0.000000
vn -1.000000 0.000000 0.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 0.707100 -0.707100
vn 0.000000 -0.707100 -0.707100
vn -0.707100 0.000000 -0.707100
vn 0.707100 0.000000 -0.707100
vn 0.000000 -0.707100 0.707100
g Cylinder_Cylinder_case
v -1.5 -0.312 0.5
v -1.5 -0.312 0.375
v 1.5 -0.312 0.375
v 1.5 -0.312 0.5
v -1.5 1.5 0.5
v -1.5 1.5 0.375
v 1.5 1.5 0.375
v 1.5 1.5 0.5
v -1.312 -0.125 0.438
v 1.375 1.375 0.375
v -1.312 1.313 0.438
v 1.375 -0.187 0.375
v -1.375 1.375 0.375
v 1.313 -0.125 0.438
v -1.375 -0.187 0.375
v 1.313 1.313 0.438
v 1.5 1.375 0.375
v 1.5 -0.187 0.375
v -1.5 1.375 0.375
v -1.5 -0.187 0.375
v -1.312 -0.187 0.375
v -1.312 1.375 0.375
v 1.313 -0.187 0.375
v 1.313 1.375 0.375
v -1.375 -0.125 0.375
v -1.375 1.313 0.375
v 1.375 -0.125 0.375
v 1.375 1.313 0.375
v -1.313 -0.125 0.438
v -1.313 1.313 0.438
v 1.313 -0.125 0.438
v 1.313 1.313 0.438
vt 0.953 0.984
vt 0.922 0.984
vt 0.922 0.531
vt 0.953 0.531
vt 0.906 0.984
vt 0.875 0.984
vt 0.875 0.531
vt 0.906 0.531
vt 0.813 0.984
vt 0.781 0.984
vt 0.781 0.594
vt 0.813 0.594
vt 0.016 0.953
vt 0.766 0.953
vt 0.766 0.984
vt 0.016 0.984
vt 0.016 0.813
vt 0.766 0.813
vt 0.766 0.844
vt 0.016 0.844
vt 0.766 0.797
vt 0.016 0.797
vt 0.016 0.344
vt 0.766 0.344
vt 0.828 0.594
vt 0.859 0.594
vt 0.859 0.984
vt 0.828 0.984
vt 0.016 0.891
vt 0.016 0.859
vt 0.766 0.859
vt 0.766 0.891
vt 0.016 0.938
vt 0.016 0.906
vt 0.766 0.906
vt 0.766 0.938
vt 0.031 0.297
vt 0.031 0.281
vt 0.688 0.281
vt 0.688 0.297
vt 0.688 0.313
vt 0.688 0.328
vt 0.031 0.328
vt 0.031 0.313
vt 0.375 0.25
vt 0.375 0.266
vt 0.016 0.266
vt 0.016 0.25
vt 0.703 0.297
vt 0.703 0.281
vt 0.016 0.234
vt 0.016 0.219
vt 0.375 0.219
vt 0.375 0.234
vt 0.703 0.328
vt 0.703 0.313
vt 0.016 0.328
vt 0.016 0.313
vt 0.016 0.281
vt 0.016 0.297
vt 1 1
vt 0 1
vt 0 0
vt 1 0
vn -1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 1 0
vn 0 -1 0
vn 0 0 1
vn 0 0.707 -0.707
vn 0 -0.707 -0.707
vn -0.707 0 -0.707
vn 0.707 0 -0.707
vn 0 -0.707 0.707
g 1
s off
f 5/1/1 6/2/1 2/3/1 1/4/1
f 7/5/2 8/6/2 4/7/2 3/8/2
@ -131,5 +128,5 @@ f 10/57/8 16/44/8 24/43/8
f 28/58/9 16/44/9 10/57/9
f 12/59/9 14/37/9 27/60/9
f 23/38/11 12/59/11 14/37/11
g Cylinder_Cylinder_screen
g 2
f 30/61/3 32/62/3 31/63/3 29/64/3