This repository has been archived on 2026-09-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Syplheed-Reborn/docs/re/data/mcol-verify.txt
Sylpheed RE agent c0a7033295 re: MCOL solved -- a closed triangle collision mesh in a uniform grid
The 0x50 header word, which the first section of this page had dismissed as "a
large value", is two u16 counts: vertices and triangles.  They give the two
remaining blocks their stride, and every derived length is exact in 11/11 --
len(0x54) == align16(12*nv), len(0x58) == align16(6*nt), and nt equals the
bounding-sphere count decoded last iteration.

Checks that cannot pass by accident:

  * sphere i is the TIGHT bounding sphere of triangle i, 4768/4768, with
    max|v-c|/r median 0.99990 (a fixed 1.0001 epsilon), against a 1.32%
    random-triangle control;
  * the mesh is watertight -- every edge shared by exactly two triangles,
    7152/7152, zero degenerate triangles, zero unreferenced vertices;
  * the two smallest objects are 8 vertices and 12 triangles whose positions
    are the eight +-250000 corners of the map bbox: a bare bounding cube.

The cell lists are a correct broad phase: with an exact triangle/box SAT test
only 3 overlapping triangles in 18 577 entries are absent, so a query walking
one cell's list cannot miss a hit.  The 730 conservative extras bracket the
builder's own test between exact-SAT and AABB, which retires the 18 unexplained
"sphere misses" from the previous commit as that same margin.

mcol_probe.py gains `mesh` and `obj`; `verify` now runs all three checks and its
output is recorded in docs/re/data/mcol-verify.txt.
2026-08-26 09:12:36 +00:00

41 lines
1.9 KiB
Plaintext

object len(0x5C) /12 /16 max u16
2cf7eb47 960 80.00 60 59 max == n-1
cbb99d34 192 16.00 12 11 max == n-1
d84a95fb 3488 290.67 * 218 217 max == n-1
db066592 12640 1053.33 * 790 789 max == n-1
db61c506 2144 178.67 * 134 133 max == n-1
dc44fe0c 2784 232.00 174 173 max == n-1
dc4b0896 14784 1232.00 924 923 max == n-1
dd89a110 18624 1552.00 1164 1163 max == n-1
df4628c2 4160 346.67 * 260 259 max == n-1
e084c13c 192 16.00 12 11 max == n-1
e16460cf 16320 1360.00 1020 1019 max == n-1
length divisible by 12: 7/11 max u16 == len/16 - 1: 11/11
referenced sphere reaches its own cell : 18559/18577 = 99.90%
random sphere, same object (control) : 2233/18577 = 12.02%
object verts tris len 0x54 len 0x58 spheres
2cf7eb47 34 60 416 368 60
cbb99d34 8 12 96 80 12
d84a95fb 111 218 1344 1312 218
db066592 405 790 4864 4752 790
db61c506 73 134 880 816 134
dc44fe0c 89 174 1072 1056 174
dc4b0896 502 924 6032 5552 924
dd89a110 632 1164 7584 6992 1164
df4628c2 134 260 1616 1568 260
e084c13c 8 12 96 80 12
e16460cf 554 1020 6656 6128 1020
len(0x54) == align16(12 * verts) : 11/11
len(0x58) == align16(6 * tris) : 11/11
triangle count == sphere count : 11/11
sphere i encloses triangle i : 4768/4768 = 100.00%
...and is tight to within 1% : 4768/4768 = 100.00%
sphere i encloses a random triangle (ctl) : 63/4768 = 1.32%
edges shared by exactly two triangles : 7152/7152 = 100.00%
PASS