TRELLIS (Structured 3D Latents)
Encodes an asset as features attached to active cells of a sparse voxel grid, then generates it with two rectified-flow transformers (structure, then features) and decodes to Gaussians, radiance fields or a mesh.
Also known as SLAT
In the family Generative & learned 3D, structured-latent 3D 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 | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
A 3D asset is rendered from many views, features from a pretrained vision model are aggregated onto the voxels that intersect the surface, and a sparse VAE compresses them into a structured latent (SLAT): a list of occupied voxel positions plus a latent vector per voxel. Generation is two-stage. A first flow transformer predicts which voxels are occupied (the coarse structure); a second, sparse-aware transformer fills in the latent vector at each of those voxels. Separate decoders turn the same SLAT into 3D Gaussians, a radiance field or a mesh, so one model serves several output formats. Text or image conditioning enters through cross-attention.
When to choose it
Reach for it when
- generate high quality 3d assets from text or image
- need output in multiple formats like mesh or gaussians
- structured latent for 3d generation
- ai 3d models with good geometry and appearance
Choose it for MIT-licensed image- or text-to-3D when you want Gaussian or mesh output with decent textures and can run a CUDA GPU with a large memory budget. Prefer TRELLIS.2 (O-Voxel structured latents) when you need PBR channels and arbitrary topology, Hunyuan3D 2.1 for PBR-textured meshes, and TripoSR for the fastest throw-away result.
Field marks
- Voxel-grid structure stage limits thin surfaces and sub-voxel detail
- Mesh decoding from the SLAT can show holes or bumpy surfaces on complex objects
- Texture is baked appearance without separate PBR maps
- Weak on scenes or multi-object layouts, which are outside the training distribution
- Heavy install: custom sparse-convolution and attention backends
Presets
TRELLIS image-to-3D, repo defaults
{
"seed": 1,
"sparse_structure_sampler_params": {
"steps": 12,
"cfg_strength": 7.5
},
"slat_sampler_params": {
"steps": 12,
"cfg_strength": 3
},
"glb_simplify": 0.95,
"glb_texture_size": 1024
}Attribution: Values taken from the example script in microsoft/TRELLIS (MIT licence). · basis: 2
TRELLIS (SLAT) — sparse active surface voxel latents (left) vs decoded 3D asset (right)
{
"P_VOXEL_RES": 12,
"P_LATENT_GLOW": 0.95,
"P_ROT_SPEED": 0.58,
"P_SPLIT": 0.48
}Show GLSL (110 lines)
const float P_VOXEL_RES = 12.0; // P Sparse Grid Res [6.0, 20.0, 1.0]
const float P_LATENT_GLOW = 0.95; // P SLAT Feature Glow [0.1, 1.6, 0.05]
const float P_ROT_SPEED = 0.58; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P SLAT / Decoded [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
// Sculpted intertwined double-arch / knot object
float mapTarget(vec3 q) {
float t1 = length(vec2(length(q.xz) - 0.46, q.y)) - 0.20;
float t2 = length(vec2(length(q.xy) - 0.46, q.z)) - 0.18;
float h = clamp(0.5 + 0.5 * (t2 - t1) / 0.14, 0.0, 1.0);
return (mix(t2, t1, h) - 0.14 * h * (1.0 - h)) * 0.85;
}
vec3 calcNormal(vec3 q) {
vec2 e = vec2(0.0025, 0.0);
return normalize(vec3(
mapTarget(q + e.xyy) - mapTarget(q - e.xyy),
mapTarget(q + e.yxy) - mapTarget(q - e.yxy),
mapTarget(q + e.yyx) - mapTarget(q - e.yyx)
));
}
// Sparse voxel box distance around active surface voxels (TRELLIS SLAT)
float mapSparseVoxels(vec3 q, float voxRes, out vec3 cellId) {
float s = 1.0 / voxRes;
cellId = floor(q * voxRes + 0.5);
vec3 vc = cellId * s;
float dCenter = mapTarget(vc);
if (abs(dCenter) < s * 0.82) {
vec3 local = abs(q - vc) - vec3(s * 0.44);
return length(max(local, 0.0)) + min(max(local.x, max(local.y, local.z)), 0.0);
}
return max(abs(dCenter) - s * 0.72, s * 0.35);
}
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);
float voxRes = clamp(floor(P_VOXEL_RES + 0.5), 6.0, 22.0);
float glow = clamp(P_LATENT_GLOW, 0.05, 1.8);
float spin = iTime * max(P_ROT_SPEED, 0.0) * 0.52;
vec3 ro = vec3(0.0, 0.16, 2.35);
vec3 rd = normalize(vec3(uv - vec2(0.0, 0.03), -1.55));
ro.xz = rot2(spin) * ro.xz;
rd.xz = rot2(spin) * rd.xz;
ro.yz = rot2(0.28) * ro.yz;
rd.yz = rot2(0.28) * rd.yz;
vec3 col = mix(vec3(0.020, 0.028, 0.048), vec3(0.056, 0.076, 0.124), smoothstep(-0.55, 0.55, uv.y));
vec3 lDir = normalize(vec3(0.55, 0.82, 0.48));
if (screenX < split) {
// Left: Sparse active 3D voxel shell (SLAT) colored by latent feature embeddings
float t = 0.0;
bool hit = false;
vec3 cid = vec3(0.0);
for (int i = 0; i < 64; i++) {
float d = mapSparseVoxels(ro + rd * t, voxRes, cid);
if (d < 0.003) { hit = true; break; }
t += max(d * 0.72, 0.008);
if (t > 5.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec3 vc = cid / voxRes;
vec3 local = (p - vc) * voxRes;
vec3 an = abs(local);
vec3 fn = (an.x > an.y && an.x > an.z) ? vec3(sign(local.x), 0.0, 0.0)
: (an.y > an.z ? vec3(0.0, sign(local.y), 0.0) : vec3(0.0, 0.0, sign(local.z)));
float diff = max(dot(fn, lDir), 0.0);
// Latent feature RGB vector attached to each active voxel
vec3 featCol = 0.5 + 0.5 * sin(cid * vec3(0.55, 0.72, 0.48) + vec3(0.0, 2.1, 4.2));
float edge = smoothstep(0.36, 0.43, max(an.x, max(an.y, an.z)));
col = featCol * (0.32 + 0.75 * diff) * (0.75 + 0.35 * glow) + vec3(0.95) * edge * 0.28;
}
} else {
// Right: Decoded high-resolution smooth 3D PBR asset
float t = 0.0;
bool hit = false;
for (int i = 0; i < 56; i++) {
float d = mapTarget(ro + rd * t);
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);
float diff = max(dot(n, lDir), 0.0);
float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), 48.0);
float fres = pow(1.0 - max(dot(n, -rd), 0.0), 3.0);
vec3 alb = mix(vec3(0.14, 0.68, 0.86), vec3(0.96, 0.48, 0.24), smoothstep(-0.45, 0.45, p.y));
col = alb * (0.28 + 0.82 * diff) + vec3(1.0, 0.96, 0.90) * spec * 0.52 + vec3(0.28, 0.88, 0.98) * fres * 0.38;
}
}
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 |
|---|---|---|---|
| trellis-live | Tesla T4 1920x1080 | 11.8× baseline (moderate) · 0.390 ms / 0.421 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| trellis-live | NVIDIA L4 1920x1080 | 9.57× baseline (moderate) · 0.152 ms / 0.162 ms · 2.6× faster on L4 | opengl-timer-query · Cross-architecture validation |
| trellis-live | NVIDIA A100-SXM4-40GB 1920x1080 | 7.38× baseline (moderate) · 0.212 ms / 0.227 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites MeshAnything, CLAY, InstantMesh, TripoSR, Mip-Splatting, Large Reconstruction Model (LRM), DreamGaussian, 3D Gaussian Splatting, Shap-E, Segment Anything (SAM), Zero-1-to-3, Point-E, Score Distillation Sampling (DreamFusion), PolyGen autoregressive mesh generation, DeepSDF (neural signed distance functions); cited by Hunyuan3D 2.1, Hunyuan3D 2.0, Hunyuan3D-Paint, MeshFlow, SAM 3D Objects.
Crosses
- Hunyuan3D-Paint: TRELLIS produces a mesh; a separate texturing model can re-paint it with PBR-ready maps.
Sources
- primaryJianfeng Xiang, Zelong Lv, Sicheng Xu, Yu Deng, Ruicheng Wang, Bowen Zhang et al. (2024). Structured 3D Latents for Scalable and Versatile 3D Generation. arXiv preprint (cs.CV).Verified via arxiv · 2026-11-29arXiv:2412.01506
- primaryJianfeng Xiang, Zelong Lv, Sicheng Xu, Yu Deng, Ruicheng Wang, Bowen Zhang et al. (2025). Structured 3D Latents for Scalable and Versatile 3D Generation. 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Verified via crossref · 2026-11-29doi:10.1109/cvpr52734.2025.02000
- implementationmicrosoft (2024). microsoft/TRELLIS. Official repo for paper "Structured 3D Latents for Scalable and Versatile 3D Generation" (CVPR'25 Spotlight).GitHub API · license MIT · 2026-11-29