Laying the interior pieces on dungeon floors with heights
Dungeon floors with heights now get the theme's walls, kerbs and lamps, with ledge faces of whole sunken wall pieces and stairs in the theme's finishes.
A dungeon sheet with heights is now dressed in the theme’s pieces, the same as a flat one. Earlier today I added floors at different heights, but those rooms got plain flat faces. Now their walls stand on their own floor, their ceilings hang at their own height, and a stair or ramp is drawn in the theme’s floor and wall finishes.

Contact sheet of the film, eight captioned frames.
I wanted this as the follow-up to heights, and picked doing it beside round rooms. A sheet with no heights lays exactly as before. I checked that by comparing the Breakout Site’s pieces, corners, node names and counts against the commit before, and they are identical.
How are walls laid when the floor isn’t at zero?
Two small functions now answer every height question. foot(square) is the floor a square’s walls stand from, which is its own floor, or the low end of a stair or ramp. roof(square) is its ceiling. A wall stacks wall pieces from foot up to roof. When that isn’t a whole number of 4 m courses, the top course runs on into the rock above the ceiling, where nobody sees it. Lamps hang from roof. On a flat sheet the floor is 0 and the roof is the ceiling height, so nothing changes.
A wall’s painted picture repeats every 4 m going up. A column whose foot is off that grid would have its picture start in the wrong place, so each upright piece carries a phase, the floor’s height modulo 4 m. Pieces with a phase go into their own MultiMesh, keyed by member, state and phase in centimeters, and their material is shifted up by the phase. A phase of 0 keeps the old key, so a flat sheet makes the same nodes it always did.
How is the face of a ledge dressed?
Where one square is higher than its neighbor, the lower square’s wall pieces cover the drop. I didn’t scale them to fit, because a squashed piece shows a squashed picture. They are complete pieces stacked down from the higher floor, sunk into the lower floor, with the top piece’s cornice at the ledge’s edge. At the mouth of a passage there are two stub pieces, one on each side of the opening, and inside a passage two of its own walls.
The higher square gets the theme’s kerb along its edge as a lip, turned to face the drop the way it is at a cavern. It isn’t laid on a stair or ramp.
How are stairs and ramps drawn?
A stair has one tread per 0.2 m of rise. Each tread is a top quad, a front face and two side faces, with a hazard nosing 0.08 m deep and 0.014 m high. A ramp is a top quad and a triangle on each side. All of it goes into one mesh called Slopes, built from three mesh builders for the floor, wall and kerb finishes. The meshes have no UVs, so where pieces are painted they use the painted set’s picture, and where they aren’t they use the theme’s tile projected in world space at one repeat per 1.5 m. The old code that drew those slopes skips any square the theme dresses, so nothing is drawn twice.
What is still wrong?
Three things. A wall’s bottom edging is a level strip on a square piece, so it doesn’t follow a slope and it’s drawn across a stair. I noticed that when I merged this and asked for it to be fixed with tests for future pieces. Repainting a floor, which the films use for before and after, loses each column’s phase, so the hazard band slides off its foot. And a stair or ramp in a narrow passage isn’t laid yet. That waits on real stair and ramp models.
What are the numbers?
The work was 12 files changed, 803 lines added and 32 removed. The new test passed 17 checks with none failing, using 6,109 eye rays. Its test sheet has 4 ledge faces, 4 lips and 6 slopes. The 13 tests that the change touches all passed.