Files
openclaw-dnd-city-visualiza…/docs/walkthrough-royal-castle.md
T

4.3 KiB
Raw Blame History

Walkthrough: Royal Castle battlements from measurements to pixels

This is the full method on a tier-1 landmark. The source map fixed the footprint, wall lines, towers, keep, hall wing, and two gates. The model then made every missing construction choice explicit before the renderer saw anything.

1. Register the castle and choose a camera

Map crop with the aerial camera and view frustum

The castle was traced from the district map into a meter-based local frame. Camera C sits 185 m south-southwest of the castle center and 220 m above it, pitched down 50 degrees with a 58-degree horizontal field of view. The same camera record drives the map projection, block plate, and final frame; there is no hand-matched perspective later.

2. Turn the drawing into construction facts

The map supplied the large masses. The model named the rest:

element model value
curtain 3.2 m thick; walk level 10.0 m
square corner towers about 16 m to their fighting tops
keep 21 m
hall wing 13.5 m
original merlon rhythm 1.3 m merlon + 1.1 m opening
enriched wall-walk merlons 1.4 m wide, 0.9 m openings, 1.4 m high
stone walk + timber gallery 2.3 m + 1.8 m = 4.1 m fighting platform
gallery structure joists every 1.2 m; struts and rail posts every 2.4 m
clear lane inside the curtain 4.5 m
outer gate opening 4.4 m wide; 4.6 m spring line; 7.0 m deep
inner gate opening 3.3 m wide; 2.8 m spring line
raised portcullis bottom edge 5.25 m above the passage
gate hoarding 1.6 m projection; floor at 15.8 m

The numbered plan distinguishes the map-derived shell from the added program: wall access, bent gate passages, inner cross-walls, yards, service buildings, and the 35 × 10 m garrison hall. The additions remain inside the map outline; only the gate hoardings project beyond it.

Labeled top-down construction plan

The wall section is the useful reality check. It shows that “a wall-walk” is not a prompt adjective: it is a 2.3 m stone walk plus a 1.8 m timber deck, joists, ledger, edge beam, diagonal struts, stone corbels, breastwork, looped merlons, and an inner rail.

Measured wall-walk section and elevation

3. Let the camera turn meters into plate pixels

Untextured aerial block-model plate

The ray marcher projects every solid through the stored pinhole camera. At 2048 px wide and 58 degrees horizontal field of view, the focal length is about 1,847 px (1024 / tan(29 degrees)). A projected span is therefore determined by its meter width, depth, and camera transform—not by a prose estimate. Merlons repeat at their 2.3 m pitch; the 4.1 m walk has two separately modeled bands; the 10 m curtain, 16 m towers, and 21 m keep establish the vertical hierarchy. The renderer receives those relationships as pixels.

Before any surface pass, the plate was checked against 38 map constants. The footprint gate found no added ground area outside the source outline except the elevated hoardings, which project at most about 2 m beyond it.

4. Re-surface without redrawing

Photoreal aerial frame

The edit model was told to treat the plate as the set and change surfaces only: granite ashlar, tarred timber, slate, shingle, gravel, daylight. Camera C's keeper measured 1.005 scale, 0.05 degrees rotation, and a 3.1 × 0.1 px shift against its plate. Target-region correlation was 0.63.

Plate and final-frame comparison

The side-by-side is the core test: walls, towers, courts, roof lines, and large openings should occupy the same image regions before and after surface generation.

5. A model error stays a model error

The first model split the L-shaped hall wing into two prisms and accidentally generated twelve merlons on their internal seam. The false wall was already visible in the plate, so prompting could not honestly fix it. The face list was corrected, the plate was regenerated, and only 902 geometry pixels changed in aerial C. That is the payoff of a single source of geometry: repair the solid, then re-run every dependent image.

Takeaway: the detail is not decorative bookkeeping. Exact dimensions create repeatable plate pixels, and those pixels make cross-angle continuity measurable.