Given the sizes, positions and orientations of cubes in 3D space, finds cube faces which are hidden from view and removes them. Disabling rendering for hidden faces nets a significant performance boost with no change in appearance.
A significant improvement over the Krunker Editor face optimizer, which can only handle one-on-one face overlaps.
python3
and gcc
must be installed
# clone repo
git clone https://github.com/Infinitifall/face-remove
cd face-remove
# build
make
Paste your map export in input.json
# run
python3 run.py
To determine if a face is hidden we check if all points on an
In the image below, the yellow cube and the blue cube will have one face each disabled, as they are hidden inside the purple and the green cubes respectively.
In the image below, the orange cube will have one face disabled, as it is hidden by the other three cubes put together.