{
 "id": "clay",
 "title": "CLAY",
 "aliases": [],
 "domain": "genai",
 "subdomain": "native 3D latent diffusion",
 "stage": "generation",
 "realtime": "offline",
 "platforms": [
  "cuda",
  "python"
 ],
 "year_introduced": 2024,
 "inputs": [
  "text-prompt",
  "ldr-image"
 ],
 "outputs": [
  "mesh",
  "material-params"
 ],
 "style": "both",
 "dynamic": "static",
 "summary": "A large controllable 3D generator that trains a multi-resolution geometry VAE and a diffusion transformer on 3D data, then adds a material-diffusion stage for PBR textures.",
 "how_it_works": "Geometry is encoded from sampled surface points into a compact latent with a VAE, and a diffusion transformer learns to generate that latent from text, images, point clouds, voxels or bounding boxes, giving several control channels. After the shape is decoded and meshed, a second diffusion model that works on multi-view renders generates PBR material maps (albedo, roughness, metallic) and projects them into UV space. The paper stresses a data-curation and scale recipe: the quality gain comes from large cleaned 3D data and model capacity rather than a new loss.",
 "when_to_use": "Choose it as the reference for native-3D latent diffusion with PBR output, noting that I found a paper but no public repository or weights. Prefer open pipelines `hunyuan3d-2-1`, `trellis-2` or `trellis` when you need runnable code.",
 "cost": {
  "class": "offline",
  "notes": "No public weights or repository found, so no inference cost data."
 },
 "failure_modes": [
  "Cannot be reproduced locally: closed model and data",
  "PBR maps are inferred from images and can contradict the real material",
  "Mesh topology is dense and unstructured",
  "Prompt control is coarse for fine part-level edits"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/3658146",
   "type": "paper",
   "title": "CLAY: A Controllable Large-scale Generative Model for Creating High-quality 3D Assets",
   "authors": [
    "Longwen Zhang",
    "Ziyu Wang",
    "Qixuan Zhang",
    "Qiwei Qiu",
    "Anqi Pang",
    "Haoran Jiang",
    "Wei Yang",
    "Lan Xu",
    "Jingyi Yu"
   ],
   "year": 2024,
   "venue": "ACM Transactions on Graphics",
   "url": "https://doi.org/10.1145/3658146",
   "ids": {
    "doi": "10.1145/3658146"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3658146",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3658146",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3658146",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3658146",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3658146",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "zhang2024clay"
  }
 ],
 "presets": [
  {
   "id": "clay-live",
   "title": "CLAY — noisy 3D DiT latent geometry (left) vs denoised PBR-textured hero asset (right)",
   "runtime": "glsl-fragment",
   "params": {
    "P_DENOISE": 0.76,
    "P_PBR_METAL": 0.65,
    "P_ROT_SPEED": 0.55,
    "P_SPLIT": 0.46
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_DENOISE = 0.76; // P DiT Denoise [0.05, 1.0, 0.02]\nconst float P_PBR_METAL = 0.65; // P PBR Metallic [0.0, 1.0, 0.02]\nconst float P_ROT_SPEED = 0.55; // P Orbit Speed [0.0, 2.2, 0.05]\nconst float P_SPLIT = 0.46; // P Latent / PBR Split [0.0, 1.0, 0.02]\n\nmat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\nfloat sdBox(vec3 p, vec3 b) {\n  vec3 q = abs(p) - b;\n  return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);\n}\n\n// Multi-resolution sculpted armored helmet/relic generated by CLAY DiT\nfloat mapRelic(vec3 p, float spin, float noiseAmt) {\n  vec3 q = p;\n  q.xz = rot2(spin * 0.48) * q.xz;\n  float dome = length(q * vec3(1.0, 0.85, 1.05)) - 0.56;\n  float visor = sdBox(q - vec3(0.0, 0.06, 0.42), vec3(0.36, 0.11, 0.25)) - 0.04;\n  float crest = sdBox(q - vec3(0.0, 0.54, 0.0), vec3(0.07, 0.24, 0.44)) - 0.03;\n  float d = min(max(dome, -visor), crest);\n  // Multi-resolution DiT denoising perturbation (vanishes as P_DENOISE -> 1)\n  float n = sin(q.x * 13.0) * cos(q.y * 13.0) * sin(q.z * 13.0)\n          + 0.5 * sin(q.x * 23.0 + q.z * 19.0);\n  return (d + n * 0.085 * noiseAmt) * 0.78;\n}\n\nvec3 calcNormal(vec3 p, float spin, float noiseAmt) {\n  vec2 e = vec2(0.0025, 0.0);\n  return normalize(vec3(\n    mapRelic(p + e.xyy, spin, noiseAmt) - mapRelic(p - e.xyy, spin, noiseAmt),\n    mapRelic(p + e.yxy, spin, noiseAmt) - mapRelic(p - e.yxy, spin, noiseAmt),\n    mapRelic(p + e.yyx, spin, noiseAmt) - mapRelic(p - e.yyx, spin, noiseAmt)\n  ));\n}\n\nvec3 aces(vec3 x) {\n  x = max(x, 0.0);\n  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  float screenX = fragCoord.x / max(iResolution.x, 1.0);\n  float split = clamp(P_SPLIT, 0.0, 1.0);\n  bool isPBR = screenX >= split;\n  float denoise = clamp(P_DENOISE, 0.0, 1.0);\n  float metal = clamp(P_PBR_METAL, 0.0, 1.0);\n  float spin = iTime * max(P_ROT_SPEED, 0.0);\n\n  // Left shows coarse/noisy latent stage; right shows denoised PBR stage\n  float noiseAmt = isPBR ? (1.0 - denoise) * 0.25 : (1.15 - 0.65 * denoise);\n\n  vec3 ro = vec3(0.0, 0.10, 2.28);\n  vec3 rd = normalize(vec3(uv, -1.52));\n  vec3 col = mix(vec3(0.028, 0.032, 0.048), vec3(0.072, 0.082, 0.118), smoothstep(-0.55, 0.55, uv.y));\n\n  float t = 0.0;\n  bool hit = false;\n  for (int i = 0; i < 56; i++) {\n    float d = mapRelic(ro + rd * t, spin, noiseAmt);\n    if (d < 0.0025) { hit = true; break; }\n    t += d;\n    if (t > 5.0) break;\n  }\n\n  if (hit) {\n    vec3 p = ro + rd * t;\n    vec3 n = calcNormal(p, spin, noiseAmt);\n    vec3 objP = p;\n    objP.xz = rot2(spin * 0.48) * objP.xz;\n\n    vec3 l1 = normalize(vec3(0.60, 0.80, 0.55));\n    vec3 l2 = normalize(vec3(-0.75, 0.15, 0.45));\n    float diff1 = max(dot(n, l1), 0.0);\n    float diff2 = max(dot(n, l2), 0.0);\n    vec3 h1 = normalize(l1 - rd);\n    float spec = pow(max(dot(n, h1), 0.0), isPBR ? 56.0 : 12.0);\n    float fres = pow(1.0 - max(dot(n, -rd), 0.0), 4.0);\n\n    if (!isPBR) {\n      // Left: CLAY untextured clay-geometry latent + DiT token lattice lines\n      vec3 clayCol = vec3(0.68, 0.65, 0.62) * (0.28 + 0.72 * diff1 + 0.22 * diff2);\n      vec3 tokGrid = abs(fract(objP * 8.0) - 0.5);\n      float tokLine = smoothstep(0.06, 0.015, min(tokGrid.x, min(tokGrid.y, tokGrid.z)));\n      clayCol = mix(clayCol, vec3(0.28, 0.82, 0.98), tokLine * 0.42);\n      col = clayCol + vec3(0.85) * spec * 0.18;\n    } else {\n      // Right: Stage-2 PBR material diffusion (anodized dark bronze + brushed gold crest + glowing visor)\n      float isCrest = smoothstep(0.36, 0.48, objP.y) * smoothstep(0.16, 0.08, abs(objP.x));\n      float isVisor = smoothstep(0.14, 0.08, abs(objP.y - 0.06)) * smoothstep(0.28, 0.36, objP.z);\n      vec3 baseAlb = mix(vec3(0.24, 0.28, 0.36), vec3(0.92, 0.68, 0.26), isCrest);\n      vec3 f0 = mix(vec3(0.04), baseAlb, metal);\n      vec3 F = f0 + (1.0 - f0) * fres;\n      vec3 envRef = mix(vec3(0.12, 0.22, 0.36), vec3(0.95, 0.85, 0.72), smoothstep(-0.3, 0.6, reflect(rd, n).y));\n      col = baseAlb * (1.0 - metal * 0.65) * (0.24 + 0.78 * diff1 + 0.25 * diff2)\n          + F * (envRef * 0.58 + vec3(1.0, 0.95, 0.88) * spec * 1.15);\n      col = mix(col, vec3(0.18, 0.92, 1.0) * 1.45, isVisor);\n    }\n  }\n\n  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));\n  col = mix(col, vec3(0.95, 0.97, 1.0), sep);\n\n  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-30",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "clay",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-30T20:35:45.000Z",
     "renderer": "Headless EGL Tesla T4/PCIe/SSE2, OpenGL 3.30 Core, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.511,
      "std": 0.2291,
      "min": 0.1774,
      "max": 0.9014
     },
     "image": "/specimens/clay-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "hunyuan3d-2-1",
  "trellis-2",
  "trellis"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/genai/clay.json"
 },
 "solves": [
  "generate high quality 3d assets with pbr textures from text",
  "want a native 3d diffusion model with material output",
  "need reference for large controllable 3d generators",
  "generated geometry should come with roughness and metallic maps"
 ],
 "authority": "Zhang et al., 2024",
 "url": "https://texelatlas.vercel.app/t/clay/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 15.81,
  "tier": "moderate",
  "p50_ms": 0.5202,
  "p95_ms": 0.5426,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 32,
  "preset_id": "clay-live",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 13.56,
   "tier": "moderate",
   "p50_ms": 0.2156,
   "p95_ms": 0.2198,
   "speedup_x": 2.41,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 10.85,
   "tier": "moderate",
   "p50_ms": 0.3126,
   "p95_ms": 0.318,
   "speedup_x": 1.66,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}