Skip to content

[FEATURE] BuildingKit binds materials, not just meshes — the path to a contemporary city facade #1624

Description

@Noisemaker111

Problem

BuildingKit binds a facade part slot to a mesh. That works when a modular part kit exists for the genre — the-robots uses quaternius-modular-scifi. For a contemporary city (vice-isle) no such CC0 pack exists:

  • kaykit-city-builder is whole buildings only. KayKit's full public catalogue is 10 repos and contains no facade-parts pack.
  • Poly Haven's modular_urban_apartments_facade / modular_factory_facade are CC0 and contemporary, but each ships as one 118K–175K-tri assembly ~51 m wide, not per-slot files. Wrong shape for a kit, and far off vice-isle's stylized low-poly look.
  • Kenney is out by project policy.
  • Quaternius Downtown City MegaKit is the one live lead and is unverified — see the source-entry bug filed alongside this.

So the mesh path is blocked on assets we do not have.

The material path is available today

packages/assets/src/sources/ambientcg.ts:44 already declares a Facade family (Facade001–006) plus Bricks ×30, Concrete ×25, Plaster ×7, RoofingTiles ×8 — all CC0, all pullable now, all resolvable through buildMaterialCatalog with no reindex step.

What blocks using them: unbound parts render as solid-colour instanced boxes. BuildingMaterialPalette is Record<kind, string> — a hex colour — and batchMaterialFor builds a MeshStandardMaterial({ color }) with no map slot. BuildingKitPart.tint is likewise colour-only.

For a contemporary city this is arguably the better result anyway: tiled brick/concrete/glass-curtain-wall PBR on the generator's per-bay boxes reads more like a real city than any stylized low-poly panel kit would.

Acceptance criteria

  • A palette value may be a material reference, not only a hex colour — something like { color?, material?: ModelMaterialMaps, repeat? } — with the plain string still accepted.
  • BuildingKitPart can name a material for the same reason.
  • The shell loads and applies it. The seam already exists: packages/shell/src/materialOverride.ts + ModelMaterialMaps (color/normal/roughness/ao), used by SceneModels.tsx:183.
  • UV tiling is sane. Within one building panelScale makes every wall slot uniformly bayWidth*0.92 × floorHeight*ratio, so one repeat per kind is correct; it drifts across buildings with different bayWidth. Fixed repeat is acceptable to start, an instance attribute is the exact fix.
  • vice-isle is the first adopter, with before/after screenshots.

Note

vice-isle does not currently use the facade generator at all — it places whole-building GLBs via scene.object.place, and world.ts:91 records that structures: [building(...)] was removed because the clusters blocked NPC navigation. Adopting this means putting vice-isle back on the generator, and that navigation problem has to be solved again. Worth scoping before starting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions