diff --git a/Gameleap/code/CoreTech/Libraries/GameOS/coord.cpp b/Gameleap/code/CoreTech/Libraries/GameOS/coord.cpp index 4723a366..db8d4a8f 100644 --- a/Gameleap/code/CoreTech/Libraries/GameOS/coord.cpp +++ b/Gameleap/code/CoreTech/Libraries/GameOS/coord.cpp @@ -8,7 +8,7 @@ float texuv2[65][11][4]={ {{252,144,316,320},{ 23,144, 87,320},{250, 67,328,114},{ 11, 67, 90,114},{102, 61,155,133},{185, 61,238,133},{137,178,203,293},{ 0, 0, 0, 0},{163, 75,177, 79},{144,144,196,168},{126, 8,214, 56}}, // M_Ares {{216,138,332,336},{ 4,138,120,326},{242, 14,324,114},{ 12, 14, 82, 90},{140,200,158,262},{174,200,202,262},{126, 14,208,186},{ 0, 0, 0, 0},{156,294,178,302},{ 0, 0, 0, 0},{ 0, 0, 0, 0}}, // M_Argus {{282,148,332,334},{ 6,148, 56,334},{266, 10,332,116},{ 6, 10, 74,116},{ 98, 22,136,120},{206, 22,246,120},{144,180,194,330},{ 0, 0, 0, 0},{158,140,180,156},{148, 10,190, 48},{ 0, 0, 0, 0}}, // M_Assassin2 - {{174,153,225,345},{111,153,162,345},{219, 33,276,153},{ 60, 33,117,153},{126, 45,150,144},{186, 45,210,144},{ 6, 24, 54,198},{ 0, 0, 0, 0},{144, 9,162, 18},{291,111,309,129},{252,195,273,252}}, // M_Atlas + {{280,208,336,402},{102,197,158,391},{341, 13,400,138},{ 19, 11, 78,138},{130, 21,173,128},{282, 21,325,128},{206, 40,250,214},{ 0, 0, 0, 0},{210, 5,226, 14},{ 94, 94,117,115},{349,174,371,226}}, // M_Atlas {{198,174,240,316},{ 12,174, 56,316},{198, 42,248, 90},{ 12, 42, 46, 86},{ 60, 42, 86,118},{158, 42,186,118},{ 96, 42,144,174},{ 0, 0, 0, 0},{120,202,128,210},{116,238,132,254},{ 0, 0, 0, 0}}, // M_Avatar {{186,156,237,336},{ 96,156,147,336},{237, 24,294,168},{ 57, 24, 93,162},{ 99, 39,150,129},{186, 39,234,129},{312, 48,375,207},{ 0, 0, 0, 0},{159, 24,177, 39},{ 0, 0, 0, 0},{ 0, 0, 0, 0}}, // M_Awesome {{217,174,272,320},{ 67,174,123,320},{279, 79,331,181},{ 9, 79, 60,180},{ 82, 77,111,150},{231, 84,259,150},{129, 22,208,204},{ 0, 0, 0, 0},{152,222,186,247},{242, 30,261, 65},{ 24,205, 55,286}}, // M_Battlemaster @@ -78,7 +78,7 @@ int offset2[65][11][2]={ {{181,256},{ 94,256},{240,172},{ 21,173},{103,173},{184,172},{137,178},{ 0, 0},{163,187},{144,239},{126,130}}, // M_Ares {{176,138},{ 42,138},{224, 24},{ 54, 30},{124, 38},{194, 38},{128, 14},{ 0, 0},{156, 48},{ 0, 0},{ 0, 0}}, // M_Argus {{190,142},{ 98,142},{216, 48},{ 56, 48},{120, 22},{180, 22},{144, 36},{ 0, 0},{158, 70},{148, 10},{ 0, 0}}, // M_Assassin2 - {{174,143},{111,143},{216, 23},{ 63, 23},{126, 35},{186, 35},{147, 14},{ 0, 0},{144, 29},{117,101},{207,140}}, // M_Atlas + {{172,133},{101,133},{223, 19},{ 46, 15},{103, 24},{182, 25},{142, 3},{ 0, 0},{146, 22},{ 98,102},{211,133}}, // M_Atlas {{138,108},{ 60,108},{168, 40},{ 40, 40},{ 76, 28},{140, 28},{ 96, 6},{ 0, 0},{116, 16},{112, 78},{ 0, 0}}, // M_Avatar {{186,151},{ 96,151},{234, 19},{ 60, 19},{ 99, 34},{186, 34},{138, 43},{ 0, 0},{159, 55},{ 0, 0},{ 0, 0}}, // M_Awesome {{182,168},{103,168},{226, 67},{ 64, 66},{121, 70},{191, 77},{131, 14},{ 0, 0},{154, 53},{195, 42},{ 81,105}}, // M_Battlemaster diff --git a/Gameleap/mw4/hsh/hud/Atlas.bmp b/Gameleap/mw4/hsh/hud/Atlas.bmp index 0cd1f1c2..5c3b04d6 100644 --- a/Gameleap/mw4/hsh/hud/Atlas.bmp +++ b/Gameleap/mw4/hsh/hud/Atlas.bmp @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf55c181f0ba499d5774c0b8a3ed644b797e1db7b2a24b9d789f288f07097249 -size 263224 +oid sha256:83490c96186bf435074a05727c4e40661048896c022f52cbde0db594ade55694 +size 263222 diff --git a/MFD-RADAR-MAPPINGS.md b/MFD-RADAR-MAPPINGS.md index f6aa73cb..8804d67b 100644 --- a/MFD-RADAR-MAPPINGS.md +++ b/MFD-RADAR-MAPPINGS.md @@ -680,6 +680,38 @@ Hard-won, all of which produced a wrong answer at least once during this work: - **`str.replace` on a config file hits every match.** An override keyed `("behemoth","mfd","LA")` existed in two dicts and a single replace corrupted both. Anchor edits or rewrite the file. +## Regenerating a crude MFD sheet from the Radar art + +Some original chassis have a much cruder MFD sheet than their Radar sheet, with loose boxes and +pieces that do not meet. Because the two pipelines are `1024->320` and `1024->400`, the MFD is +exactly **0.8x the Radar**, so a whole MFD sheet and its rows can be regenerated from the Radar: + +1. Take the Radar exploded BMP, threshold it, and fill each component's interior holes to get a + solid silhouette. +2. Scale by **0.8**, resample, re-threshold, and place at the upper-left of a 512x512 canvas. +3. Scale `texuv3` and `offset3` by the same 0.8 to get `texuv2` and `offset2`. +4. Spread the pieces outward from the CT centre so nothing collides, keeping `CT` and `HD` + anchored, then mirror each L/R pair exactly about the CT centre. +5. Review and nudge by eye. + +Things this exposed that are worth reusing: + +- **Test collisions on pixels, not bounding boxes.** These are concave silhouettes; a piece can + nest into a notch in its neighbour while the boxes overlap heavily. On the Atlas, a position + the box test rejected outright had **zero** touching pixels. +- **A mismatched pair can be fixed by mirroring the better one.** The Atlas's right leg had a + hole its left leg did not; replacing the right leg's art with a horizontally flipped copy of + the left gives identical pieces (verified by equal pixel counts). +- **Cut the head out of the CT.** Blacking out the CT's art under `HD` plus a 1px ring makes the + head read as a separate part instead of a patch on the torso. Verify with "CT pixels within + 1px of HD == 0". +- **`S1`/`S2` are often asymmetric by design.** The Atlas's are 22x20 and 21x50 in different + places, faithfully inherited from the Radar. Do not force them into a mirrored pair. + +Applied to the Atlas (Mech ID 6) on 2026-08-09: fit **0.795 -> 0.956**, no cross-piece clipping, +assembled footprint 236x321 against the previous 210x321. This is generated art, not authored +art; confirm it on a physical MFD before repeating the technique on other chassis. + ## Common mistakes - Drawing MFD boxes on the raw 1024 image instead of the transformed 340 working canvas. @@ -705,4 +737,7 @@ Hard-won, all of which produced a wrong answer at least once during this work: the measurement files, never to the artwork. - Concluding a zone is broken from a low IoU without first lowering the blob-area threshold, or from a low `HD` score, which is normal. -- Editing `MW4/hsh` instead of the source tree `Gameleap/mw4/hsh`. \ No newline at end of file +- Editing `MW4/hsh` instead of the source tree `Gameleap/mw4/hsh`. +- Writing a runtime BMP to a lower-cased path. Several destinations are capitalised on this + case-sensitive checkout (`Atlas.bmp`, `Fafnir.bmp`); resolve the existing filename first. +- Testing piece collisions with bounding boxes. These silhouettes are concave; use pixel masks. \ No newline at end of file