re: runtime-capture pipeline for exact capital-ship part placement
Static external-part placement (ship::assemble_ship) is only approximate — a GN_* frame is the mount pivot, and the real offset lives in a runtime detail rig. So capture ground truth from Canary instead. Finding: the guest vertex buffer holds LOCAL coords (byte-identical to the .xpr), so capital-ship parts are placed entirely in the vertex shader. The per-part transform is in the VS float constants — c0..c2 are the WorldViewProjection rows; normalising each by its norm (= projection x/y/z scales, sy/sx = 16:9) yields the rigid WorldView (rows orthonormal, det +1). Expressing every part relative to a reference part cancels the camera: rel_p = WV_ref⁻¹·WV_p, a pure ship-space rigid transform. - examples/correlate_capture.rs: parse xenia_ship_capture.log, decode the ship's parts, match by vertex count, recover each part's ship-relative placement. - docs/re/ship-placement-runtime-capture.md: full method + the capture protocol (Canary branch capture-ship-placement, F10 hotkey) + validated e106 result. Validated on e106 (ADAN Destroyer, Stage_S01): all 7 drawn parts matched by vertex count; bdy_01/bdy_02 recovered as a PORT/STARBOARD pair (X = ∓264) that static had overlapping; engines correctly aft; extent 872×670×2181. Only brg_01 (bridge) missing — culled at that camera angle, needs a bridge-facing capture. HANDOFF: next = re-capture bridge, bake a per-ship placement table the viewer prefers over assemble_ship, then capture the cruiser / ACROPOLIS / TCAF ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ Promote to a prose `structures/…md` file when a format needs behavioural notes
|
||||
| IXUD subtitle | 🟡 | `sylpheed-formats/src/ixud.rs` | timed cues; **movie↔track link unknown** (dynamic item) |
|
||||
| Fonts (ttf/otf/ttc) | ✅ | `sylpheed-formats/src/font.rs` | standard OpenType, parsed via ttf-parser |
|
||||
| XBG7 mesh | 🟡/❔ | `sylpheed-formats/src/mesh.rs` + `tests/mesh_disc.rs` ([xbg7](structures/xbg7-mesh.md)) | weapons/props: declaration-driven variable stride (36 models), GPU-confirmed. **Stage containers: 5662 sub-models across 22 stages** via content-anchored grouped pools (`stage_models`). Quantized hero bodies (DeltaSaber `f004`) still declined |
|
||||
| Capital-ship part placement | 🟡 | `sylpheed-formats/src/ship.rs` (static) + [runtime capture](ship-placement-runtime-capture.md) | hull placement static-exact; external parts approximate statically. **Runtime capture** (Canary F10 → VS-constant WorldView) gives ground truth — validated on `e106` destroyer; not yet baked into the viewer |
|
||||
|
||||
## Functions / code paths
|
||||
|
||||
|
||||
Reference in New Issue
Block a user