CLAY
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.
In the family Generative & learned 3D, native 3D latent diffusion
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | Not applicable | Offline reconstruction/generative method, not an engine feature. |
| Unity | None found | External generative 3D VAE/diffusion mesh model; not built into Unity. |
| Unreal 5.7 | None found | External generative 3D VAE/diffusion model; not built into Unreal Engine. |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
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 choose it
Reach for it when
- 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
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 (O-Voxel structured latents) or TRELLIS (Structured 3D Latents) when you need runnable code.
Field marks
- 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
Presets
CLAY — noisy 3D DiT latent geometry (left) vs denoised PBR-textured hero asset (right)
{
"P_DENOISE": 0.76,
"P_PBR_METAL": 0.65,
"P_ROT_SPEED": 0.55,
"P_SPLIT": 0.46
}Show GLSL (105 lines)
const float P_DENOISE = 0.76; // P DiT Denoise [0.05, 1.0, 0.02]
const float P_PBR_METAL = 0.65; // P PBR Metallic [0.0, 1.0, 0.02]
const float P_ROT_SPEED = 0.55; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.46; // P Latent / PBR Split [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
float sdBox(vec3 p, vec3 b) {
vec3 q = abs(p) - b;
return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);
}
// Multi-resolution sculpted armored helmet/relic generated by CLAY DiT
float mapRelic(vec3 p, float spin, float noiseAmt) {
vec3 q = p;
q.xz = rot2(spin * 0.48) * q.xz;
float dome = length(q * vec3(1.0, 0.85, 1.05)) - 0.56;
float visor = sdBox(q - vec3(0.0, 0.06, 0.42), vec3(0.36, 0.11, 0.25)) - 0.04;
float crest = sdBox(q - vec3(0.0, 0.54, 0.0), vec3(0.07, 0.24, 0.44)) - 0.03;
float d = min(max(dome, -visor), crest);
// Multi-resolution DiT denoising perturbation (vanishes as P_DENOISE -> 1)
float n = sin(q.x * 13.0) * cos(q.y * 13.0) * sin(q.z * 13.0)
+ 0.5 * sin(q.x * 23.0 + q.z * 19.0);
return (d + n * 0.085 * noiseAmt) * 0.78;
}
vec3 calcNormal(vec3 p, float spin, float noiseAmt) {
vec2 e = vec2(0.0025, 0.0);
return normalize(vec3(
mapRelic(p + e.xyy, spin, noiseAmt) - mapRelic(p - e.xyy, spin, noiseAmt),
mapRelic(p + e.yxy, spin, noiseAmt) - mapRelic(p - e.yxy, spin, noiseAmt),
mapRelic(p + e.yyx, spin, noiseAmt) - mapRelic(p - e.yyx, spin, noiseAmt)
));
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool isPBR = screenX >= split;
float denoise = clamp(P_DENOISE, 0.0, 1.0);
float metal = clamp(P_PBR_METAL, 0.0, 1.0);
float spin = iTime * max(P_ROT_SPEED, 0.0);
// Left shows coarse/noisy latent stage; right shows denoised PBR stage
float noiseAmt = isPBR ? (1.0 - denoise) * 0.25 : (1.15 - 0.65 * denoise);
vec3 ro = vec3(0.0, 0.10, 2.28);
vec3 rd = normalize(vec3(uv, -1.52));
vec3 col = mix(vec3(0.028, 0.032, 0.048), vec3(0.072, 0.082, 0.118), smoothstep(-0.55, 0.55, uv.y));
float t = 0.0;
bool hit = false;
for (int i = 0; i < 56; i++) {
float d = mapRelic(ro + rd * t, spin, noiseAmt);
if (d < 0.0025) { hit = true; break; }
t += d;
if (t > 5.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec3 n = calcNormal(p, spin, noiseAmt);
vec3 objP = p;
objP.xz = rot2(spin * 0.48) * objP.xz;
vec3 l1 = normalize(vec3(0.60, 0.80, 0.55));
vec3 l2 = normalize(vec3(-0.75, 0.15, 0.45));
float diff1 = max(dot(n, l1), 0.0);
float diff2 = max(dot(n, l2), 0.0);
vec3 h1 = normalize(l1 - rd);
float spec = pow(max(dot(n, h1), 0.0), isPBR ? 56.0 : 12.0);
float fres = pow(1.0 - max(dot(n, -rd), 0.0), 4.0);
if (!isPBR) {
// Left: CLAY untextured clay-geometry latent + DiT token lattice lines
vec3 clayCol = vec3(0.68, 0.65, 0.62) * (0.28 + 0.72 * diff1 + 0.22 * diff2);
vec3 tokGrid = abs(fract(objP * 8.0) - 0.5);
float tokLine = smoothstep(0.06, 0.015, min(tokGrid.x, min(tokGrid.y, tokGrid.z)));
clayCol = mix(clayCol, vec3(0.28, 0.82, 0.98), tokLine * 0.42);
col = clayCol + vec3(0.85) * spec * 0.18;
} else {
// Right: Stage-2 PBR material diffusion (anodized dark bronze + brushed gold crest + glowing visor)
float isCrest = smoothstep(0.36, 0.48, objP.y) * smoothstep(0.16, 0.08, abs(objP.x));
float isVisor = smoothstep(0.14, 0.08, abs(objP.y - 0.06)) * smoothstep(0.28, 0.36, objP.z);
vec3 baseAlb = mix(vec3(0.24, 0.28, 0.36), vec3(0.92, 0.68, 0.26), isCrest);
vec3 f0 = mix(vec3(0.04), baseAlb, metal);
vec3 F = f0 + (1.0 - f0) * fres;
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));
col = baseAlb * (1.0 - metal * 0.65) * (0.24 + 0.78 * diff1 + 0.25 * diff2)
+ F * (envRef * 0.58 + vec3(1.0, 0.95, 0.88) * spec * 1.15);
col = mix(col, vec3(0.18, 0.92, 1.0) * 1.45, isVisor);
}
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| clay-live | Tesla T4 1920x1080 | 15.8× baseline (moderate) · 0.520 ms / 0.543 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| clay-live | NVIDIA L4 1920x1080 | 13.6× baseline (moderate) · 0.216 ms / 0.220 ms · 2.4× faster on L4 | opengl-timer-query · Cross-architecture validation |
| clay-live | NVIDIA A100-SXM4-40GB 1920x1080 | 10.8× baseline (moderate) · 0.313 ms / 0.318 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites QuadriFlow, 3D Gaussian Splatting; cited by Hunyuan3D 2.1, Hunyuan3D 2.0, Hunyuan3D-Paint, MeshFlow, TRELLIS.2 (O-Voxel structured latents), TRELLIS (Structured 3D Latents).
Sources
- primaryLongwen Zhang, Ziyu Wang, Qixuan Zhang, Qiwei Qiu, Anqi Pang, Haoran Jiang et al. (2024). CLAY: A Controllable Large-scale Generative Model for Creating High-quality 3D Assets. ACM Transactions on Graphics.Verified via crossref · 2026-11-29doi:10.1145/3658146