BlueGit

timfa questward

Files

questward / docs / STONE_WALL_SHAPES.md

STONE_WALL_SHAPES.md

wall texture
timfa Tim Falken · pushed by timfa · 2 months ago
0896e8da History
STONE_WALL_SHAPES.md 12.4 KiB Download Raw

Stone wall shape system

How thick stone-wall sprites encode a 3D block as flat greyscale face-IDs, how connections open faces into neighbours, and how cobble texture is baked onto those masks for gameplay.

Thin walls use the same face vocabulary on a narrower frustum; this document centres on thick, which is the clearest reference.

---

Reference files

PathWhat it is
client/assets/blocks/thick-stone-wall/thick-stone-wall.pngGameplay alone 1×1 (textured)
client/assets/blocks/_examples/stone-wall/thick-stone-wall.pngShape mask alone 1×1 (face-id greys)
client/assets/blocks/thick-stone-wall/thick-stone-wall-*.png15 connected gameplay variants
client/assets/blocks/_examples/stone-wall/ref-thick-alone-256.pngNearest-neighbour ×16 alone (shape)
…/ref-thick-face-id-16.png / …-256.pngFalse-colour face roles
…/ref-thick-height-16.png / …-256.pngRelative heightmap from roles
…/ref-thick-face-legend.pngColour key for face-id
…/ref-thick-all-variants.pngLabeled 4×4 sheet of all 16 thick states
client/scripts/export-thick-wall-refs.pyRegenerates face-id / height / alone refs

Gameplay keys: thick-stone-wall, thin-stone-wall. Suffixes from cardinal neighbours only (n/e/s/w → e.g. we, ns, esw, wne, nesw). See shared/world/neighborConnect.js.

---

1. Camera and axes

  • Tile size: 16×16 px.
  • +X = east (right), +Y = south (down on screen).
  • View: top-down with a front bias — you see the flat top, thin west/east vertical sides, and a tall south front face.
  • Greys are face identity, not painted lighting noise. Texture work must stay inside these regions.
        N (−Y)
         ↑
  W ← tile → E
         ↓
        S (+Y, toward camera)

---

2. Greyscale vocabulary (face IDs)

Exact values from thick-stone-wall.png. Six tones only:

GreyHexRoleReads as
640x40Outline / creaseOuter rim + lip between faces
1750xAFNorth bevelTop rim facing north (−Y) — brightest body
1490x95West faceVertical face facing west (−X)
1280x80Top plateauFlat upper surface of the volume
1080x6CEast faceVertical face facing east (+X) — darker than west
840x54South faceVertical face facing south (+Y) — darkest body

Mnemonic on a free 1×1:

              N = 0xAF (bright)
W = 0x95                E = 0x6C
              top = 0x80
              S = 0x54 (dark)
         outline = 0x40 everywhere edges meet

Do not invent intermediate greys when cloning the structure. Remap these six roles to material colours / normals later.

---

3. Alone anatomy (pixel-exact)

