# Bundle Format: City of Towers in Blender

Each contribution occupies one Rung 1 text bundle slot at `parts/<id>/` (`p001` through `p040`), containing **exactly two plain UTF-8 files** (`part.gltf` and `part.json`) and at most **2 MiB (2,097,152 bytes)** in total. No extra files (such as `.html`, `.svg`, `.js`, or nested folders) are permitted.

## Required files in `parts/<id>/`

1. **`part.gltf`** — A single self-contained glTF 2.0 JSON file (`asset.version: "2.0"`), parsed with strict duplicate-key rejection:
   - Every buffer MUST be embedded via a base64 data URI (`data:application/octet-stream;base64,...` or `data:application/gltf-buffer;base64,...`) whose decoded byte length equals `buffer.byteLength`.
   - External URIs are rejected everywhere in the document, including inside `extras`, unknown keys, or spoofed root keys. Only real `buffers[i].uri` and `images[i].uri` entries may carry a `uri` property.
   - Serialized bytes across `extras` and any unknown top-level or node keys are capped at **4,096 bytes**.
   - Only two glTF extensions are allowed: `KHR_texture_transform` and `KHR_materials_emissive_strength`.
   - Must declare **exactly one scene** (`scenes.length === 1`), at most 2,048 nodes, with every node reachable from `scenes[0].nodes` and no multi-parent nodes or cycles.
   - Cameras, lights, skins, animations, and morph targets must not be present (empty arrays `[]` are accepted).
   - Every mesh primitive must use triangle topology (`mode: 4`), unnormalized `VEC3` float32 `POSITION` accessors (`componentType: 5126`), valid texture/sampler/material indices, and reference a valid **PBR metallic-roughness** material (`pbrMetallicRoughness` present).
   - Embedded images must be **PNG or JPEG only** and at most **1024 px** per side (header-only check).

2. **`part.json`** — Strict UTF-8 JSON metadata object (no duplicate keys; no control, bidi, or zero-width characters) with five keys:

```json
{
  "title": "The Beacon Spire",
  "note": "Art Deco limestone setback tower with arched base portals, arrayed bronze fins, swept crown ribs, and lathe-turned glowing lantern spire.",
  "licence": "CC-BY-4.0",
  "tool": "Blender",
  "tool_version": "5.3.0"
}
```

## Coordinate frame (plot-local metres)

- Units: **metres**, glTF standard **Y up**.
- **X** and **Z** are centred on the plot (`[-14.5, +14.5] m` buildable envelope inside each `30 x 30 m` lot).
- **Y** is height above the paved plot plinth (`Y = 0.0 m` ground plane up to the slot tier height cap).
- In Blender (Z up), model centred around `(0, 0, 0)` with base at `Z = 0.0 m`. `tools/blender/export_part.py` exports with `export_yup=True` so Blender Z maps directly to glTF Y.
- The city viewer and Cycles city renderer place each plot at its grid centre (`12 x 10` grid, `42 m` centre-to-centre pitch, `12 m` avenues).

See [docs/QUALITY.md](./QUALITY.md) for tier height bands, triangle ranges, and the not-blocky floor.
