1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-16 04:30:23 +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,86 +1,81 @@
# Blender v2.69 (sub 0) OBJ File: ''
# www.blender.org
mtllib computer_laptop.mtl
o Cube.001
v -0.340277 0.022636 0.335290
v -0.340277 0.013075 0.362499
v 0.332320 0.022636 0.335292
v 0.332320 -0.432772 0.182772
v 0.332320 0.013075 0.362501
v -0.340276 -0.499994 -0.312651
v -0.340276 -0.432772 -0.312651
v 0.332321 -0.499994 -0.312650
v -0.340277 -0.499994 0.182771
v 0.332320 -0.499994 0.182772
v -0.340277 -0.432772 0.182771
v -0.340278 -0.432772 0.209979
v 0.332320 -0.432772 0.209981
v 0.332320 -0.499994 0.209981
v -0.340278 -0.499994 0.209979
v -0.319957 -0.417924 0.194820
v -0.319957 -0.001053 0.334433
v 0.312000 -0.417925 0.194821
v -0.340277 -0.432772 -0.159321
v 0.332321 -0.432772 -0.312650
v 0.311999 -0.001054 0.334434
v 0.332321 -0.432772 -0.159320
vt 0.682604 0.005242
vt 0.682603 0.021207
vt 0.310265 0.005245
vt 0.044426 0.009206
vt 0.310266 0.021211
vt 0.753340 0.119988
vt 0.810356 0.119988
vt 0.753340 0.597765
vt 0.856851 0.982221
vt 0.745750 0.982220
vt 0.856851 0.831387
vt 0.948453 0.009205
vt 0.878028 0.982221
vt 0.878028 0.831387
vt 0.983700 0.982221
vt 0.862953 0.831387
vt 0.862953 0.982221
vt 0.728292 0.490807
vt 0.728292 0.989869
vt 0.010900 0.490807
vt 0.831643 0.129995
vt 0.982007 0.129995
vt 0.831643 0.789586
vt 0.758249 0.754841
vt 0.758228 0.812823
vt 0.756060 0.752868
vt 0.798519 0.812617
vt 0.756052 0.814797
vt 0.798577 0.754909
vt 0.800285 0.814587
vt 0.707729 0.114386
vt 0.707729 0.471212
vt 0.006162 0.114385
vt 0.345650 0.099088
vt 0.497058 0.032709
vt 0.497058 0.099088
vt 0.990661 0.099453
vt 0.838275 0.032645
vt 0.990661 0.032645
vt 0.007709 0.008663
vt 0.012705 0.022873
vt 0.983559 0.009737
vt 0.943457 0.023414
vt 0.049421 0.023416
vt 0.810356 0.597766
vt 0.745750 0.831387
vt 0.983700 0.831387
vt 0.010900 0.989869
vt 0.982007 0.789586
vt 0.800332 0.752938
vt 0.006162 0.471212
vt 0.007844 0.099088
vt 0.007844 0.032709
vt 0.498289 0.099453
vt 0.498289 0.032646
vt 0.978563 0.023946
usemtl Material.001
v -0.34 0.023 0.335
v -0.34 0.013 0.362
v 0.332 0.023 0.335
v 0.332 -0.433 0.183
v 0.332 0.013 0.363
v -0.34 -0.5 -0.313
v -0.34 -0.433 -0.313
v 0.332 -0.5 -0.313
v -0.34 -0.5 0.183
v 0.332 -0.5 0.183
v -0.34 -0.433 0.183
v -0.34 -0.433 0.21
v 0.332 -0.433 0.21
v 0.332 -0.5 0.21
v -0.34 -0.5 0.21
v -0.32 -0.418 0.195
v -0.32 -0.001 0.334
v 0.312 -0.418 0.195
v -0.34 -0.433 -0.159
v 0.332 -0.433 -0.313
v 0.312 -0.001 0.334
v 0.332 -0.433 -0.159
vt 0.683 0.005
vt 0.683 0.021
vt 0.31 0.005
vt 0.044 0.009
vt 0.31 0.021
vt 0.753 0.12
vt 0.81 0.12
vt 0.753 0.598
vt 0.857 0.982
vt 0.746 0.982
vt 0.857 0.831
vt 0.948 0.009
vt 0.878 0.982
vt 0.878 0.831
vt 0.984 0.982
vt 0.863 0.831
vt 0.863 0.982
vt 0.728 0.491
vt 0.728 0.99
vt 0.011 0.491
vt 0.832 0.13
vt 0.982 0.13
vt 0.832 0.79
vt 0.758 0.755
vt 0.758 0.813
vt 0.756 0.753
vt 0.799 0.813
vt 0.756 0.815
vt 0.799 0.755
vt 0.8 0.815
vt 0.708 0.114
vt 0.708 0.471
vt 0.006 0.114
vt 0.346 0.099
vt 0.497 0.033
vt 0.497 0.099
vt 0.991 0.099
vt 0.838 0.033
vt 0.991 0.033
vt 0.008 0.009
vt 0.013 0.023
vt 0.984 0.01
vt 0.943 0.023
vt 0.049 0.023
vt 0.81 0.598
vt 0.746 0.831
vt 0.984 0.831
vt 0.011 0.99
vt 0.982 0.79
vt 0.8 0.753
vt 0.006 0.471
vt 0.008 0.099
vt 0.008 0.033
vt 0.498 0.099
vt 0.498 0.033
vt 0.979 0.024
s off
f 1/1 2/2 3/3
f 4/4 3/3 5/5