Align original Half-Life office walls and ceiling with explicit room UVs

This commit is contained in:
enne2
2026-10-11 01:10:39 +02:00
parent 8a0c441af6
commit b100a5bc51
11 changed files with 309 additions and 5 deletions
+57
View File
@@ -0,0 +1,57 @@
# Aligned Half-Life office walls and ceiling
## Research and asset choice
Perplexity was unavailable. Exa found the community VERC guide and original-game
material catalog; actual candidates were then inspected from the locally installed
Half-Life `halflife.wad` (not textures from the Black Mesa remake).
- https://twhl.info/index.php/wiki/page/VERC%3A_Style_Guide_1
- https://greg-kennedy.com/hl_materials/
- https://twhl.info/index.php/vault/view/6388
The VERC guide identifies green `C1A0_LABW*` wall panels and `C1A0_C1` ceiling in
the early laboratory aesthetic. For the furnished OFFICE room we chose the original
FIFTIES family instead: `FIFTIES_WALL14U` (128x160, plaster above wood paneling) and
`FIFTIES_CEIL5` (48x48, four square acoustic panels). The guide is a community
reference, not proof that this exact pair appeared in a specific original office.
Candidates were compared visually before selection. Original pixels are preserved.
`tools/extract_office_surfaces.py` exports just these two textures to
`assets/textures/office/`, plus source WAD and texture-lump SHA256 manifest. It
never changes Steam files or re-extracts zombie assets.
```sh
python3 tools/extract_office_surfaces.py /path/to/Half-Life/valve/halflife.wad
```
## UV layout
The old generic world-space triplanar mapping did not distinguish wall motifs from
ceiling motifs. `room.gd` now retains BoxMesh vertices/normals/indices but rebuilds
wall/ceiling meshes as ArrayMesh with explicit room-space UVs. Existing collision
boxes and placement remain untouched.
- Walls: U advances clockwise along the room perimeter at one texture per 4m.
V runs floor-to-ceiling once, inverted so the wood is BELOW the plaster. Equal
density128px/4m =160px/5m, no aspect distortion or repeated vertical trim bands.
All window segments share the same coordinate origin; segment size does not
reset the mapping. The 72m perimeter is18 full repeats, so all corners close.
V uses a half-texel inset at the floor/ceiling to avoid exact0/1 wrap-edge sampling.
- Ceiling: XZ planar UVs with a shared origin at(-9,-9). One48x48 image covers1.2m
and contains two panels per axis, so each panel is0.6m. The18m ceiling spans15x15
texture repeats (30x30 panels). No per-face rotations or arbitrary local scaling.
- Linear mipmapped anisotropic filtering and U tiling remain enabled.
- Floor keeps its existing texture/projection. Furniture, lighting and gameplay
are unchanged. The old wall/ceiling PNGs are retained but no longer used here.
## Verification
`tools/test_office_uv.gd`: seventeen explicit-UV surfaces, no triplanar on office
materials, shared UVs across window segments,4m wall period, wall corner phase
continuity/full-perimeter closure, and ceiling15x15 tiling. PASS headless and real
GL Compatibility. Images `/tmp/zombie-office-uv-{0,1,2}.png` inspect opposite walls
and ceiling; first two use a TEMPORARY inspection light, last uses actual gameplay
lighting. The inspection light exists only in the test, not in the game.
Existing resource-in-use warnings at test shutdown remain.
+9
View File
@@ -1,5 +1,14 @@
# Web build and compressed deployment
## Aligned office surfaces release: 9a376a3dbf674069
See `docs/OFFICE-SURFACES.md`: original FIFTIES_WALL14U and FIFTIES_CEIL5;
explicit continuous wall/perimeter UVs and regular XZ ceiling panels.
PCK 3,989,720 bytes; gzip payload total 12,440,335 bytes. Previous releases retained.
Root backup `index-before-office-uv.html`; serial staging import retained.
Disk before upload: about1.1GB free (98% used); old-release cleanup needs approval.
## Gameplay improvements release: 7ebf03fe3c88be15
See `docs/GAMEPLAY-IMPROVEMENTS.md`: amber HUD, automatic reload, shared furniture