InstantMesh
Generates a fixed set of consistent views of the object with a multi-view diffusion model, then reconstructs a mesh from those views with a sparse-view LRM that extracts surfaces differentiably.
In the family Generative & learned 3D, multi-view diffusion + sparse-view LRM
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
Step one runs a multi-view diffusion model that, from one image, produces a six-view grid at known camera poses. Step two feeds those views into a sparse-view Large Reconstruction Model, which predicts a triplane that is decoded to a differentiable iso-surface (FlexiCubes) rather than a NeRF, so training can add geometry losses on depth and normals directly on the mesh. Having a mesh representation in the loop yields cleaner surfaces than density-field marching cubes. Total inference is the diffusion sampling plus one reconstruction pass.
When to choose it
Reach for it when
- generate a 3d mesh from one photo quickly
- turn a single image into textured model in seconds
- image to 3d output looks inconsistent from other sides
- need fast feed-forward single image reconstruction
Choose it when you want a textured mesh from one picture in seconds and can accept an Apache-2.0 pipeline with a diffusion front end. Prefer TripoSR when speed and simplicity matter most, TRELLIS (Structured 3D Latents) or Hunyuan3D 2.0 when you need higher fidelity or PBR, and Zero-1-to-3 if you only need novel views.
Field marks
- Multi-view generator hallucinations (wrong back, extra limbs) are baked into the reconstruction
- Fixed six views limit coverage of concavities
- Textures are vertex-coloured or baked from low-resolution views and blur on close inspection
- Unusual aspect ratios or inputs with cast shadows break the consistency of the view grid
Presets
InstantMesh — orthogonal triplane feature grids (left) vs FlexiCubes decoded 3D mesh (right)
{
"P_PLANE_GLOW": 0.9,
"P_ISO_DETAIL": 0.75,
"P_ROT_SPEED": 0.6,
"P_SPLIT": 0.48
}Show GLSL (123 lines)
const float P_PLANE_GLOW = 0.90; // P Triplane Glow [0.1, 1.6, 0.05]
const float P_ISO_DETAIL = 0.75; // P Mesh Detail [0.1, 1.0, 0.02]
const float P_ROT_SPEED = 0.60; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Triplane / Mesh [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
// 3 orthogonal triplane feature decoders F_xy, F_xz, F_yz summed to predict FlexiCubes SDF
float evalTriplaneSDF(vec3 q, float detail) {
float fXY = length(q.xy) - 0.52 + 0.08 * sin(q.x * 7.0) * cos(q.y * 7.0) * detail;
float fXZ = length(q.xz) - 0.52 + 0.08 * cos(q.x * 6.0 - q.z * 6.0) * detail;
float fYZ = length(q.yz) - 0.52 + 0.08 * sin(q.y * 6.0 + q.z * 6.0) * detail;
// Intersection of 3 orthogonal sculpted cylinders with rounded core -> mechanical artifact
float d = max(fXY, max(fXZ, fYZ));
float core = length(q) - 0.58;
return mix(d, core, 0.35) * 0.82;
}
vec3 calcNormal(vec3 p, float spin, float detail) {
vec2 e = vec2(0.0025, 0.0);
vec3 px = p + e.xyy; px.xz = rot2(spin) * px.xz; px.yz = rot2(0.32) * px.yz;
vec3 mx = p - e.xyy; mx.xz = rot2(spin) * mx.xz; mx.yz = rot2(0.32) * mx.yz;
vec3 py = p + e.yxy; py.xz = rot2(spin) * py.xz; py.yz = rot2(0.32) * py.yz;
vec3 my = p - e.yxy; my.xz = rot2(spin) * my.xz; my.yz = rot2(0.32) * my.yz;
vec3 pz = p + e.yyx; pz.xz = rot2(spin) * pz.xz; pz.yz = rot2(0.32) * pz.yz;
vec3 mz = p - e.yyx; mz.xz = rot2(spin) * mz.xz; mz.yz = rot2(0.32) * mz.yz;
return normalize(vec3(
evalTriplaneSDF(px, detail) - evalTriplaneSDF(mx, detail),
evalTriplaneSDF(py, detail) - evalTriplaneSDF(my, detail),
evalTriplaneSDF(pz, detail) - evalTriplaneSDF(mz, detail)
));
}
// Visualize feature activation on one of the 3 orthogonal triplanes
vec3 planeFeatureVis(vec2 u, vec3 tint) {
float inside = step(max(abs(u.x), abs(u.y)), 0.78);
vec2 g = abs(fract(u * 8.0) - 0.5);
float grid = smoothstep(0.07, 0.015, min(g.x, g.y));
float feat = 0.5 + 0.5 * sin(u.x * 11.0) * cos(u.y * 11.0);
float border = smoothstep(0.025, 0.005, abs(max(abs(u.x), abs(u.y)) - 0.78));
float silhouette = smoothstep(0.56, 0.44, length(u));
return inside * (tint * (0.18 + 0.45 * feat * silhouette) + tint * grid * 0.35 + vec3(1.0) * border * 0.85);
}
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 glow = clamp(P_PLANE_GLOW, 0.05, 1.8);
float detail = clamp(P_ISO_DETAIL, 0.05, 1.0);
float spin = iTime * max(P_ROT_SPEED, 0.0) * 0.55;
vec3 ro = vec3(0.0, 0.18, 2.45);
vec3 rd = normalize(vec3(uv - vec2(0.0, 0.03), -1.55));
vec3 col = mix(vec3(0.020, 0.028, 0.048), vec3(0.056, 0.078, 0.128), smoothstep(-0.55, 0.55, uv.y));
// Transform ray into object space to intersect the 3 orthogonal triplanes (z=0, y=0, x=0)
vec3 roO = ro; roO.xz = rot2(spin) * roO.xz; roO.yz = rot2(0.32) * roO.yz;
vec3 rdO = rd; rdO.xz = rot2(spin) * rdO.xz; rdO.yz = rot2(0.32) * rdO.yz;
// Raymarch decoded FlexiCubes iso-surface
float tHit = 1e5;
float t = 0.0;
for (int i = 0; i < 56; i++) {
vec3 p = roO + rdO * t;
float d = evalTriplaneSDF(p, detail);
if (d < 0.0025) { tHit = t; break; }
t += d;
if (t > 5.0) break;
}
vec3 meshCol = col;
if (tHit < 1e4) {
vec3 pW = ro + rd * tHit;
vec3 pO = roO + rdO * tHit;
vec3 n = calcNormal(pW, spin, detail);
vec3 l1 = normalize(vec3(0.62, 0.78, 0.48));
float diff = max(dot(n, l1), 0.0);
float spec = pow(max(dot(n, normalize(l1 - rd)), 0.0), 44.0);
float fres = pow(1.0 - max(dot(n, -rd), 0.0), 3.0);
// Subtle FlexiCubes dual-grid iso-lines
vec3 vg = abs(fract(pO * 9.0) - 0.5);
float flexWire = smoothstep(0.04, 0.01, min(vg.x, min(vg.y, vg.z)));
vec3 alb = mix(vec3(0.18, 0.62, 0.88), vec3(0.95, 0.56, 0.24), smoothstep(-0.45, 0.45, pO.y));
meshCol = alb * (0.28 + 0.82 * diff) + vec3(0.98) * spec * 0.48 + vec3(0.26, 0.88, 0.96) * fres * 0.40;
meshCol = mix(meshCol, vec3(0.92, 0.96, 1.0), flexWire * 0.22);
}
// Accumulate additive glow from the 3 orthogonal triplanes on the left side
vec3 triVis = vec3(0.0);
float tZ = -roO.z / (abs(rdO.z) < 1e-4 ? 1e-4 : rdO.z);
if (tZ > 0.1 && (tZ < tHit || screenX < split)) {
vec3 hp = roO + rdO * tZ;
triVis += planeFeatureVis(hp.xy, vec3(0.18, 0.78, 1.0));
}
float tY = -roO.y / (abs(rdO.y) < 1e-4 ? 1e-4 : rdO.y);
if (tY > 0.1 && (tY < tHit || screenX < split)) {
vec3 hp = roO + rdO * tY;
triVis += planeFeatureVis(hp.xz, vec3(0.24, 0.96, 0.58));
}
float tX = -roO.x / (abs(rdO.x) < 1e-4 ? 1e-4 : rdO.x);
if (tX > 0.1 && (tX < tHit || screenX < split)) {
vec3 hp = roO + rdO * tX;
triVis += planeFeatureVis(hp.yz, vec3(0.98, 0.46, 0.22));
}
if (screenX < split) {
col = mix(col, meshCol * 0.55, tHit < 1e4 ? 0.65 : 0.0) + triVis * glow * 0.72;
} else {
col = meshCol + triVis * glow * 0.14;
}
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 |
|---|---|---|---|
| instantmesh-live | Tesla T4 1920x1080 | 13.8× baseline (moderate) · 0.456 ms / 0.486 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| instantmesh-live | NVIDIA L4 1920x1080 | 12.5× baseline (moderate) · 0.199 ms / 0.203 ms · 2.3× faster on L4 | opengl-timer-query · Cross-architecture validation |
| instantmesh-live | NVIDIA A100-SXM4-40GB 1920x1080 | 9.00× baseline (moderate) · 0.259 ms / 0.267 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites TripoSR, Large Reconstruction Model (LRM), 3D Gaussian Splatting, Shap-E, Zero-1-to-3, Point-E, Score Distillation Sampling (DreamFusion); cited by Hunyuan3D 2.1, MeshAnything, TRELLIS (Structured 3D Latents).
Sources
- primaryJiale Xu, Weihao Cheng, Yiming Gao, Xintao Wang, Shenghua Gao, Ying Shan (2024). InstantMesh: Efficient 3D Mesh Generation from a Single Image with Sparse-view Large Reconstruction Models. arXiv preprint (cs.CV).Verified via arxiv · 2026-11-29arXiv:2404.07191
- implementationTencentARC (2024). TencentARC/InstantMesh. InstantMesh: Efficient 3D Mesh Generation from a Single Image with Sparse-view Large Reconstruction ModelsGitHub API · license Apache-2.0 · 2026-11-29