{
  "format": "c3d/3.0",
  "version": "3.0.0",
  "coordSystem": {
    "handedness": "right",
    "up": "Y",
    "units": "meters",
    "front": "+Z"
  },
  "meta": {
    "id": "c3d-alchemist-apothecary-workbench-001",
    "slug": "alchemist-apothecary-workbench",
    "name": "Alchemist's Apothecary Workbench",
    "kind": "scene",
    "category": "rpg_hero_diorama",
    "tags": [
      "alchemy",
      "apothecary",
      "rpg",
      "isometric",
      "diorama",
      "walnut",
      "brass",
      "glassware",
      "pbd_cloth",
      "bvh_settle",
      "museum_grade"
    ],
    "description": "Museum-grade isometric RPG micro-diorama: a carved dark-walnut apothecary workbench with a tiered bottle hutch on a beveled basalt slab, a gold-hemmed burgundy linen runner draped over the front edge, a glowing borosilicate and copper distillation train, and gravity-settled alchemical clutter on the tabletop and hutch shelves.",
    "styleDNA": {
      "era": "late-medieval / early-renaissance fantasy apothecary",
      "palette": [
        "#2B1A12",
        "#4A2E1E",
        "#B08A3E",
        "#D4AF37",
        "#5E0F1E",
        "#1C1E22",
        "#FFB347",
        "#2FBF71"
      ],
      "mood": "secretive, warm, scholarly, faintly magical",
      "materialPhilosophy": "Hand-worn tactile materials: oiled walnut with edge wear, brass with fingerprint-dulled patina and polished high points, cold honed basalt, and luminous liquids contained in clear glass with real caustic-friendly thickness. Every mesh is watertight and has bevelled edges.",
      "lightingCharacter": "Warm golden key from upper-front-left and cool sapphire rim from back-right over a dark obsidian-slate cyclorama, with 2300K amber and emerald elixir glow plus flickering candles driving soft fog-glow bloom."
    },
    "boundsM": {
      "min": [
        -0.9,
        0,
        -0.6
      ],
      "max": [
        0.9,
        1.6,
        0.6
      ]
    },
    "groundedPivot": true
  },
  "params": {
    "slabW": 1.8,
    "slabD": 1.2,
    "slabH": 0.06,
    "slabBevelM": 0.012,
    "benchW": 1.5,
    "benchD": 0.7,
    "benchH": 0.86,
    "benchCenterZ": -0.1,
    "tabletopY": 0.92,
    "tabletopThick": 0.045,
    "tabletopFrontZ": 0.25,
    "tabletopBackZ": -0.45,
    "legDia": 0.075,
    "apronH": 0.12,
    "drawerCount": 3,
    "drawerH": 0.1,
    "ringPullDia": 0.038,
    "hutchW": 1.4,
    "hutchD": 0.28,
    "hutchH": 0.66,
    "hutchCenterZ": -0.31,
    "hutchShelf1Y": 1.14,
    "hutchShelf2Y": 1.36,
    "hutchTopY": 1.58,
    "shelfThick": 0.025,
    "runnerW": 0.38,
    "runnerLen": 0.75,
    "runnerDrop": 0.3,
    "runnerCenterX": -0.3,
    "overlapM": 0.004
  },
  "materials": {
    "walnut": {
      "recipe": "wood_plank",
      "palette": [
        "#2B1A12",
        "#3D2618",
        "#4A2E1E",
        "#5C3A24"
      ],
      "roughness": [
        0.38,
        0.62
      ],
      "bumpStrength": 0.18,
      "scale": 1,
      "coat": 0.25,
      "sheen": 0,
      "anisotropy": 0.2,
      "perIslandVar": 0.15,
      "edgeBevelMm": 2.5
    },
    "basalt": {
      "recipe": "travertine_marble",
      "palette": [
        "#141518",
        "#1C1E22",
        "#2A2C31",
        "#3A3C41"
      ],
      "roughness": [
        0.55,
        0.85
      ],
      "bumpStrength": 0.22,
      "scale": 0.8,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.12,
      "edgeBevelMm": 4
    },
    "brass": {
      "recipe": "brushed_metal",
      "palette": [
        "#8A6A2A",
        "#B08A3E",
        "#D1A954",
        "#6E5420"
      ],
      "roughness": [
        0.22,
        0.48
      ],
      "bumpStrength": 0.1,
      "scale": 1,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0.35,
      "perIslandVar": 0.1,
      "edgeBevelMm": 1
    },
    "gold_trim": {
      "recipe": "brushed_metal",
      "palette": [
        "#D4AF37",
        "#E6C25A",
        "#A8862A"
      ],
      "roughness": [
        0.2,
        0.4
      ],
      "bumpStrength": 0.12,
      "scale": 1.5,
      "coat": 0,
      "sheen": 0.2,
      "anisotropy": 0.2,
      "perIslandVar": 0.08,
      "edgeBevelMm": 0.5
    },
    "copper": {
      "recipe": "brushed_metal",
      "palette": [
        "#B87333",
        "#9A5B28",
        "#D08A4C",
        "#5F7F6A"
      ],
      "roughness": [
        0.25,
        0.55
      ],
      "bumpStrength": 0.1,
      "scale": 1,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0.3,
      "perIslandVar": 0.12,
      "edgeBevelMm": 0.8
    },
    "burgundy_linen": {
      "recipe": "boucle_fabric",
      "palette": [
        "#5E0F1E",
        "#7A1A2C",
        "#4A0B17",
        "#8C2A3A"
      ],
      "roughness": [
        0.7,
        0.92
      ],
      "bumpStrength": 0.2,
      "scale": 2.2,
      "coat": 0,
      "sheen": 0.45,
      "anisotropy": 0,
      "perIslandVar": 0.1,
      "edgeBevelMm": 0.5
    },
    "borosilicate_glass": {
      "recipe": "arch_glass",
      "palette": [
        "#E8F2F0",
        "#D6E6E4"
      ],
      "roughness": [
        0.02,
        0.08
      ],
      "bumpStrength": 0.02,
      "scale": 1,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.03,
      "edgeBevelMm": 0.6
    },
    "elixir_amber": {
      "recipe": "warm_filament",
      "palette": [
        "#FFB347",
        "#FF9A1F",
        "#FFD27A"
      ],
      "roughness": [
        0.05,
        0.15
      ],
      "bumpStrength": 0,
      "scale": 1,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "kelvin": 2300,
      "emissionStrength": 6,
      "perIslandVar": 0.05,
      "edgeBevelMm": 0.5
    },
    "elixir_emerald": {
      "recipe": "warm_filament",
      "palette": [
        "#2FBF71",
        "#1E9E5A",
        "#7FE3A8"
      ],
      "roughness": [
        0.05,
        0.15
      ],
      "bumpStrength": 0,
      "scale": 1,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "kelvin": 6500,
      "emissionStrength": 5,
      "perIslandVar": 0.05,
      "edgeBevelMm": 0.5
    },
    "leather_binding": {
      "recipe": "aged_leather",
      "palette": [
        "#3B1F14",
        "#5A2E1C",
        "#2A3B2E",
        "#4B1A1A"
      ],
      "roughness": [
        0.45,
        0.8
      ],
      "bumpStrength": 0.25,
      "scale": 1,
      "coat": 0.1,
      "sheen": 0.1,
      "anisotropy": 0,
      "perIslandVar": 0.2,
      "edgeBevelMm": 1.5
    },
    "parchment": {
      "recipe": "ceramic_plaster",
      "palette": [
        "#E8E4D8",
        "#D9CBA8",
        "#C9B88E"
      ],
      "roughness": [
        0.7,
        0.9
      ],
      "bumpStrength": 0.12,
      "scale": 3,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.1,
      "edgeBevelMm": 0.3
    },
    "mortar_stone": {
      "recipe": "ceramic_plaster",
      "palette": [
        "#6E6A62",
        "#8A857A",
        "#57534C"
      ],
      "roughness": [
        0.65,
        0.9
      ],
      "bumpStrength": 0.3,
      "scale": 1.2,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.12,
      "edgeBevelMm": 2
    },
    "candle_wax": {
      "recipe": "ceramic_plaster",
      "palette": [
        "#EFE6CF",
        "#E3D5B0",
        "#F6EEDB"
      ],
      "roughness": [
        0.35,
        0.55
      ],
      "bumpStrength": 0.08,
      "scale": 1,
      "coat": 0.15,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.08,
      "edgeBevelMm": 0.8
    },
    "candle_flame": {
      "recipe": "warm_filament",
      "palette": [
        "#FFC46B",
        "#FF8C2A"
      ],
      "roughness": [
        0,
        0.1
      ],
      "bumpStrength": 0,
      "scale": 1,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "kelvin": 1850,
      "emissionStrength": 12,
      "perIslandVar": 0.02,
      "edgeBevelMm": 0.2
    },
    "sealing_wax": {
      "recipe": "aged_leather",
      "palette": [
        "#8E1A1A",
        "#6B1010",
        "#A8322A"
      ],
      "roughness": [
        0.3,
        0.55
      ],
      "bumpStrength": 0.15,
      "scale": 1,
      "coat": 0.3,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.1,
      "edgeBevelMm": 0.5
    },
    "cork": {
      "recipe": "wood_plank",
      "palette": [
        "#A07A4E",
        "#8A6640",
        "#B88E5E"
      ],
      "roughness": [
        0.7,
        0.9
      ],
      "bumpStrength": 0.3,
      "scale": 4,
      "coat": 0,
      "sheen": 0,
      "anisotropy": 0,
      "perIslandVar": 0.15,
      "edgeBevelMm": 0.4
    }
  },
  "sharedWalls": [],
  "groups": [
    {
      "id": "floor_slab",
      "name": "Beveled Basalt Workshop Floor Slab",
      "category": "architecture/plinth",
      "role": "architecture",
      "reusable": true,
      "tags": [
        "basalt",
        "plinth",
        "floor",
        "beveled",
        "diorama_base"
      ],
      "pos": [
        0,
        0,
        0
      ],
      "rotDeg": [
        0,
        0,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          1.8,
          0.06,
          1.2
        ]
      },
      "attach": {
        "parent": "ground",
        "mode": "seat_on",
        "face": "+y",
        "offset": [
          0,
          0,
          0
        ],
        "overlapM": 0.004
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 101,
        "summary": "Beveled Basalt Workshop Floor Slab",
        "code": "def build(ctx):\n    P = ctx.params\n    W, D, H = P.get(\"slabW\", 1.8), P.get(\"slabD\", 1.2), P.get(\"slabH\", 0.06)\n    outer_bev = P.get(\"slabBevelM\", 0.012)\n    rng = ctx.rng\n    cols, rows = 6, 4\n\n    # --- Materials ---------------------------------------------------------\n    basalt = ctx.mat(\"basalt\")\n    grout = ctx.make_material(\"basalt_grout\", base_color=\"#0E0F11\", roughness=0.92,\n                              noise_scale=60.0, bump_strength=0.25, ao_wear=0.4,\n                              ao_color=\"#050506\", edge_bevel_mm=1.0)\n\n    # --- Grout bed: full-footprint slab with 12mm chamfered top edges -------\n    grout_recess = 0.0045                      # 3-5mm recessed channels\n    stone_top_nom = H - 0.0015                 # +1.5mm variance stays <= H\n    bed_top = stone_top_nom - grout_recess\n    ctx.add_bevel_box(\"floor_slab_bed\", size=(W, bed_top, D), pos=(0.0, bed_top * 0.5, 0.0),\n                      bevel=outer_bev, segs=1, chamfer_bottom=0.0, mat=grout)\n\n    # --- Irregular flagstone layout (shared row seams, jittered column seams)\n    x_min, x_max = -W * 0.5 + outer_bev, W * 0.5 - outer_bev\n    z_min, z_max = -D * 0.5 + outer_bev, D * 0.5 - outer_bev\n    zs = [z_min + (z_max - z_min) * r / rows for r in range(rows + 1)]\n    for r in range(1, rows):\n        zs[r] += rng.uniform(-0.03, 0.03)\n\n    def inset_poly(pts, d):\n        n = len(pts)\n        area = sum(pts[i][0] * pts[(i + 1) % n][1] - pts[(i + 1) % n][0] * pts[i][1] for i in range(n))\n        s = 1.0 if area > 0 else -1.0\n        out = []\n        for i in range(n):\n            a, b, c = pts[i - 1], pts[i], pts[(i + 1) % n]\n            norms = []\n            for p, q in ((a, b), (b, c)):\n                ex, ez = q[0] - p[0], q[1] - p[1]\n                L = math.hypot(ex, ez) or 1.0\n                norms.append((-ez / L * s, ex / L * s))   # inward edge normal\n            nx, nz = norms[0][0] + norms[1][0], norms[0][1] + norms[1][1]\n            k = d / max(0.3, 1.0 + norms[0][0] * norms[1][0] + norms[0][1] * norms[1][1])\n            out.append((b[0] + nx * k, b[1] + nz * k))\n        return out\n\n    bm = ctx.new_bmesh()\n    y_bot = bed_top - 0.002                    # seated 2mm into the bed (no gaps)\n    for r in range(rows):\n        xs = [x_min + (x_max - x_min) * c / cols for c in range(cols + 1)]\n        for c in range(1, cols):\n            xs[c] += rng.uniform(-0.045, 0.045)\n        for c in range(cols):\n            g0, g1 = rng.uniform(0.0015, 0.0025), rng.uniform(0.0015, 0.0025)\n            x0 = xs[c] + (g0 if c > 0 else 0.0)\n            x1 = xs[c + 1] - (g1 if c < cols - 1 else 0.0)\n            z0 = zs[r] + (g1 if r > 0 else 0.0)\n            z1 = zs[r + 1] - (g0 if r < rows - 1 else 0.0)\n            corners = [(x0, z0), (x1, z0), (x1, z1), (x0, z1)]\n            # chipped corners\n            poly = []\n            for i, cp in enumerate(corners):\n                if rng.random() < 0.3:\n                    cut = rng.uniform(0.008, 0.02)\n                    pv, nv = corners[i - 1], corners[(i + 1) % 4]\n                    for o in (pv, nv):\n                        dx, dz = o[0] - cp[0], o[1] - cp[1]\n                        L = math.hypot(dx, dz)\n                        poly.append((cp[0] + dx / L * cut, cp[1] + dz / L * cut))\n                    poly[-2], poly[-1] = poly[-2], poly[-1]\n                else:\n                    poly.append(cp)\n            # keep CCW-consistent order for chipped pairs\n            top_y = stone_top_nom + rng.uniform(-0.0015, 0.0015)\n            bev = rng.uniform(0.0025, 0.004)\n            top_poly = inset_poly(poly, bev)\n            ring_b = [bm.verts.new(ctx.p(px, y_bot, pz)) for px, pz in poly]\n            ring_m = [bm.verts.new(ctx.p(px, top_y - bev, pz)) for px, pz in poly]\n            ring_t = [bm.verts.new(ctx.p(px, top_y, pz)) for px, pz in top_poly]\n            n = len(poly)\n            bm.faces.new(list(reversed(ring_b)))\n            bm.faces.new(ring_t)\n            for i in range(n):\n                j = (i + 1) % n\n                bm.faces.new((ring_b[i], ring_b[j], ring_m[j], ring_m[i]))\n                bm.faces.new((ring_m[i], ring_m[j], ring_t[j], ring_t[i]))\n    bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=1e-6)\n    bmesh.ops.recalc_face_normals(bm, faces=bm.faces)\n    ctx.commit_bmesh(bm, \"floor_slab_flagstones\", mat=basalt, smooth_angle_deg=30.0,\n                     flat=False, already_zup=True)\n\n    # --- Surface storytelling: soot near bench, drip rings, front-edge polish\n    ctx.surface_story(\"basalt\", edge_wear=0.42, dust=0.18, grime_height=0.05,\n                      scratches=0.22, wear_color=\"#3A3C41\")\n    ctx.surface_story(\"basalt_grout\", edge_wear=0.1, dust=0.3, grime_height=0.06,\n                      scratches=0.05)"
      }
    },
    {
      "id": "workbench_hutch",
      "name": "Carved Walnut Apothecary Workbench with Tiered Hutch",
      "category": "furniture/workbench",
      "role": "hero_furniture",
      "reusable": true,
      "tags": [
        "walnut",
        "workbench",
        "hutch",
        "turned_legs",
        "mortise",
        "drawers",
        "brass_pulls"
      ],
      "pos": [
        0,
        0.056,
        -0.1
      ],
      "rotDeg": [
        0,
        0,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          1.5,
          1.52,
          0.7
        ]
      },
      "attach": {
        "parent": "floor_slab",
        "mode": "seat_on",
        "face": "+y",
        "offset": [
          0,
          0,
          -0.1
        ],
        "overlapM": 0.004
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 136,
        "summary": "Carved Walnut Apothecary Workbench with Tiered Hutch",
        "code": "def build(ctx):\n    P = ctx.params\n    W, D, H = P.get(\"benchW\", 1.5), P.get(\"benchD\", 0.7), P.get(\"benchH\", 0.86)\n    ov, tt, slab = P.get(\"overlapM\", 0.004), P.get(\"tabletopThick\", 0.045), P.get(\"slabH\", 0.06)\n    # dark oiled walnut (replaces orange lacquer): low coat, higher roughness, deep AO crevices\n    wal = ctx.make_material(\"walnut\", base_color=\"#3A2416\", roughness=0.58, coat=0.1, noise_scale=22.0,\n                            bump_strength=0.18, ao_wear=0.35, ao_color=\"#1A0F0A\", edge_bevel_mm=2.5)\n    brs = ctx.mat(\"brass\")\n    top_y = H; top_bot = top_y - tt\n    apron_h, leg_r = P.get(\"apronH\", 0.12), P.get(\"legDia\", 0.075) * 0.5\n    lx, lz, front_z, back_z = W * 0.5 - 0.065, D * 0.5 - 0.065, D * 0.5, -D * 0.5\n    seg = max(16, int(28 * ctx.seg_scale))\n\n    def profile_slab(name, xc, th, pts):  # watertight extruded (z, y) profile, thickness along X\n        bm = ctx.new_bmesh()\n        a = [bm.verts.new(ctx.p(xc - th * 0.5, y, z)) for z, y in pts]\n        b = [bm.verts.new(ctx.p(xc + th * 0.5, y, z)) for z, y in pts]\n        bm.faces.new(a); bm.faces.new(b[::-1])\n        for i in range(len(pts)):\n            j = (i + 1) % len(pts); bm.faces.new((a[i], a[j], b[j], b[i]))\n        bmesh.ops.recalc_face_normals(bm, faces=bm.faces[:])\n        ctx.commit_bmesh(bm, name, mat=wal, smooth_angle_deg=30.0, already_zup=True)\n\n    # --- four lathe-turned legs (preserved baluster/ring turnings)\n    leg_top = top_bot + ov\n    prof = [(0.0, 0.0), (leg_r * 0.85, 0.0), (leg_r * 0.95, 0.03), (leg_r * 0.7, 0.07), (leg_r * 0.55, 0.16),\n            (leg_r * 1.0, 0.30), (leg_r * 0.9, 0.40), (leg_r * 0.5, 0.48), (leg_r * 0.95, 0.52), (leg_r * 0.95, 0.55),\n            (leg_r * 0.55, 0.59), (leg_r * 0.6, 0.66), (leg_r * 1.05, 0.69), (leg_r * 1.05, leg_top), (0.0, leg_top)]\n    for i, (sx, sz) in enumerate([(-1, 1), (1, 1), (-1, -1), (1, -1)]):\n        ctx.add_lathe(f\"leg_{i}\", prof, pos=(sx * lx, 0, sz * lz), segs=seg, mat=wal)\n    # --- mortised apron with through-tenon pegs (rails run along their own length = grain)\n    ay = top_bot - apron_h * 0.5 + ov * 0.5\n    ctx.add_bevel_box(\"apron_back\", (2 * lx, apron_h, 0.022), pos=(0, ay, -lz), bevel=0.0025, mat=wal)\n    ctx.add_bevel_box(\"apron_front\", (2 * lx, apron_h, 0.022), pos=(0, ay, lz), bevel=0.0025, mat=wal)\n    for s in (-1, 1):\n        ctx.add_bevel_box(f\"apron_side_{s}\", (0.022, apron_h, 2 * lz), pos=(s * lx, ay, 0), bevel=0.0025, mat=wal)\n        for zz in (lz, -lz):\n            for dy in (-0.03, 0.03):\n                ctx.add_lathe(f\"peg_{s}_{zz:.2f}_{dy}\", [(0, 0), (0.007, 0), (0.0075, 0.012), (0, 0.014)],\n                              pos=(s * (lx + leg_r * 1.05 - 0.004), ay + dy, zz), rot_deg=(0, 0, -90 * s), segs=12, mat=wal)\n    # --- 45mm top + watertight ogee roll/bead (solid rounded bars, no open tube ends)\n    ctx.add_bevel_box(\"tabletop\", (W, tt, D), pos=(0, top_y - tt * 0.5, 0), bevel=0.0025, segs=3, mat=wal)\n    ctx.add_bevel_box(\"ogee_roll\", (W - 0.02, 0.022, 0.024), pos=(0, top_bot + 0.006, front_z - 0.014), bevel=0.0105, segs=4, mat=wal)\n    ctx.add_bevel_box(\"ogee_bead\", (W - 0.05, 0.014, 0.014), pos=(0, top_bot - 0.005 + ov, front_z - 0.03), bevel=0.0065, segs=3, mat=wal)\n    # --- three raised-panel drawers with brass rosette ring pulls (preserved)\n    fz = lz + 0.011\n    n, dh = int(P.get(\"drawerCount\", 3)), P.get(\"drawerH\", 0.1)\n    dw = (2 * lx - 2 * leg_r - 0.03 * (n + 1)) / n\n    ring_r = P.get(\"ringPullDia\", 0.038) * 0.5\n    for i in range(n):\n        x = -lx + leg_r + 0.03 + dw * 0.5 + i * (dw + 0.03)\n        ctx.add_bevel_box(f\"drawer_{i}\", (dw, dh, 0.02), pos=(x, ay, fz + 0.008), bevel=0.0025, mat=wal)\n        ctx.add_bevel_box(f\"drawer_panel_{i}\", (dw * 0.78, dh * 0.62, 0.012), pos=(x, ay, fz + 0.022), bevel=0.004, segs=4, mat=wal)\n        rz = fz + 0.026\n        ctx.add_lathe(f\"rosette_{i}\", [(0, 0), (0.017, 0), (0.016, 0.003), (0.009, 0.006), (0.005, 0.011), (0, 0.012)],\n                      pos=(x, ay + 0.012, rz), rot_deg=(90, 0, 0), segs=20, mat=brs)\n        ring = [(x + ring_r * math.sin(a), ay + 0.012 - ring_r + ring_r * math.cos(a), rz + 0.013)\n                for a in [k * math.tau / 24 for k in range(24)]]\n        ctx.add_tube(f\"ring_pull_{i}\", ring, radius=0.0035, closed=True, radial_segs=10, mat=brs)\n    ctx.add_bevel_box(\"stretcher_shelf\", (2 * lx + leg_r, 0.025, 2 * lz + leg_r), pos=(0, 0.14, 0), bevel=0.0025, mat=wal)\n    # --- hutch carcass: everything seated on the worktop (load path into the bench)\n    hW, hD, sh = P.get(\"hutchW\", 1.4), P.get(\"hutchD\", 0.28), P.get(\"shelfThick\", 0.025)\n    hz, hzf = back_z + hD * 0.5, back_z + hD\n    h_top = P.get(\"hutchTopY\", 1.58) - slab\n    base_y, cheek_top = top_y - ov, h_top - 0.065 + ov\n    inner = hW - 0.06 + 2 * ov\n    bp_front = back_z + 0.018\n    ctx.add_bevel_box(\"hutch_back\", (inner, cheek_top - base_y, 0.018), pos=(0, (base_y + cheek_top) * 0.5, back_z + 0.009), bevel=0.002, mat=wal)\n    for s in (-1, 1):\n        cx = s * (hW * 0.5 - 0.015)\n        # rear stile seated on rear worktop corner, running to the cornice\n        ctx.add_bevel_box(f\"rear_stile_{s}\", (0.04, cheek_top - base_y, 0.04), pos=(s * (hW * 0.5 - 0.02), (base_y + cheek_top) * 0.5, back_z + 0.02), bevel=0.0025, mat=wal)\n        # carved scroll cheek: full depth above, concave scroll sweeping back to the worktop\n        zA, yS = back_z + 0.15, top_y + 0.25\n        curve = [(hzf - (hzf - zA) * math.sin(t * math.pi * 0.5) + 0.008 * math.sin(t * math.tau), yS - (yS - base_y) * t)\n                 for t in [k / 14 for k in range(15)]]\n        profile_slab(f\"hutch_cheek_{s}\", cx, 0.03, [(back_z, base_y), (back_z, cheek_top), (hzf, cheek_top)] + curve)\n    # narrow spice ledge housed into both cheeks, carried by two scroll brackets\n    led_y, led_d = top_y + 0.11, 0.11\n    ctx.add_bevel_box(\"spice_ledge\", (inner, 0.022, led_d + ov), pos=(0, led_y + 0.011, bp_front - ov + led_d * 0.5), bevel=0.0025, mat=wal)\n    zb0, zb1, y1 = bp_front - ov, bp_front + led_d - 0.012, led_y + ov\n    for k, bx in enumerate((-0.32, 0.32)):\n        sc = [(zb0 + 0.025 + (zb1 - zb0 - 0.025) * (0.5 + 0.5 * math.cos(math.pi * t)) + 0.01 * math.sin(math.tau * t), y1 - (y1 - base_y) * t)\n              for t in [j / 12 for j in range(13)]]\n        profile_slab(f\"scroll_bracket_{k}\", bx, 0.022, [(zb0, base_y), (zb0, y1)] + sc)\n    for j, wy in enumerate([P.get(\"hutchShelf1Y\", 1.14), P.get(\"hutchShelf2Y\", 1.36)]):\n        sy = wy - slab\n        ctx.add_bevel_box(f\"hutch_shelf_{j}\", (inner, sh, hD - 0.018 + ov), pos=(0, sy - sh * 0.5, hz + 0.009 - ov * 0.5), bevel=0.0025, mat=wal)\n        ctx.add_bevel_box(f\"gallery_lip_{j}\", (inner, 0.018 + ov, 0.012), pos=(0, sy + 0.009 - ov * 0.5, hzf - 0.006), bevel=0.002, mat=wal)\n    # --- crowned cornice ending exactly at hutch top (solid cove, no open tubes)\n    ctx.add_bevel_box(\"cornice_frieze\", (hW, 0.04, hD), pos=(0, h_top - 0.045, hz), bevel=0.0025, mat=wal)\n    ctx.add_bevel_box(\"cornice_cove\", (hW + 0.02, 0.018, hD + 0.01), pos=(0, h_top - 0.031, hz + 0.005), bevel=0.008, segs=4, mat=wal)\n    ctx.add_bevel_box(\"cornice_crown\", (hW + 0.04, 0.025 + ov, hD + 0.02), pos=(0, h_top - 0.0125 - ov * 0.5, hz + 0.01), bevel=0.004, segs=4, mat=wal)\n    # --- look-dev storytelling: worn walnut edges, ring stains; fingerprint-dulled brass with polished pulls\n    ctx.surface_story(\"walnut\", edge_wear=0.42, dust=0.16, grime_height=0.22, scratches=0.15, wear_color=\"#5C3A24\")\n    ctx.surface_story(\"brass\", edge_wear=0.55, dust=0.08, grime_height=0.1, scratches=0.2, wear_color=\"#E6C25A\")"
      }
    },
    {
      "id": "table_runner",
      "name": "Burgundy Embroidered Linen Runner with Gold Hem",
      "category": "textile/cloth",
      "role": "decor",
      "reusable": true,
      "tags": [
        "pbd_cloth",
        "drape",
        "linen",
        "burgundy",
        "embroidered",
        "gold_hem"
      ],
      "pos": [
        -0.3,
        0.918,
        0
      ],
      "rotDeg": [
        0,
        0,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          0.38,
          0.3,
          0.75
        ]
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 139,
        "summary": "Burgundy Embroidered Linen Runner with Gold Hem",
        "code": "def build(ctx):\n    linen = ctx.mat(\"crimson_linen\")\n    gold = ctx.mat(\"gold_trim\")\n    ctx.surface_story(\"crimson_linen\", edge_wear=0.08, dust_amount=0.05, crevice_ao=0.35)\n    ctx.surface_story(\"gold_trim\", edge_wear=0.30, dust_amount=0.05, crevice_ao=0.25)\n    # Real PBD burgundy linen runner resting flush on desktop & cascading over front apron!\n    ctx.drape_cloth(\n        \"table_runner\",\n        center=(0.0, 0.010, 0.14),\n        size=(0.40, 0.76),\n        subdiv=(22, 32),\n        steps=36,\n        pin_mode=\"none\",\n        gravity=9.8,\n        stiffness=0.86,\n        thickness=0.006,\n        floor_y=0.06,\n        mat=linen,\n        hem_trim=True,\n        hem_mat=gold,\n    )\n"
      }
    },
    {
      "id": "distillation_apparatus",
      "name": "Borosilicate & Copper Distillation Train",
      "category": "props/alchemy_glassware",
      "role": "lighting",
      "reusable": true,
      "tags": [
        "alembic",
        "retort",
        "copper_coil",
        "condenser",
        "glass",
        "emissive_elixir",
        "bloom"
      ],
      "pos": [
        0.42,
        0.914,
        -0.05
      ],
      "rotDeg": [
        0,
        -12,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          0.5,
          0.55,
          0.35
        ]
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 139,
        "summary": "Borosilicate & Copper Distillation Train",
        "code": "def build(ctx):\n    glass, amber, emerald = ctx.mat(\"borosilicate_glass\"), ctx.mat(\"elixir_amber\"), ctx.mat(\"elixir_emerald\")\n    brass, copper, cork, flame = ctx.mat(\"brass\"), ctx.mat(\"copper\"), ctx.mat(\"cork\"), ctx.mat(\"candle_flame\")\n    walnut = ctx.mat(\"walnut\")\n    W, IN = 0.0025, 0.001  # 2.5mm glass wall, 1mm liquid inset\n    seg = max(24, int(48 * ctx.seg_scale))\n\n    # --- Walnut plinth (seats on rear-right worktop; everything rests on its top face) ---\n    PH = 0.018\n    ctx.add_bevel_box(\"app_plinth\", (0.48, PH, 0.32), pos=(0, PH * 0.5, 0), bevel=0.004, segs=3, mat=walnut)\n    py = PH - 0.0005  # tiny overlap so nothing floats\n\n    def arc(R, a0, a1, n=16):\n        return [(R * math.sin(a0 + (a1 - a0) * i / n), -R * math.cos(a0 + (a1 - a0) * i / n)) for i in range(n + 1)]\n\n    def flask_shell(R, nr, ntop):  # closed solid-of-revolution: outer skin + inner skin, axis-terminated\n        ao, ai = math.asin(nr / R), math.asin((nr - W) / (R - W))\n        outer = arc(R, 0.0, math.pi - ao) + [(nr, ntop), (nr + 0.0015, ntop + 0.002)]\n        inner = [(nr - W, ntop + 0.002)] + arc(R - W, math.pi - ai, 0.0)[:-1] + [(0.0, -(R - W))]\n        return outer + inner\n\n    def flask_liquid(R, level):\n        Rl = R - W - IN\n        a = math.acos(max(-1.0, min(1.0, -level / Rl)))\n        pts = arc(Rl, 0.0, a)\n        return pts + [(0.0, pts[-1][1])]\n\n    # --- Spirit burner + flame (back-left) ---\n    bx, bz = -0.14, -0.03\n    ctx.add_lathe(\"burner_body\", [(0, 0), (0.036, 0), (0.038, 0.004), (0.038, 0.04), (0.03, 0.05),\n                                  (0.008, 0.055), (0.008, 0.07), (0, 0.07)], pos=(bx, py, bz), segs=seg, mat=brass)\n    ctx.add_lathe(\"burner_flame\", [(0, 0.068), (0.008, 0.078), (0.007, 0.09), (0.003, 0.104), (0, 0.114)],\n                  pos=(bx, py, bz), segs=20, mat=flame)\n\n    # --- Brass tripod ring stand ---\n    ring_y, ring_r, tr = py + 0.16, 0.05, 0.004\n    ring = [(bx + ring_r * math.cos(2 * math.pi * i / 36), ring_y, bz + ring_r * math.sin(2 * math.pi * i / 36)) for i in range(36)]\n    ctx.add_tube(\"tripod_ring\", ring, radius=tr, closed=True, mat=brass)\n    for k in range(3):\n        a = 2 * math.pi * k / 3 + math.pi / 6\n        ctx.add_tube(f\"tripod_leg_{k}\", [(bx + ring_r * math.cos(a), ring_y, bz + ring_r * math.sin(a)),\n                                         (bx + 0.07 * math.cos(a), py + 0.08, bz + 0.07 * math.sin(a)),\n                                         (bx + 0.078 * math.cos(a), py + tr, bz + 0.078 * math.sin(a))], radius=tr, mat=brass)\n\n    # --- Round-bottom alembic retort seated in ring ---\n    R = 0.07\n    cy = ring_y + math.sqrt(R * R - (ring_r - tr) ** 2)\n    neck_top = py + 0.30\n    ctx.add_lathe(\"retort_glass\", flask_shell(R, 0.014, neck_top - cy), pos=(bx, cy, bz), segs=seg, mat=glass)\n    ctx.add_lathe(\"retort_elixir\", flask_liquid(R, 0.012), pos=(bx, cy, bz), segs=seg, mat=amber)\n\n    # --- 6.5-turn copper helix, pulled forward toward hero camera (+Z) ---\n    cx, cz, cr, y0, y1, turns = 0.07, 0.05, 0.045, py + 0.36, py + 0.14, 6.5\n    n = int(turns * 24)\n    coil = [(cx + cr * math.cos(math.pi + 2 * math.pi * turns * i / n), y0 + (y1 - y0) * i / n,\n             cz + cr * math.sin(math.pi + 2 * math.pi * turns * i / n)) for i in range(n + 1)]\n    inlet = coil[0]\n    rx, rz, Rr = 0.165, 0.05, 0.042\n    coil += [(0.145, y1 - 0.008, cz), (rx, py + 0.12, rz), (rx, py + 0.092, rz)]\n    ctx.add_tube(\"condenser_coil\", coil, radius=0.006, tubular_segs=n + 12, radial_segs=12, mat=copper)\n\n    # --- Glass swan neck: retort mouth -> visible brass union -> coil inlet ---\n    ctx.add_tube(\"swan_neck\", [(bx, neck_top - 0.015, bz), (bx + 0.01, py + 0.35, bz), (-0.06, py + 0.392, -0.005),\n                               (0.0, py + 0.385, 0.03), (inlet[0] - 0.004, inlet[1] + 0.002, inlet[2])],\n                 radius=0.008, taper=[1.0, 0.85], mat=glass)\n    ctx.add_lathe(\"neck_union\", arc(0.0105, 0.0, math.pi, 12), pos=inlet, segs=24, mat=brass)\n\n    # --- Brass retort stand behind coil (rod + arms + clamps) ---\n    sx, sz = cx, cz - cr - 0.014\n    ctx.add_lathe(\"stand_base\", [(0, 0), (0.03, 0), (0.032, 0.004), (0.028, 0.009), (0, 0.009)],\n                  pos=(sx, py, sz), segs=seg, mat=brass)\n    ctx.add_tube(\"stand_rod\", [(sx, py + 0.008, sz), (sx, py + 0.385, sz)], radius=0.0045, mat=brass)\n    for j, yy in enumerate((py + 0.17, py + 0.31)):\n        ctx.add_tube(f\"stand_arm_{j}\", [(sx, yy, sz), (cx, yy, cz - cr + 0.002)], radius=0.003, mat=brass)\n        ctx.add_bevel_box(f\"stand_clamp_{j}\", (0.014, 0.012, 0.014), pos=(sx, yy, sz), bevel=0.002, mat=brass)\n\n    # --- Receiving flask under coil outlet ---\n    ctx.add_lathe(\"receiver_glass\", flask_shell(Rr, 0.012, 0.11 - Rr), pos=(rx, py + Rr, rz), segs=seg, mat=glass)\n    ctx.add_lathe(\"receiver_elixir\", flask_liquid(Rr, -0.008), pos=(rx, py + Rr, rz), segs=seg, mat=amber)\n\n    # --- Two tall stoppered phials at rear-right: amber + emerald ---\n    pr, ph = 0.018, 0.235\n    for i, (px, pz, liq, lvl) in enumerate(((0.21, -0.11, amber, 0.17), (0.155, -0.125, emerald, 0.19))):\n        shell = [(0, 0), (pr - 0.004, 0), (pr, 0.004), (pr, ph), (pr + 0.002, ph + 0.003), (pr - W, ph + 0.003),\n                 (pr - W, W + 0.003), (pr - W - 0.003, W), (0, W)]\n        ctx.add_lathe(f\"phial_glass_{i}\", shell, pos=(px, py, pz), segs=seg, mat=glass)\n        ri = pr - W - IN\n        ctx.add_lathe(f\"phial_elixir_{i}\", [(0, W + IN), (ri - 0.003, W + IN), (ri, W + IN + 0.003), (ri, lvl), (0, lvl)],\n                      pos=(px, py, pz), segs=seg, mat=liq)\n        ctx.add_lathe(f\"phial_cork_{i}\", [(0, ph - 0.012), (pr - W - 0.0003, ph - 0.012), (pr - W, ph + 0.003),\n                                          (pr + 0.001, ph + 0.022), (0, ph + 0.024)], pos=(px, py, pz), segs=24, mat=cork)\n\n    ctx.surface_story(\"walnut\", edge_wear=0.3, dust=0.1, grime_height=0.1, scratches=0.12)\n    ctx.surface_story(\"brass\", edge_wear=0.4, dust=0.12, grime_height=0.18, scratches=0.15, wear_color=\"#5F7F6A\")\n    ctx.surface_story(\"copper\", edge_wear=0.35, dust=0.1, grime_height=0.2, scratches=0.1, wear_color=\"#5F7F6A\")"
      }
    },
    {
      "id": "tabletop_clutter",
      "name": "Gravity-Settled Tabletop Alchemical Clutter",
      "category": "props/clutter_group",
      "role": "prop",
      "reusable": true,
      "tags": [
        "settle_group",
        "grimoires",
        "balance_scale",
        "mortar_pestle",
        "bvh",
        "zero_float"
      ],
      "pos": [
        -0.3,
        0.914,
        -0.02
      ],
      "rotDeg": [
        0,
        0,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          0.7,
          0.42,
          0.42
        ]
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 142,
        "summary": "Gravity-Settled Tabletop Alchemical Clutter",
        "code": "def build(ctx):\n    P = ctx.params\n    ov = 0.001\n    rt = P.get(\"overlapM\", 0.004)\n    leather, parch, brass = ctx.mat(\"leather_binding\"), ctx.mat(\"parchment\"), ctx.mat(\"brass\")\n    stone = ctx.mat(\"mortar_stone\")\n    ctx.surface_story(\"brass\", edge_wear=0.4, dust=0.1, grime_height=0.12, scratches=0.16)\n    ctx.surface_story(\"leather_binding\", edge_wear=0.45, dust=0.1, grime_height=0.1, scratches=0.14)\n    ctx.surface_story(\"mortar_stone\", edge_wear=0.3, dust=0.2, grime_height=0.2, scratches=0.05)\n\n    def rot(x, z, yaw):  # right-handed yaw about +Y\n        a = math.radians(yaw)\n        return x * math.cos(a) + z * math.sin(a), -x * math.sin(a) + z * math.cos(a)\n\n    def rod(name, p0, p1, r=0.0022):\n        # watertight lathe rod in XY or YZ plane only (single-axis tilt, no Euler-order ambiguity)\n        dx, dy, dz = p1[0] - p0[0], p1[1] - p0[1], p1[2] - p0[2]\n        L = math.sqrt(dx * dx + dy * dy + dz * dz)\n        if abs(dz) < 1e-6:\n            rd = (0, 0, -math.degrees(math.atan2(dx, dy)))\n        else:\n            rd = (math.degrees(math.atan2(dz, dy)), 0, 0)\n        ctx.add_lathe(name, [(0, 0), (r, 0), (r, L), (0, L)], pos=p0, rot_deg=rd, segs=10, mat=brass)\n\n    # --- Grimoire stack, back-left, spines facing hero (+Z), tabletop-local y=0 ---\n    bx, bz, y = -0.215, -0.055, 0.0\n    books = [(0.22, 0.050, 0.17, 4.0), (0.20, 0.042, 0.155, -6.0), (0.18, 0.046, 0.14, 9.0)]\n    bd = 0.006\n    for i, (w, h, d, yaw) in enumerate(books):\n        R = (0, yaw, 0)\n        ctx.add_bevel_box(f\"bk{i}_low\", (w, bd, d), pos=(bx, y + bd / 2, bz), rot_deg=R, bevel=0.002, mat=leather)\n        px, pz = rot(-0.005, 0.0, yaw)\n        ctx.add_bevel_box(f\"bk{i}_pages\", (w - 0.012, h - 2 * bd + 2 * ov, d - 0.012),\n                          pos=(bx + px, y + h / 2, bz + pz), rot_deg=R, bevel=0.001, mat=parch)\n        ctx.add_bevel_box(f\"bk{i}_top\", (w, bd, d), pos=(bx, y + h - bd / 2, bz), rot_deg=R, bevel=0.002, mat=leather)\n        sx, sz = rot(0.0, d / 2 - 0.004, yaw)  # spine on hero-facing front edge\n        ctx.add_bevel_box(f\"bk{i}_spine\", (w, h, 0.010), pos=(bx + sx, y + h / 2, bz + sz), rot_deg=R, bevel=0.003, mat=leather)\n        if i == len(books) - 1:\n            for cx, cz in ((w / 2 - 0.011, d / 2 - 0.011), (w / 2 - 0.011, -d / 2 + 0.011)):\n                ox, oz = rot(cx, cz, yaw)\n                ctx.add_bevel_box(f\"bk{i}_cap{int(cz > 0)}\", (0.024, 0.003, 0.024), pos=(bx + ox, y + h + 0.0015 - ov, bz + oz),\n                                  rot_deg=(0, yaw + 45, 0), bevel=0.0008, mat=brass)\n        y += h - ov\n        bx += 0.005 * (1 if i % 2 else -1)\n\n    # --- Open tome on the runner, front-left (lifted by cloth thickness) ---\n    tx, tz, ty = -0.20, 0.12, rt\n    ctx.add_bevel_box(\"tome_cover\", (0.26, 0.008, 0.17), pos=(tx, ty + 0.004, tz), rot_deg=(0, -6, 0), bevel=0.002, mat=leather)\n    for s in (-1, 1):\n        ox, oz = rot(s * 0.063, 0.0, -6)\n        ctx.add_bevel_box(f\"tome_pages{s}\", (0.118, 0.016, 0.155), pos=(tx + ox, ty + 0.008 + 0.008 - ov, tz + oz),\n                          rot_deg=(0, -6, 0), bevel=0.004, mat=parch)\n\n    # --- Brass balance scale (0.36 m), behind-right of books, beam along X so both pans read ---\n    sx0, sz0, arm, beam_y, pan_top, hub_y, pr = 0.10, -0.13, 0.12, 0.327, 0.085, 0.17, 0.052\n    ctx.add_lathe(\"scale_base\", [(0, 0), (0.058, 0), (0.060, 0.008), (0.044, 0.016), (0.016, 0.024), (0, 0.024)], pos=(sx0, 0, sz0), segs=40, mat=brass)\n    ctx.add_lathe(\"scale_col\", [(0, 0.020), (0.009, 0.020), (0.007, 0.20), (0.011, 0.21), (0.006, 0.32), (0.009, 0.333), (0, 0.333)], pos=(sx0, 0, sz0), segs=24, mat=brass)\n    ctx.add_bevel_box(\"scale_beam\", (2 * arm + 0.024, 0.010, 0.012), pos=(sx0, beam_y, sz0), bevel=0.002, mat=brass)\n    ctx.add_lathe(\"scale_finial\", [(0, 0.330), (0.008, 0.333), (0.010, 0.345), (0.004, 0.36), (0, 0.36)], pos=(sx0, 0, sz0), segs=20, mat=brass)\n    for s in (-1, 1):\n        px = sx0 + s * arm\n        ctx.add_lathe(f\"pan{s}\", [(0, 0.060), (0.030, 0.061), (0.050, 0.074), (0.056, pan_top), (0.052, pan_top), (0.028, 0.065), (0, 0.064)],\n                      pos=(px, 0, sz0), segs=36, mat=brass)\n        rod(f\"hanger{s}\", (px, hub_y, sz0), (px, beam_y, sz0), r=0.0025)  # terminates inside the beam end\n        ctx.add_lathe(f\"hub{s}\", [(0, hub_y - 0.006), (0.006, hub_y - 0.004), (0.006, hub_y + 0.004), (0, hub_y + 0.006)], pos=(px, 0, sz0), segs=16, mat=brass)\n        for k, (ddx, ddz) in enumerate(((1, 0), (-1, 0), (0, 1), (0, -1))):\n            rod(f\"strut{s}_{k}\", (px + ddx * pr, pan_top - 0.001, sz0 + ddz * pr), (px, hub_y, sz0), r=0.0018)\n\n    # --- Carved stone mortar near front-center with pestle leaning inside ---\n    mx, mz = 0.08, 0.11\n    ctx.add_lathe(\"mortar\", [(0, 0), (0.058, 0), (0.066, 0.012), (0.072, 0.060), (0.068, 0.090), (0.056, 0.092),\n                             (0.052, 0.060), (0.036, 0.034), (0, 0.030)], pos=(mx, 0, mz), segs=48, lip_bevel=0.003, mat=stone)\n    ctx.add_lathe(\"pestle\", [(0, 0), (0.012, 0.003), (0.016, 0.014), (0.014, 0.030), (0.010, 0.060),\n                             (0.009, 0.150), (0.007, 0.165), (0, 0.170)],\n                  pos=(mx + 0.012, 0.031, mz), rot_deg=(0, 0, -28), segs=24, mat=stone)\n\n    # --- Contact verification: single-mesh footings already seated at y=0 (rigid assemblies untouched) ---\n    ctx.settle_group([\"bk0_low\", \"scale_base\", \"mortar\"], floor_y=0.0, inset=0.001)"
      }
    },
    {
      "id": "candlestick_pair",
      "name": "Brass Candlesticks with Flickering Wax Candles",
      "category": "lighting/candles",
      "role": "lighting",
      "reusable": true,
      "tags": [
        "brass",
        "candlestick",
        "wax",
        "drips",
        "flame",
        "flicker"
      ],
      "pos": [
        -0.35,
        0.914,
        0.13
      ],
      "rotDeg": [
        0,
        0,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          0.8,
          0.32,
          0.12
        ]
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 106,
        "summary": "Brass Candlesticks with Flickering Wax Candles",
        "code": "def build(ctx):\n    brass = ctx.mat(\"brass\"); wax = ctx.mat(\"candle_wax\"); flame = ctx.mat(\"candle_flame\")\n    # soot darkening + fingerprint-dulled patina near rims, polished high points\n    ctx.surface_story(\"brass\", edge_wear=0.38, dust=0.12, grime_height=0.08,\n                      scratches=0.15, wear_color=\"#2A1E12\")\n    ov = ctx.params.get(\"overlapM\", 0.004)\n    rng = ctx.rng\n\n    def sd_cap(p, a, b, r):\n        pa = p - a; ba = b - a\n        h = np.clip((pa @ ba) / (ba @ ba), 0.0, 1.0)[..., None]\n        return np.linalg.norm(pa - ba * h, axis=-1) - r\n\n    def sd_ell(p, c, rad):\n        q = (p - c) / rad\n        k0 = np.linalg.norm(q, axis=-1); k1 = np.linalg.norm(q / rad, axis=-1)\n        return k0 * (k0 - 1.0) / np.maximum(k1, 1e-9)\n\n    def smin(a, b, k):\n        h = np.clip(0.5 + 0.5 * (b - a) / k, 0.0, 1.0)\n        return b * (1 - h) + a * h - k * h * (1 - h)\n\n    bases = []\n    # (side, x, flame-tip height, stick top / cup height)\n    for side, x, top, stem in ((\"l\", -0.37, 0.300, 0.150), (\"r\", 0.37, 0.250, 0.115)):\n        s = stem / 0.150\n        # --- lathed brass candlestick: foot, knops, baluster, drip pan, socket ---\n        prof = [(0.0, 0.0), (0.030, 0.0), (0.030, 0.005), (0.027, 0.010),\n                (0.020, 0.016), (0.012, 0.024), (0.010, 0.030 * s),\n                (0.015, 0.036 * s), (0.010, 0.042 * s), (0.007, 0.060 * s),\n                (0.009, 0.080 * s), (0.014, 0.092 * s), (0.009, 0.104 * s),\n                (0.007, stem - 0.024), (0.012, stem - 0.020),\n                (0.030, stem - 0.018), (0.030, stem - 0.014), (0.027, stem - 0.013),\n                (0.015, stem - 0.013), (0.015, stem), (0.0, stem)]\n        base_name = f\"candlestick_{side}\"\n        ctx.add_lathe(base_name, prof, pos=(x, 0, 0), segs=40, cap=True, lip_bevel=0.001, mat=brass)\n        bases.append(base_name)\n\n        # --- partially melted candle with crater top ---\n        cy0 = stem - ov\n        ctop = top - 0.034\n        cprof = [(0.0, cy0), (0.0115, cy0), (0.0115, ctop - 0.003), (0.0109, ctop),\n                 (0.0088, ctop - 0.0015), (0.0, ctop - 0.004)]\n        ctx.add_lathe(f\"candle_{side}\", cprof, pos=(x, 0, 0), segs=32, cap=True, mat=wax)\n\n        # --- sculpted solid drip runs + pooled wax on the pan (watertight SDF) ---\n        drips = []\n        for i in range(3):\n            ang = rng.uniform(0, 2 * math.pi)\n            dx, dz = math.cos(ang), math.sin(ang)\n            y1 = ctop - 0.004\n            y2 = rng.uniform(cy0 + 0.006, ctop - 0.03) if i else stem - 0.013\n            r0 = 0.0115 if i else 0.0150\n            drips.append((np.array([x + dx * 0.0112, y1, dz * 0.0112]),\n                          np.array([x + dx * r0, y2, dz * r0]),\n                          rng.uniform(0.0018, 0.0026)))\n        pan_y = stem - 0.0128\n\n        def wax_sdf(p, drips=drips, x=x, pan_y=pan_y):\n            p = np.asarray(p, dtype=float)\n            d = sd_ell(p, np.array([x, pan_y, 0.0]), np.array([0.022, 0.0035, 0.022]))\n            for a, b, r in drips:\n                d = smin(d, sd_cap(p, a, b, r), 0.004)\n                d = smin(d, np.linalg.norm(p - b, axis=-1) - r * 1.45, 0.003)\n            return d\n\n        ctx.sdf_mesh(f\"candle_wax_drips_{side}\", wax_sdf,\n                     bounds_min=(x - 0.032, stem - 0.022, -0.032),\n                     bounds_max=(x + 0.032, ctop + 0.004, 0.032),\n                     res=56, mat=wax, smooth_iters=2)\n\n        # --- wick + closed teardrop flame aligned to motion-flicker emitter ---\n        ctx.add_lathe(f\"wick_{side}\", [(0.0, ctop - 0.004), (0.0012, ctop - 0.004),\n                      (0.0011, ctop + 0.007), (0.0, ctop + 0.008)],\n                      pos=(x, 0, 0), segs=8, cap=True, mat=ctx.mat(\"leather_binding\"))\n        fy0 = ctop + 0.003; h = top - fy0\n        fprof = [(0.0, fy0), (0.0032, fy0 + 0.0018), (0.0052, fy0 + 0.0060),\n                 (0.0050, fy0 + 0.0105), (0.0030, fy0 + h * 0.72), (0.0, top)]\n        ctx.add_lathe(f\"candle_flame_{side}\", fprof, pos=(x, 0, 0), segs=20, cap=True, mat=flame)\n\n    # bases already sit exactly at local y=0; settle locks contact for the clutter group\n    ctx.settle_group(bases, floor_y=0.0, inset=0.001)"
      }
    },
    {
      "id": "hutch_shelf_clutter",
      "name": "Hutch Shelf Vials, Jars & Small Tomes",
      "category": "props/clutter_group",
      "role": "storage",
      "reusable": true,
      "tags": [
        "settle_group",
        "crystal_vials",
        "wax_seal",
        "apothecary_jars",
        "shelf_dressing"
      ],
      "pos": [
        0,
        1.134,
        -0.31
      ],
      "rotDeg": [
        0,
        0,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          1.3,
          0.42,
          0.24
        ]
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 107,
        "summary": "Hutch Shelf Vials, Jars & Small Tomes",
        "code": "def build(ctx):\n    P = ctx.params\n    T1 = 0.0                                              # local y=0 == world hutchShelf1Y top face\n    T2 = P.get(\"hutchShelf2Y\", 1.36) - P.get(\"hutchShelf1Y\", 1.14)   # 0.22 upper tier top face\n    Z_FRONT = 0.12 - 0.018 - 0.006                        # stay behind 18 mm gallery lip\n    rng = random.Random(ctx.seed)\n    glass, wax, parch = ctx.mat(\"borosilicate_glass\"), ctx.mat(\"sealing_wax\"), ctx.mat(\"parchment\")\n    cork, amber, emer = ctx.mat(\"cork\"), ctx.mat(\"elixir_amber\"), ctx.mat(\"elixir_emerald\")\n    leather = ctx.mat(\"leather_binding\")\n    ctx.surface_story(\"leather_binding\", edge_wear=0.4, dust=0.25, scratches=0.15)\n    ctx.surface_story(\"sealing_wax\", edge_wear=0.2, dust=0.1)\n    shells = {T1: [], T2: []}\n\n    def vial(n, x, z, h, r, y0, liq):\n        # faceted 8-sided crystal vial: closed glass shell + separate closed liquid volume\n        sh = [(0, 0), (r, 0), (r, h * 0.74), (r * 0.44, h * 0.82), (r * 0.42, h * 0.92), (0, h * 0.92)]\n        ctx.add_lathe(n, sh, pos=(x, y0, z), segs=8, lip_bevel=0.001, mat=glass)\n        shells[y0].append(n)\n        if liq is not None:\n            ri, f = r - 0.0022, h * rng.uniform(0.45, 0.68)\n            ctx.add_lathe(n + \"_liq\", [(0, 0.003), (ri, 0.003), (ri, f), (0, f)],\n                          pos=(x, y0, z), segs=8, mat=liq)\n        ctx.add_lathe(n + \"_collar\", [(0, h * 0.83), (r * 0.62, h * 0.83), (r * 0.56, h * 0.885), (0, h * 0.885)],\n                      pos=(x, y0, z), segs=16, mat=wax)          # wax drip collar ring\n        ctx.add_lathe(n + \"_cap\", [(0, h * 0.885), (r * 0.52, h * 0.885), (r * 0.56, h * 0.96), (r * 0.38, h), (0, h)],\n                      pos=(x, y0, z), segs=16, lip_bevel=0.001, mat=wax)\n\n    def jar(n, x, z, h, r, y0, liq):\n        # squat labelled apothecary jar with cork bung and wrap-around parchment label band\n        sh = [(0, 0), (r * 0.92, 0), (r, h * 0.12), (r, h * 0.78), (r * 0.72, h * 0.86), (r * 0.7, h * 0.88), (0, h * 0.88)]\n        ctx.add_lathe(n, sh, pos=(x, y0, z), segs=28, lip_bevel=0.0015, mat=glass)\n        shells[y0].append(n)\n        ri, f = r - 0.003, h * rng.uniform(0.4, 0.7)\n        ctx.add_lathe(n + \"_fill\", [(0, 0.004), (ri * 0.92, 0.004), (ri, h * 0.12), (ri, f), (0, f)],\n                      pos=(x, y0, z), segs=28, mat=liq)\n        ctx.add_lathe(n + \"_label\", [(0, h * 0.3), (r + 0.0012, h * 0.3), (r + 0.0012, h * 0.62), (0, h * 0.62)],\n                      pos=(x, y0, z), segs=28, mat=parch)\n        ctx.add_lathe(n + \"_cork\", [(0, h * 0.84), (r * 0.66, h * 0.84), (r * 0.74, h), (r * 0.7, h + 0.012), (0, h + 0.012)],\n                      pos=(x, y0, z), segs=20, mat=cork)\n\n    def tome(n, x, z, w, h, t, lean_deg, y0):\n        # small grimoire leaning sideways: lowest corner seated exactly on the tier\n        a = math.radians(abs(lean_deg))\n        cy = y0 + 0.5 * (h * math.cos(a) + t * math.sin(a))\n        ctx.add_bevel_box(n, (t, h, w), pos=(x, cy, z), rot_deg=(0, 0, lean_deg), bevel=0.003, mat=leather)\n        ctx.add_bevel_box(n + \"_pages\", (t * 0.82, h * 0.92, w * 0.06), pos=(x, cy, z + w * 0.48),\n                          rot_deg=(0, 0, lean_deg), bevel=0.001, mat=parch)\n        shells[y0].append(n)\n\n    # ---- Lower tier (y=0): items <= 0.17 m to clear upper shelf underside (0.195)\n    for i, (x, h) in enumerate([(-0.60, 0.12), (-0.555, 0.095), (-0.51, 0.145), (-0.465, 0.08), (-0.42, 0.11)]):\n        vial(\"vial_lo_%d\" % i, x, rng.uniform(-0.04, 0.03), h, 0.017, T1, [emer, amber, None][i % 3])\n    jar(\"jar_lo_a\", -0.30, -0.02, 0.085, 0.045, T1, emer)\n    jar(\"jar_lo_b\", -0.18, 0.01, 0.07, 0.04, T1, cork)\n    tome(\"grimoire_a\", -0.04, -0.01, 0.15, 0.17, 0.035, -14.0, T1)\n    tome(\"grimoire_b\", 0.02, -0.01, 0.14, 0.155, 0.03, -6.0, T1)\n    # glowing amber elixir flask aligned to emitter \"elixir_glow_hutch\"\n    fx, fz, fh, fr = 0.22, -0.01, 0.165, 0.05\n    fl = [(0, 0), (fr * 0.55, 0), (fr, fh * 0.22), (fr * 0.95, fh * 0.42), (fr * 0.35, fh * 0.6),\n          (fr * 0.3, fh * 0.92), (0, fh * 0.92)]\n    ctx.add_lathe(\"elixir_flask_hutch\", fl, pos=(fx, T1, fz), segs=36, lip_bevel=0.0015, mat=glass)\n    shells[T1].append(\"elixir_flask_hutch\")\n    ctx.add_lathe(\"elixir_glow_hutch\", [(0, 0.004), (fr * 0.5, 0.004), (fr - 0.004, fh * 0.22),\n                  (fr * 0.9, fh * 0.42), (fr * 0.5, fh * 0.52), (0, fh * 0.52)], pos=(fx, T1, fz), segs=36, mat=amber)\n    ctx.add_lathe(\"elixir_flask_cork\", [(0, fh * 0.88), (fr * 0.34, fh * 0.88), (fr * 0.38, fh), (0, fh)],\n                  pos=(fx, T1, fz), segs=16, mat=cork)\n    jar(\"jar_lo_c\", 0.38, 0.0, 0.10, 0.05, T1, amber)\n    for i, x in enumerate([0.50, 0.545, 0.59, 0.625]):\n        vial(\"vial_lo_r%d\" % i, x, rng.uniform(-0.05, 0.04), rng.uniform(0.06, 0.13), 0.015, T1, emer if i % 2 else amber)\n\n    # ---- Upper tier (y=0.22): items <= 0.18 m, cornice top kept clear\n    jar(\"jar_hi_a\", -0.56, -0.01, 0.12, 0.055, T2, amber)\n    for i, x in enumerate([-0.44, -0.395, -0.35, -0.305, -0.26, -0.215]):\n        vial(\"vial_hi_%d\" % i, x, rng.uniform(-0.05, 0.04), 0.06 + 0.12 * ((i * 37) % 6) / 5.0, 0.016, T2,\n             [amber, emer, None][i % 3])\n    jar(\"jar_hi_b\", -0.07, 0.0, 0.075, 0.048, T2, cork)\n    jar(\"jar_hi_c\", 0.06, -0.02, 0.095, 0.042, T2, emer)\n    for i, x in enumerate([0.19, 0.235, 0.28, 0.325, 0.37]):\n        vial(\"vial_hi_r%d\" % i, x, rng.uniform(-0.05, Z_FRONT - 0.03), rng.uniform(0.07, 0.17), 0.015, T2,\n             emer if i % 2 == 0 else amber)\n    jar(\"jar_hi_d\", 0.50, -0.01, 0.11, 0.05, T2, amber)\n    vial(\"vial_hi_end\", 0.61, 0.0, 0.18, 0.018, T2, emer)\n\n    # BVH settle each tier's load-bearing shells onto its shelf plane (exact placement => ~zero travel)\n    ctx.settle_group(shells[T1], floor_y=T1, inset=0.0)\n    ctx.settle_group(shells[T2], floor_y=T2, inset=0.0)"
      }
    },
    {
      "id": "floor_props",
      "name": "Slab-Level Ingredient Crates & Sack",
      "category": "props/floor_dressing",
      "role": "decor",
      "reusable": true,
      "tags": [
        "crate",
        "burlap_sack",
        "herbs",
        "floor_clutter",
        "grounding"
      ],
      "pos": [
        0.6,
        0.057,
        0.38
      ],
      "rotDeg": [
        0,
        -18,
        0
      ],
      "scale": [
        1,
        1,
        1
      ],
      "boundsHintM": {
        "size": [
          0.4,
          0.3,
          0.3
        ]
      },
      "attach": {
        "parent": "floor_slab",
        "mode": "seat_on",
        "face": "+y",
        "offset": [
          0.6,
          0,
          0.38
        ],
        "overlapM": 0.003
      },
      "nodes": [],
      "generator": {
        "runtime": "blender_py_v3",
        "entry": "build",
        "seed": 108,
        "summary": "Slab-Level Ingredient Crates & Sack",
        "code": "def build(ctx):\n    P = ctx.params\n    rng = random.Random(ctx.seed if ctx.seed is not None else 7)\n    ov = P.get(\"overlapM\", 0.004)\n    walnut, stone, cork = ctx.mat(\"walnut\"), ctx.mat(\"mortar_stone\"), ctx.mat(\"cork\")\n    sack_mat = ctx.make_material(\"sack_linen_dark\", base_color=\"#3E0A14\", roughness=0.86,\n                                 sheen=0.45, noise_scale=42.0, bump_strength=0.22,\n                                 ao_wear=0.35, ao_color=\"#1A0508\", edge_bevel_mm=0.5)\n    herb_mat = ctx.make_material(\"dried_herbs\", base_color=\"#5E6B3A\", roughness=0.9,\n                                 sheen=0.2, noise_scale=60.0, bump_strength=0.35, ao_wear=0.4)\n    twine = ctx.make_material(\"twine\", base_color=\"#9C8256\", roughness=0.92, noise_scale=80.0)\n\n    # ---- Crate: 0.30 x 0.20 x 0.22, shifted left so the sack fits inside 0.4 width\n    cw, ch, cd = 0.30, 0.20, 0.22\n    cx = -0.05\n    post, slat_t, base_t = 0.022, 0.010, 0.012\n    parts = []\n    ctx.add_bevel_box(\"crate_base\", (cw - 0.004, base_t, cd - 0.004), pos=(cx, base_t / 2, 0),\n                      bevel=0.002, mat=walnut); parts.append(\"crate_base\")\n    for i, (sx, sz) in enumerate([(-1, -1), (1, -1), (-1, 1), (1, 1)]):\n        n = \"crate_post_%d\" % i\n        ctx.add_bevel_box(n, (post, ch, post),\n                          pos=(cx + sx * (cw / 2 - post / 2), ch / 2, sz * (cd / 2 - post / 2)),\n                          bevel=0.003, mat=walnut); parts.append(n)\n    slat_h, gap = 0.042, 0.012\n    for k in range(4):\n        y = base_t + 0.004 + slat_h / 2 + k * (slat_h + gap)\n        if y + slat_h / 2 > ch: break\n        for s in (-1, 1):   # front/back long slats\n            n = \"crate_slat_fb_%d_%d\" % (k, s)\n            ctx.add_bevel_box(n, (cw - 0.006, slat_h, slat_t),\n                              pos=(cx, y, s * (cd / 2 - slat_t / 2 + 0.001)),\n                              rot_deg=(0, 0, rng.uniform(-0.6, 0.6)), bevel=0.0025, mat=walnut)\n            parts.append(n)\n            n = \"crate_slat_lr_%d_%d\" % (k, s)\n            ctx.add_bevel_box(n, (slat_t, slat_h, cd - 2 * post + 2 * ov),\n                              pos=(cx + s * (cw / 2 - slat_t / 2 + 0.001), y, 0),\n                              bevel=0.0025, mat=walnut)\n            parts.append(n)\n\n    # ---- Stoppered stoneware jug inside crate (rests on crate floor)\n    jx, jz, jy0 = cx - 0.06, 0.0, base_t - ov\n    prof = [(0.0, 0.0), (0.050, 0.0), (0.062, 0.03), (0.068, 0.08), (0.060, 0.14),\n            (0.034, 0.19), (0.022, 0.215), (0.024, 0.235), (0.020, 0.24), (0.0, 0.24)]\n    ctx.add_lathe(\"jug_body\", prof, pos=(jx, jy0, jz), segs=40, lip_bevel=0.002, mat=stone)\n    ctx.add_lathe(\"jug_cork\", [(0.0, 0.0), (0.017, 0.0), (0.020, 0.028), (0.0, 0.028)],\n                  pos=(jx, jy0 + 0.228, jz), segs=24, mat=cork)\n    ctx.add_tube(\"jug_handle\", [(jx + 0.026, jy0 + 0.21, jz), (jx + 0.07, jy0 + 0.205, jz),\n                                (jx + 0.072, jy0 + 0.16, jz), (jx + 0.058, jy0 + 0.13, jz)],\n                 radius=0.008, mat=stone)\n\n    # ---- Dried herb bundles leaning in crate (watertight SDF heads + tubes for stems)\n    def smin(a, b, k):\n        h = np.clip(0.5 + 0.5 * (b - a) / k, 0.0, 1.0)\n        return b * (1 - h) + a * h - k * h * (1 - h)\n    for b in range(3):\n        bx, bz = cx + 0.05 + b * 0.035, -0.05 + b * 0.05\n        lean = rng.uniform(-0.03, 0.03)\n        y0, y1 = base_t + 0.01, ch + 0.06 + rng.uniform(-0.01, 0.015)\n        ctx.add_tube(\"herb_stems_%d\" % b, [(bx, y0, bz), (bx + lean * 0.5, (y0 + y1) / 2, bz),\n                                           (bx + lean, y1 - 0.03, bz)],\n                     radius=0.011, taper=[1.0, 0.8], mat=herb_mat)\n        hc = np.array([bx + lean * 1.2, y1, bz])\n        def head(p, hc=hc):\n            q = (p - hc) / np.array([0.032, 0.045, 0.030])\n            d = (np.linalg.norm(q, axis=-1) - 1.0) * 0.03\n            return d + 0.004 * np.sin(p[..., 0] * 210) * np.sin(p[..., 1] * 170 + p[..., 2] * 190)\n        ctx.sdf_mesh(\"herb_head_%d\" % b, head, tuple(hc - 0.06), tuple(hc + 0.06),\n                     res=40, mat=herb_mat, smooth_iters=2)\n        ctx.add_lathe(\"herb_tie_%d\" % b, [(0.0, 0.0), (0.014, 0.0), (0.014, 0.008), (0.0, 0.008)],\n                      pos=(bx + lean * 0.7, y1 - 0.06, bz), segs=20, mat=twine)\n\n    # ---- Slumped sack leaning against crate's right side\n    sx0 = cx + cw / 2 + 0.003\n    def sack(p):\n        body = (np.linalg.norm((p - np.array([sx0 + 0.05, 0.075, 0.01])) /\n                               np.array([0.052, 0.078, 0.09]), axis=-1) - 1.0) * 0.05\n        neck = (np.linalg.norm((p - np.array([sx0 + 0.03, 0.16, 0.0])) /\n                               np.array([0.02, 0.035, 0.022]), axis=-1) - 1.0) * 0.02\n        d = smin(body, neck, 0.025)\n        d = np.maximum(d, -(p[..., 1] - 0.0))          # flat slumped bottom\n        d = np.maximum(d, (sx0 - 0.002) - p[..., 0])    # flattened against crate\n        return d + 0.003 * np.sin(p[..., 1] * 90 + p[..., 2] * 40)\n    ctx.sdf_mesh(\"sack_body\", sack, (sx0 - 0.01, -0.01, -0.11), (sx0 + 0.11, 0.21, 0.11),\n                 res=56, mat=sack_mat, smooth_iters=3)\n    ctx.add_lathe(\"sack_tie\", [(0.0, 0.0), (0.017, 0.0), (0.017, 0.01), (0.0, 0.01)],\n                  pos=(sx0 + 0.03, 0.15, 0.0), segs=20, mat=twine)\n\n    # ---- Look-dev & grounding onto slab-local y=0\n    ctx.surface_story(\"walnut\", edge_wear=0.4, dust=0.22, grime_height=0.12, scratches=0.15)\n    ctx.surface_story(\"mortar_stone\", edge_wear=0.25, dust=0.3, grime_height=0.08, scratches=0.05)\n    ctx.settle_group(parts + [\"sack_body\"], floor_y=0.0, inset=0.002)"
      }
    }
  ],
  "sockets": [
    {
      "id": "tabletop_surface",
      "role": "surface",
      "pos": [
        0,
        0.92,
        -0.1
      ],
      "normal": [
        0,
        1,
        0
      ],
      "radiusM": 0.25
    },
    {
      "id": "hutch_shelf_1",
      "role": "surface",
      "pos": [
        0,
        1.14,
        -0.31
      ],
      "normal": [
        0,
        1,
        0
      ],
      "radiusM": 0.25
    },
    {
      "id": "hutch_shelf_2",
      "role": "surface",
      "pos": [
        0,
        1.36,
        -0.31
      ],
      "normal": [
        0,
        1,
        0
      ],
      "radiusM": 0.25
    },
    {
      "id": "tabletop_front_edge",
      "role": "surface",
      "pos": [
        0,
        0.92,
        0.25
      ],
      "normal": [
        0,
        0,
        1
      ],
      "radiusM": 0.25
    }
  ],
  "exclusions": [
    {
      "id": "apparatus_zone",
      "reason": "clearance",
      "min": [
        0.17,
        0.92,
        -0.22
      ],
      "max": [
        0.67,
        1.47,
        0.13
      ]
    },
    {
      "id": "runner_cascade_zone",
      "reason": "clearance",
      "min": [
        -0.49,
        0.62,
        0.25
      ],
      "max": [
        -0.11,
        0.92,
        0.3
      ]
    },
    {
      "id": "camera_sightline_hero",
      "reason": "clearance",
      "min": [
        -0.9,
        1.6,
        -0.6
      ],
      "max": [
        0.9,
        2,
        0.6
      ]
    }
  ],
  "lighting": {
    "environmentPreset": "twilight_warm",
    "sun": {
      "azimuthDeg": 225,
      "elevationDeg": 38,
      "intensity": 0.6,
      "kelvin": 4200,
      "angularDiameterDeg": 1.2,
      "airDensity": 1.05,
      "aerosolDensity": 0.9,
      "ozoneDensity": 1.5
    },
    "exposureEV": 0.3,
    "toneMapping": "AgX",
    "agxLook": "AgX - Medium High Contrast",
    "ambientStrength": 0.12,
    "emitters": [
      {
        "id": "key_golden",
        "type": "area",
        "pos": [
          -1.6,
          2.4,
          1.9
        ],
        "target": [
          -0.05,
          1,
          -0.1
        ],
        "size": [
          1.2,
          1.2
        ],
        "powerW": 420,
        "kelvin": 3000
      },
      {
        "id": "rim_sapphire",
        "type": "spot",
        "pos": [
          1.5,
          2.2,
          -1.7
        ],
        "target": [
          0,
          1.1,
          -0.2
        ],
        "radius": 0.15,
        "powerW": 360,
        "kelvin": 9500
      },
      {
        "id": "fill_soft",
        "type": "area",
        "pos": [
          2.2,
          1.4,
          1.6
        ],
        "target": [
          0,
          0.9,
          0
        ],
        "size": [
          1,
          0.8
        ],
        "powerW": 90,
        "kelvin": 4200
      },
      {
        "id": "elixir_glow_amber",
        "type": "point",
        "pos": [
          0.56,
          1.07,
          -0.12
        ],
        "radius": 0.03,
        "powerW": 6,
        "kelvin": 2300
      },
      {
        "id": "elixir_glow_hutch",
        "type": "point",
        "pos": [
          0.3,
          1.24,
          -0.3
        ],
        "radius": 0.03,
        "powerW": 4,
        "kelvin": 2300
      },
      {
        "id": "elixir_glow_emerald",
        "type": "point",
        "pos": [
          0.32,
          1.02,
          0.02
        ],
        "radius": 0.025,
        "powerW": 4,
        "kelvin": 6500
      },
      {
        "id": "candle_flame_l",
        "type": "point",
        "pos": [
          -0.72,
          1.22,
          0.12
        ],
        "radius": 0.008,
        "powerW": 3,
        "kelvin": 1850
      },
      {
        "id": "candle_flame_r",
        "type": "point",
        "pos": [
          0.02,
          1.17,
          0.14
        ],
        "radius": 0.008,
        "powerW": 3,
        "kelvin": 1850
      }
    ],
    "optics": {
      "glareThreshold": 1.35,
      "glareMix": 0.24,
      "vignette": 0.16,
      "grain": 0.02,
      "dofFStop": 8,
      "focusDistM": 3.9
    }
  },
  "lightmap": {
    "uv2Policy": "auto_smart_project",
    "texelDensityPxPerM": 64,
    "atlasSize": 2048,
    "marginPx": 4,
    "bakeMode": "cycles_combined",
    "castShadow": true,
    "receiveShadow": true
  },
  "lodRules": {
    "tiers": {
      "lod0": {
        "segScale": 1,
        "maxTris": 250000,
        "includeMicroDecor": true
      },
      "lod1": {
        "segScale": 0.65,
        "maxTris": 80000,
        "includeMicroDecor": true
      },
      "lod2": {
        "segScale": 0.35,
        "maxTris": 20000,
        "includeMicroDecor": false
      }
    },
    "materialSlotsInvariant": true
  },
  "compilationTiers": {},
  "portals": [],
  "cameras": [
    {
      "id": "hero",
      "name": "hero",
      "kind": "hero",
      "pos": [
        2.75,
        2.35,
        2.75
      ],
      "target": [
        0,
        0.78,
        -0.08
      ],
      "focalLengthMm": 35,
      "shiftY": 0,
      "dofFStop": 8
    },
    {
      "id": "grazing",
      "name": "grazing",
      "kind": "hero",
      "pos": [
        -1.95,
        1.02,
        1.55
      ],
      "target": [
        0.15,
        0.98,
        -0.12
      ],
      "focalLengthMm": 35,
      "shiftY": 0,
      "dofFStop": 2.8
    },
    {
      "id": "detail_apparatus",
      "name": "detail_apparatus",
      "kind": "hero",
      "pos": [
        1.15,
        1.22,
        0.85
      ],
      "target": [
        0.42,
        1.08,
        -0.07
      ],
      "focalLengthMm": 35,
      "shiftY": 0,
      "dofFStop": 2
    }
  ],
  "motion": {
    "fps": 30,
    "durationSec": 4,
    "clips": []
  },
  "colliders": [
    {
      "groupId": "floor_slab",
      "shape": "box"
    },
    {
      "groupId": "workbench_hutch",
      "shape": "box"
    },
    {
      "groupId": "workbench_hutch",
      "shape": "box"
    },
    {
      "groupId": "workbench_hutch",
      "shape": "box"
    },
    {
      "groupId": "table_runner",
      "shape": "box"
    }
  ]
}