From 124c6cb2af7c94338934a37bde92c69f848248f9 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 10 Jun 2026 21:47:44 +0200 Subject: [PATCH] revert(render): #113 - un-apply the DrawingBSP poly filter (door regression); keep helper + dat pins User gate 2026-06-11: the filter (e46d3d9) removed the phantom staircase everywhere (verified) but DOORS disappeared across Holtburg - the naive PosNode/NegNode walk evidently misses polygons some models reference another way. Doors > phantom stairs: filter application removed; the CollectDrawingBspPolygonIds helper and the dat-fact tests (hall orphans 0+1, cottage 0..7) stay as apparatus for the holistic building-render port. First diagnostic for re-landing: run the DrawingBSP histogram on a door GfxObj. See docs/research/2026-06-11-building-render-holistic-port-handoff.md. Branch state after this commit: outdoor-scoped shell clip (927fd8f + 9ce335e) + retail straddle gate (414c3de) + all diagnostics; phantom staircase VISIBLE again (known, documented); doors functional. Co-Authored-By: Claude Fable 5 --- .../Rendering/Wb/ObjectMeshManager.cs | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs b/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs index f73e9226..7817fa75 100644 --- a/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs +++ b/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs @@ -1023,16 +1023,22 @@ namespace AcDream.App.Rendering.Wb { // The Holtburg meeting hall (0x010014C3) keeps its walkable exterior // stair-ramp as dictionary polys {0,1}: in the PhysicsBSP (NPCs walk // it) but absent from every DrawingBSP node — retail shows a plain - // wall; iterating the dictionary drew the "phantom staircase" + // wall; iterating the dictionary draws the "phantom staircase" // (invisible-but-walkable in retail, visible in acdream). The hill - // cottage (0x01000827) carries 8 such orphans. Filter to the BSP- - // referenced set when a drawing BSP exists; models without one draw - // everything (unchanged). - var drawnPolyIds = CollectDrawingBspPolygonIds(gfxObj); - + // cottage (0x01000827) carries 8 such orphans. + // + // ⚠️ FILTER NOT APPLIED (e46d3d9 un-applied same day): naively + // filtering to CollectDrawingBspPolygonIds(gfxObj) made DOORS + // disappear across Holtburg (user gate 2026-06-11) — the naive + // PosNode/NegNode walk evidently misses polys some models reference + // another way (portal-type nodes? leaf indexing? DatReaderWriter + // parse gap?). Diagnose with the histogram fact in + // Issue113PhantomStairsDumpTests on a door GfxObj BEFORE re-landing. + // The full retail draw is BSP-TRAVERSAL ORDER drawing, not a + // dictionary iteration with a filter — see the holistic port handoff + // docs/research/2026-06-11-building-render-holistic-port-handoff.md. foreach (var polyEntry in gfxObj.Polygons) { ct.ThrowIfCancellationRequested(); - if (drawnPolyIds is not null && !drawnPolyIds.Contains(polyEntry.Key)) continue; var poly = polyEntry.Value; if (poly.VertexIds.Count < 3) continue;