Role map of thick-stone-wall.png (# outline, N/W/E/T/S as above):

 y\x  0 1 2 3 4 5 6 7 8 9 A B C D E F
  0   # # # # # # # # # # # # # # # #
  1   # # # N N N N N N N N N N # # #
  2   # W W # # # # # # # # # # E E #
  3   # W W # T T T T T T T T # E E #
  4   # W W # T T T T T T T T # E E #
  5   # W W # T T T T T T T T # E E #
  6   # W W # T T T T T T T T # E E #
  7   # W W # T T T T T T T T # E E #
  8   # W W # T T T T T T T T # E E #
  9   # W W # # # # # # # # # # E E #
 10   # W W # S S S S S S S S # E E #
 11   # W # S S S S S S S S S S # E #
 12   # W # S S S S S S S S S S # E #
 13   # # S S S S S S S S S S S S # #
 14   # # S S S S S S S S S S S S # #
 15   # # # # # # # # # # # # # # # #

Region boxes (inclusive)

RolePixelsNotes
OutlineFull perimeter + every lip between facesNever fill with body grey
North bevely=1, x=3..12Only when north is free
West facex=1..2, y=2..12 (tapers: one px at y=11..12)Only when west is free
East facex=13..14, y=2..12 (tapers)Only when east is free
Top plateaux=4..11, y=3..8Surrounded by 0x40 lips
South facey=10..14, widens downward (x=4..11 → x=2..13)Only when south is free

Volume model

Read the tile as a truncated box / frustum:

1. Roof — plateau 0x80 with north lip 0xAF. 2. Side walls — west 0x95, east 0x6C (asymmetry = light from NW). 3. Front wall — south 0x54, taller in screen space. 4. Creases — 0x40 at every face junction and the tile border.

Corners are mitered: NW = N↔W, NE = N↔E, SW = S↔W, SE = S↔E, resolved by outline pixels.

---

4. Connection rule (core)

A suffix letter means: this tile continues into a neighbour on that side.

For each connected cardinal:

1. Remove that side’s free-face band (N/E/S/W grey). 2. Extrude interior bands (plateau, remaining free faces, and their outline lips) to the tile edge on that side so the neighbour can match. 3. Keep free-face bands only on sides that are not connected.

OpenRemoveExtrude to edge
NNorth bevel 0xAF (+ north rim treatment)W / E / T run to y=0
EEast face 0x6CN (if free) / T / S run to x=15
SSouth face 0x54W / E / T run to y=15
WWest face 0x95N (if free) / T / S run to x=0

Opposite pairs

ns — vertical run: full-height W + T + E columns; no N bevel, no S front.

##WW##TTTTTTTT##EE##   (repeats y=0..15)

we — horizontal run: full-width N rim (if free), T band, S band; no W/E sides.

################  y0
NNNNNNNNNNNNNNNN  y1
################  y2
TTTTTTTTTTTTTTTT  y3..8
################  y9
SSSSSSSSSSSSSSSS  y10..14
################  y15

Seam contract

Across a shared edge, both tiles paint the same continuing role to x=0|15 or y=0|15. Example: A=…e and B=…w both show plateau 0x80 (and matching N/S bands) meeting mid-edge — no side-face grey on that shared edge.

---

5. Corners, T-junctions, and concave pockets

Corners (ne, es, sw, wn) and T’s (esw, wne, swn, nes) are unions of the open-face rules.

Where two free faces would have met at a concave inner corner after opening the other sides, the art keeps a small pocket: outline + a stub of the free face greys. That pocket is what makes an L or T read as a turn rather than a flat extrusion.

Examples (schematic):

es (open E+S → free N+W): south-east corner keeps an E/S pocket while T extrudes east and south elsewhere.

esw (T, free N only): full-width N + T like we, but south edge shows two S/W and S/E pockets at the SW and SE corners (the stem of the T going south).

wne (T, free S only): full-width S band; north edge shows N pockets at NW/NE where the stem goes north.

nesw (all four open): no full free faces; T fills the centre and runs to all edges, with four corner pockets (N stubs at top, S/W/E stubs at bottom corners). Those pockets are intentional — they are the miters where four neighbour walls meet around this cell in a solid fill / 2×2 interior is different from a true cross; authored nesw still carries corner detail for visual continuity with T/L art.

2×2 solid block

Four tiles use corner suffixes, not nesw:

CellSuffix
NWes
NEsw
SWne
SEwn

Each keeps the two outer free faces and opens the two inner sides into the cluster. (nesw is for a cell with neighbours on all four cardinals — e.g. interior of a thicker shape — not for the four cells of a minimal 2×2.)

---

6. Worked single-open examples

n — north open: row 0 becomes the old “interior” W/T/E pattern; south stack unchanged.

##WW##TTTTTTTT##EE##  y0..8
##WW############EE##  y9
##WW##SSSSSSSS##EE##  y10
… south taper …
################    y15

s — south open: plateau + sides continue through y=15; no 0x54.

e — east open: N/T/S (and W) run to x=15; no 0x6C.

w — west open: N/T/S run to x=0; free east column remains.

> Note: free east on thick-stone-wall-w uses 0x6C (corrected). When flipping e↔w art, always reassign face greys — do not keep mirrored luminance.

---

7. Heightmap (for cloning / normals)

ref-thick-height-*.png maps roles → relative height (0–255):

RoleHeightOrder
Outline40Lowest (crease / contact)
South face80Front of prism
East face140Side
West face160Side (slightly higher = lit side)
Top plateau200Roof
North bevel220Upper lip

Ordering to preserve when editing: outline ≤ south ≤ east ≤ west ≤ top ≤ north.

Uses:

  • Extrude a new material with the same silhouettes.
  • Bake normals: up on plateau, −Y on north bevel, ±X on sides, +Y on south.
  • Validate connection variants (no south-height pixels on the plateau).

This is a role-derived height field, not scanned depth. Absolute values may shift for a shader; keep the order.

---

8. Face-id map (tooling)

False colour in ref-thick-face-id-*.png:

ColourRole
WhiteNorth bevel
RedWest face
BlueEast face
GreenSouth face
AmberTop plateau
Near-blackOutline

Suggested pipeline for a new wall set:

1. Author or copy face-id (or height + face-id) at 16×16. 2. Fill each role with albedo / material detail inside the mask. 3. Optional soft light multiply that still respects N lightest → S darkest. 4. Keep outline as mortar/edge or replace with a 1px edge pass. 5. Derive the 15 connection variants by applying §4–§5 (or paint from thick examples with recolour-by-role).

---

9. Checklist — new thick-style wall

Alone

0 of 4 tasks completed

  • Full-tile thick footprint (or intentional inset for a thin family).
  • Only the six role greys (or 1:1 mapped equivalents).
  • Free N → 0xAF rim; free W → 0x95; free E → 0x6C; free S → 0x54; centre → 0x80.
  • Outline separates every face pair.

Each suffix

0 of 5 tasks completed

  • Connected side has no free-face band of that direction.
  • Interior bands meet the tile edge on connected sides.
  • Free sides keep the correct face grey (E = 0x6C, not a flipped 0x95).
  • Seam matches the opposite suffix on the neighbour (e↔w, n↔s).
  • L/T/nesw keep concave corner pockets where needed.

Texturing

0 of 3 tasks completed

  • No detail crossing role boundaries without an outline.
  • Normals follow face directions in §7.
  • After recolour, regenerate face-id/height refs and spot-check all 16 states.

---

10. Thin walls

thin-stone-wall uses the same idea on a narrow frustum, but a slightly different grey vocabulary:

GreyHexThin role
640x40Outline
1820xB6West face
1490x95North rim / ridge top
1280x80East face (not top plateau — differs from thick)
1150x73South / front body

Clone thin silhouettes; recolour via this table (or texture-stone-wall-sprites.mjs).

---

11. Baking cobble texture

Gameplay sprites in thick-stone-wall/ and thin-stone-wall/ are textured. Greyscale face-id masks stay in _examples/stone-wall/.

node client/scripts/texture-stone-wall-sprites.mjs

Reads example masks → writes cobble-shaded PNGs using the old cool-grey stone palette (TOP / FACE / EDGE / MORTAR speckles), keyed by face role. Re-run after editing shapes in _examples.

---

12. Code touchpoints

ConcernLocation
Cardinal suffix / mask (& 15)shared/world/neighborConnect.js
Block defsshared/definitions/tiles.js
Textured sprites (gameplay)client/assets/blocks/thick-stone-wall/, thin-stone-wall/
Greyscale shape masks + refsclient/assets/blocks/_examples/stone-wall/
Shape generator from connecting examplesclient/scripts/generate-stone-wall-sprites.mjs
Cobble texture bakeclient/scripts/texture-stone-wall-sprites.mjs
Ref exportclient/scripts/export-thick-wall-refs.py

Editor recomputes neighbour suffixes on paint and on chunk load so a 2×2 stays on corner suffixes, not nesw.

---

13. Regenerate reference maps

Whenever the thick alone shape mask changes:

python3 client/scripts/export-thick-wall-refs.py
node client/scripts/texture-stone-wall-sprites.mjs

Then update the grey table in §2 / §10 if the vocabulary shifted.

Source
1# Stone wall shape system
2
3How **thick** stone-wall sprites encode a 3D block as flat greyscale face-IDs, how **connections** open faces into neighbours, and how cobble texture is baked onto those masks for gameplay.
4
5Thin walls use the same face vocabulary on a narrower frustum; this document centres on **thick**, which is the clearest reference.
6
7---
8
9## Reference files
10
11| Path | What it is |
12|------|------------|
13| `client/assets/blocks/thick-stone-wall/thick-stone-wall.png` | **Gameplay** alone 1×1 (textured) |
14| `client/assets/blocks/_examples/stone-wall/thick-stone-wall.png` | **Shape mask** alone 1×1 (face-id greys) |
15| `client/assets/blocks/thick-stone-wall/thick-stone-wall-*.png` | 15 connected gameplay variants |
16| `client/assets/blocks/_examples/stone-wall/ref-thick-alone-256.png` | Nearest-neighbour ×16 alone (shape) |
17| `…/ref-thick-face-id-16.png` / `…-256.png` | False-colour face roles |
18| `…/ref-thick-height-16.png` / `…-256.png` | Relative heightmap from roles |
19| `…/ref-thick-face-legend.png` | Colour key for face-id |
20| `…/ref-thick-all-variants.png` | Labeled 4×4 sheet of all 16 thick states |
21| `client/scripts/export-thick-wall-refs.py` | Regenerates face-id / height / alone refs |
22
23Gameplay keys: `thick-stone-wall`, `thin-stone-wall`. Suffixes from cardinal neighbours only (`n`/`e`/`s`/`w` → e.g. `we`, `ns`, `esw`, `wne`, `nesw`). See `shared/world/neighborConnect.js`.
24
25---
26
27## 1. Camera and axes
28
29- Tile size: **16×16** px.
30- **+X = east** (right), **+Y = south** (down on screen).
31- View: **top-down with a front bias** — you see the flat **top**, thin **west/east** vertical sides, and a tall **south** front face.
32- Greys are **face identity**, not painted lighting noise. Texture work must stay inside these regions.
33
34```text
35 N (−Y)
36 ↑
37 W ← tile → E
38 ↓
39 S (+Y, toward camera)
40```
41
42---
43
44## 2. Greyscale vocabulary (face IDs)
45
46Exact values from `thick-stone-wall.png`. Six tones only:
47
48| Grey | Hex | Role | Reads as |
49|------|-----|------|----------|
50| 64 | `0x40` | **Outline / crease** | Outer rim + lip between faces |
51| 175 | `0xAF` | **North bevel** | Top rim facing north (−Y) — brightest body |
52| 149 | `0x95` | **West face** | Vertical face facing west (−X) |
53| 128 | `0x80` | **Top plateau** | Flat upper surface of the volume |
54| 108 | `0x6C` | **East face** | Vertical face facing east (+X) — darker than west |
55| 84 | `0x54` | **South face** | Vertical face facing south (+Y) — darkest body |
56
57Mnemonic on a free 1×1:
58
59```text
60 N = 0xAF (bright)
61W = 0x95 E = 0x6C
62 top = 0x80
63 S = 0x54 (dark)
64 outline = 0x40 everywhere edges meet
65```
66
67**Do not invent intermediate greys** when cloning the structure. Remap these six roles to material colours / normals later.
68
69---
70
71## 3. Alone anatomy (pixel-exact)
72
73Role map of `thick-stone-wall.png` (`#` outline, `N`/`W`/`E`/`T`/`S` as above):
74
75```text
76 y\x 0 1 2 3 4 5 6 7 8 9 A B C D E F
77 0 # # # # # # # # # # # # # # # #
78 1 # # # N N N N N N N N N N # # #
79 2 # W W # # # # # # # # # # E E #
80 3 # W W # T T T T T T T T # E E #
81 4 # W W # T T T T T T T T # E E #
82 5 # W W # T T T T T T T T # E E #
83 6 # W W # T T T T T T T T # E E #
84 7 # W W # T T T T T T T T # E E #
85 8 # W W # T T T T T T T T # E E #
86 9 # W W # # # # # # # # # # E E #
87 10 # W W # S S S S S S S S # E E #
88 11 # W # S S S S S S S S S S # E #
89 12 # W # S S S S S S S S S S # E #
90 13 # # S S S S S S S S S S S S # #
91 14 # # S S S S S S S S S S S S # #
92 15 # # # # # # # # # # # # # # # #
93```
94
95### Region boxes (inclusive)
96
97| Role | Pixels | Notes |
98|------|--------|-------|
99| Outline | Full perimeter + every lip between faces | Never fill with body grey |
100| North bevel | `y=1`, `x=3..12` | Only when **north is free** |
101| West face | `x=1..2`, `y=2..12` (tapers: one px at `y=11..12`) | Only when **west is free** |
102| East face | `x=13..14`, `y=2..12` (tapers) | Only when **east is free** |
103| Top plateau | `x=4..11`, `y=3..8` | Surrounded by `0x40` lips |
104| South face | `y=10..14`, widens downward (`x=4..11` → `x=2..13`) | Only when **south is free** |
105
106### Volume model
107
108Read the tile as a **truncated box / frustum**:
109
1101. **Roof** — plateau `0x80` with north lip `0xAF`.
1112. **Side walls** — west `0x95`, east `0x6C` (asymmetry = light from NW).
1123. **Front wall** — south `0x54`, taller in screen space.
1134. **Creases** — `0x40` at every face junction and the tile border.
114
115Corners are mitered: NW = N↔W, NE = N↔E, SW = S↔W, SE = S↔E, resolved by outline pixels.
116
117---
118
119## 4. Connection rule (core)
120
121A suffix letter means: **this tile continues into a neighbour on that side**.
122
123For each connected cardinal:
124
1251. **Remove** that side’s free-face band (`N`/`E`/`S`/`W` grey).
1262. **Extrude** interior bands (plateau, remaining free faces, and their outline lips) **to the tile edge** on that side so the neighbour can match.
1273. **Keep** free-face bands only on sides that are **not** connected.
128
129| Open | Remove | Extrude to edge |
130|------|--------|-----------------|
131| **N** | North bevel `0xAF` (+ north rim treatment) | W / E / T run to `y=0` |
132| **E** | East face `0x6C` | N (if free) / T / S run to `x=15` |
133| **S** | South face `0x54` | W / E / T run to `y=15` |
134| **W** | West face `0x95` | N (if free) / T / S run to `x=0` |
135
136### Opposite pairs
137
138**`ns`** — vertical run: full-height W + T + E columns; no N bevel, no S front.
139
140```text
141##WW##TTTTTTTT##EE## (repeats y=0..15)
142```
143
144**`we`** — horizontal run: full-width N rim (if free), T band, S band; no W/E sides.
145
146```text
147################ y0
148NNNNNNNNNNNNNNNN y1
149################ y2
150TTTTTTTTTTTTTTTT y3..8
151################ y9
152SSSSSSSSSSSSSSSS y10..14
153################ y15
154```
155
156### Seam contract
157
158Across a shared edge, both tiles paint the **same continuing role** to `x=0|15` or `y=0|15`. Example: A=`…e` and B=`…w` both show plateau `0x80` (and matching N/S bands) meeting mid-edge — **no** side-face grey on that shared edge.
159
160---
161
162## 5. Corners, T-junctions, and concave pockets
163
164Corners (`ne`, `es`, `sw`, `wn`) and T’s (`esw`, `wne`, `swn`, `nes`) are **unions** of the open-face rules.
165
166Where two **free** faces would have met at a concave inner corner after opening the other sides, the art keeps a small **pocket**: outline + a stub of the free face greys. That pocket is what makes an L or T read as a turn rather than a flat extrusion.
167
168Examples (schematic):
169
170**`es`** (open E+S → free N+W): south-east corner keeps an E/S pocket while T extrudes east and south elsewhere.
171
172**`esw`** (T, free N only): full-width N + T like `we`, but south edge shows **two** S/W and S/E pockets at the SW and SE corners (the stem of the T going south).
173
174**`wne`** (T, free S only): full-width S band; north edge shows N pockets at NW/NE where the stem goes north.
175
176**`nesw`** (all four open): no full free faces; T fills the centre and runs to all edges, with **four corner pockets** (N stubs at top, S/W/E stubs at bottom corners). Those pockets are intentional — they are the miters where four neighbour walls meet around this cell in a solid fill / 2×2 interior is different from a true cross; authored `nesw` still carries corner detail for visual continuity with T/L art.
177
178### 2×2 solid block
179
180Four tiles use **corner** suffixes, not `nesw`:
181
182| Cell | Suffix |
183|------|--------|
184| NW | `es` |
185| NE | `sw` |
186| SW | `ne` |
187| SE | `wn` |
188
189Each keeps the two **outer** free faces and opens the two **inner** sides into the cluster. (`nesw` is for a cell with neighbours on all four cardinals — e.g. interior of a thicker shape — not for the four cells of a minimal 2×2.)
190
191---
192
193## 6. Worked single-open examples
194
195**`n`** — north open: row 0 becomes the old “interior” W/T/E pattern; south stack unchanged.
196
197```text
198##WW##TTTTTTTT##EE## y0..8
199##WW############EE## y9
200##WW##SSSSSSSS##EE## y10
201… south taper …
202################ y15
203```
204
205**`s`** — south open: plateau + sides continue through `y=15`; no `0x54`.
206
207**`e`** — east open: N/T/S (and W) run to `x=15`; no `0x6C`.
208
209**`w`** — west open: N/T/S run to `x=0`; free east column remains.
210
211> **Note:** free east on `thick-stone-wall-w` uses `0x6C` (corrected). When flipping `e`↔`w` art, always reassign face greys — do not keep mirrored luminance.
212
213---
214
215## 7. Heightmap (for cloning / normals)
216
217`ref-thick-height-*.png` maps roles → relative height (0–255):
218
219| Role | Height | Order |
220|------|--------|-------|
221| Outline | 40 | Lowest (crease / contact) |
222| South face | 80 | Front of prism |
223| East face | 140 | Side |
224| West face | 160 | Side (slightly higher = lit side) |
225| Top plateau | 200 | Roof |
226| North bevel | 220 | Upper lip |
227
228Ordering to preserve when editing:
229`outline ≤ south ≤ east ≤ west ≤ top ≤ north`.
230
231Uses:
232
233- Extrude a new material with the **same silhouettes**.
234- Bake normals: up on plateau, −Y on north bevel, ±X on sides, +Y on south.
235- Validate connection variants (no south-height pixels on the plateau).
236
237This is a **role-derived** height field, not scanned depth. Absolute values may shift for a shader; keep the order.
238
239---
240
241## 8. Face-id map (tooling)
242
243False colour in `ref-thick-face-id-*.png`:
244
245| Colour | Role |
246|--------|------|
247| White | North bevel |
248| Red | West face |
249| Blue | East face |
250| Green | South face |
251| Amber | Top plateau |
252| Near-black | Outline |
253
254Suggested pipeline for a new wall set:
255
2561. Author or copy **face-id** (or height + face-id) at 16×16.
2572. Fill each role with albedo / material detail **inside** the mask.
2583. Optional soft light multiply that still respects N lightest → S darkest.
2594. Keep outline as mortar/edge or replace with a 1px edge pass.
2605. Derive the 15 connection variants by applying §4–§5 (or paint from thick examples with recolour-by-role).
261
262---
263
264## 9. Checklist — new thick-style wall
265
266**Alone**
267
268- [ ] Full-tile thick footprint (or intentional inset for a thin family).
269- [ ] Only the six role greys (or 1:1 mapped equivalents).
270- [ ] Free N → `0xAF` rim; free W → `0x95`; free E → `0x6C`; free S → `0x54`; centre → `0x80`.
271- [ ] Outline separates every face pair.
272
273**Each suffix**
274
275- [ ] Connected side has no free-face band of that direction.
276- [ ] Interior bands meet the tile edge on connected sides.
277- [ ] Free sides keep the correct face grey (`E` = `0x6C`, not a flipped `0x95`).
278- [ ] Seam matches the opposite suffix on the neighbour (`e`↔`w`, `n`↔`s`).
279- [ ] L/T/`nesw` keep concave corner pockets where needed.
280
281**Texturing**
282
283- [ ] No detail crossing role boundaries without an outline.
284- [ ] Normals follow face directions in §7.
285- [ ] After recolour, regenerate face-id/height refs and spot-check all 16 states.
286
287---
288
289## 10. Thin walls
290
291`thin-stone-wall` uses the **same idea** on a **narrow frustum**, but a slightly different grey vocabulary:
292
293| Grey | Hex | Thin role |
294|------|-----|-----------|
295| 64 | `0x40` | Outline |
296| 182 | `0xB6` | West face |
297| 149 | `0x95` | North rim / ridge top |
298| 128 | `0x80` | East face (**not** top plateau — differs from thick) |
299| 115 | `0x73` | South / front body |
300
301Clone thin silhouettes; recolour via this table (or `texture-stone-wall-sprites.mjs`).
302
303---
304
305## 11. Baking cobble texture
306
307Gameplay sprites in `thick-stone-wall/` and `thin-stone-wall/` are **textured**. Greyscale face-id masks stay in `_examples/stone-wall/`.
308
309```bash
310node client/scripts/texture-stone-wall-sprites.mjs
311```
312
313Reads example masks → writes cobble-shaded PNGs using the old cool-grey stone palette (TOP / FACE / EDGE / MORTAR speckles), keyed by face role. Re-run after editing shapes in `_examples`.
314
315---
316
317## 12. Code touchpoints
318
319| Concern | Location |
320|---------|----------|
321| Cardinal suffix / mask (`& 15`) | `shared/world/neighborConnect.js` |
322| Block defs | `shared/definitions/tiles.js` |
323| Textured sprites (gameplay) | `client/assets/blocks/thick-stone-wall/`, `thin-stone-wall/` |
324| Greyscale shape masks + refs | `client/assets/blocks/_examples/stone-wall/` |
325| Shape generator from connecting examples | `client/scripts/generate-stone-wall-sprites.mjs` |
326| Cobble texture bake | `client/scripts/texture-stone-wall-sprites.mjs` |
327| Ref export | `client/scripts/export-thick-wall-refs.py` |
328
329Editor recomputes neighbour suffixes on paint and on chunk load so a 2×2 stays on corner suffixes, not `nesw`.
330
331---
332
333## 13. Regenerate reference maps
334
335Whenever the thick alone **shape** mask changes:
336
337```bash
338python3 client/scripts/export-thick-wall-refs.py
339node client/scripts/texture-stone-wall-sprites.mjs
340```
341
342Then update the grey table in §2 / §10 if the vocabulary shifted.