keep edge-row buildings' eave overhangs across the seam

A body-anchored building's eave juts frontEave voxels past the map
boundary; the neighbour-body mask read that overhang as a ring scrap
and opened the roof rim into the sky from across the seam. Building
placements only scan the body, so their quads now carry an `own` flag
the edge keep-rules never touch.
This commit is contained in:
DramaticShape
2026-07-27 00:21:52 -04:00
parent 0bc3d3f14d
commit 5a94dfe85a
3 changed files with 24 additions and 1 deletions
+10
View File
@@ -128,6 +128,16 @@
body is the scrap the mask is for. The mesher now reads the winding and
keeps outward faces on the body's boundary planes, on all four edges.
The roof RIM had the same problem one step further out: an edge-row
house's eave overhangs `frontEave` voxels PAST the boundary plane into
the neighbour's airspace, and those quads are neither on the plane
(the winding rescue) nor over the body -- the neighbour-body mask ate
them as ring scraps, so from across the seam the roof edge was open
sky at low camera angles. Building placements only ever scan the map
BODY, so every building quad is this map's own structure by
construction: they now carry an `own` flag the edge keep-rules never
touch.
## 1.0.3
### Added
+7
View File
@@ -669,6 +669,13 @@ function Buildings.stamp(S, map, quads, tx, ty, bw, bh)
{ q[3][1] + mx, q[3][2], q[3][3] + mz },
{ q[4][1] + mx, q[4][2], q[4][3] + mz },
uv = q.uv, shade = q.shade,
-- placements only ever scan the BODY, so a building is always this
-- map's own structure: the mesher's edge keep-rules must not eat
-- the parts that poke past the boundary (an edge-row house's eave
-- juts frontEave voxels into the neighbour's airspace, and the
-- neighbour-body mask read that overhang as a ring scrap -- which
-- opened the roof rim into the sky from across the seam)
own = true,
}
end
end
+7 -1
View File
@@ -679,7 +679,13 @@ local function runGeometry(map, bodyOnly, masks, sink)
local x1 = math.max(q[1][1], q[2][1], q[3][1], q[4][1])
local z0 = math.min(q[1][3], q[2][3], q[3][3], q[4][3])
local z1 = math.max(q[1][3], q[2][3], q[3][3], q[4][3])
if outwardOnEdge(q, x0, z0, x1, z1) or keepQuad(x0, z0, x1, z1) then
-- q.own: a body-anchored structure's own quad (a building placed by
-- Buildings.build, whose scan never leaves the body). Exempt from
-- the edge keep-rules entirely: its eave legitimately overhangs the
-- boundary plane into the neighbour's airspace, and no variant of
-- the neighbour will ever draw that geometry
if q.own or outwardOnEdge(q, x0, z0, x1, z1)
or keepQuad(x0, z0, x1, z1) then
push({ q[1], q[2], q[3], q[4] }, quadUV(q), groundShades(q, q.shade))
end
end