Files
zombie-fps/docs/OFFICE-SURFACES.md
T

3.0 KiB

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).

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.

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.