Loop Subdivision
Splits each triangle into four and repositions vertices with a valence-dependent weighted average, converging to a C2 quartic box-spline surface away from irregular points. The triangle-mesh counterpart of Catmull-Clark.
In the family Geometry, meshing & signed distance fields, subdivision surfaces
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | Plugin | npm i three-subdivide docs |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | Built in | Modeling Mode > Model > Subdivide (Loop, Catmull-Clark, and Bilinear subdivision schemes) docs |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
For each edge, create a new vertex at 3/8 of each end vertex plus 1/8 of the two opposite vertices of the neighbouring triangles. For each old vertex, replace its position by a blend of itself and the average of its ring neighbours, with a weight depending on valence (Loop's beta). Then connect old and new vertices into four triangles per original face. Boundaries use separate rules that reduce to cubic B-spline curves. Vertices of valence 6 are regular; others are extraordinary and give C1 limit surfaces. Because it only needs a triangle mesh, it is the simplest approximating subdivision to implement and to run in compute shaders.
When to choose it
Reach for it when
- triangle mesh looks faceted and needs smoothing
- need to upsample scanned or generated mesh smoothly
- subdivide a triangle mesh without converting to quads
- low-poly triangle model should become smooth
Choose it for triangle meshes from scans, simulation or generators where you need a smooth upsampling. Prefer Catmull-Clark Subdivision for quad cage modelling, Isotropic Remeshing when triangle quality matters more than smoothness, and interpolating schemes (not covered here) when original vertices must not move.
Field marks
- Shrinks the surface; thin shapes collapse and sharp features disappear unless creases are tagged
- Visible artifacts around vertices with valence far from 6
- Triangles from low-quality input propagate and give poor shading at high levels
- Boundary rules differ between libraries and give mismatched silhouettes
Presets
Loop Subdivision — coarse faceted triangle cage (left) vs C^2 Loop subdivision limit surface (right)
{
"P_SUBDIV_LVL": 3,
"P_WIRE_VIS": 0.9,
"P_ROT_SPEED": 0.75,
"P_SPLIT": 0.48
}Show GLSL (120 lines)
const float P_SUBDIV_LVL = 3.0; // P Subdiv Levels [0.0, 4.0, 0.25]
const float P_WIRE_VIS = 0.90; // P Triangle Wire [0.0, 1.5, 0.05]
const float P_ROT_SPEED = 0.75; // P Spin Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Cage / Loop Split [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
// Exact octahedral/icosahedral polyhedron SDF (faceted control cage at subdiv level 0)
float sdControlCage(vec3 p) {
vec3 q = abs(p);
// Dual truncated octahedron + snub planes for a rich triangular polyhedron control mesh
float dOct = (q.x + q.y + q.z - 1.12) * 0.57735027;
float dCube = max(max(q.x, q.y), q.z) - 0.76;
float dRhomb = (max(q.x + q.y, max(q.y + q.z, q.z + q.x)) - 1.02) * 0.70710678;
return max(max(dOct, dCube), dRhomb);
}
// Smooth Loop subdivision limit surface (quartic box-spline limit of triangular cage)
float sdLimitSurface(vec3 p) {
float r = length(p);
vec3 n = p / max(r, 1e-5);
// Subtle octahedral harmonic modulation matching the exact Loop limit surface of this cage
float h4 = n.x * n.x * n.x * n.x + n.y * n.y * n.y * n.y + n.z * n.z * n.z * n.z;
float targetR = 0.695 + 0.068 * (h4 - 0.5);
return (r - targetR) * 0.92;
}
float mapShape(vec3 p, float lvl, float spin) {
vec3 q = p;
q.xz = rot2(spin * 0.6) * q.xz;
q.yz = rot2(0.42 + sin(spin * 0.3) * 0.18) * q.yz;
float alpha = clamp(lvl / 3.0, 0.0, 1.0);
// Each Loop subdivision step contracts corners exponentially (beta ~ 3/8 per level)
float smoothMix = 1.0 - pow(0.36, lvl);
return mix(sdControlCage(q), sdLimitSurface(q), clamp(smoothMix, 0.0, 1.0));
}
vec3 calcNormal(vec3 p, float lvl, float spin) {
vec2 e = vec2(0.0020, 0.0);
return normalize(vec3(
mapShape(p + e.xyy, lvl, spin) - mapShape(p - e.xyy, lvl, spin),
mapShape(p + e.yxy, lvl, spin) - mapShape(p - e.yxy, lvl, spin),
mapShape(p + e.yyx, lvl, spin) - mapShape(p - e.yyx, lvl, spin)
));
}
// Geodesic barycentric triangle wireframe on the sphere subdivided 2^lvl times per edge
float triWireframe(vec3 objP, float lvl) {
vec3 a = abs(normalize(objP));
// Barycentric coordinates inside the positive octant triangle (a.x + a.y + a.z = 1 after L1 projection)
vec3 bary = a / max(a.x + a.y + a.z, 1e-5);
float freq = pow(2.0, floor(clamp(lvl, 0.0, 4.0))) * 2.0;
vec3 f = abs(fract(bary * freq - 0.5) - 0.5);
float dEdge = min(min(f.x, f.y), f.z);
return smoothstep(0.055 * (1.0 + 0.25 * lvl), 0.012, dEdge);
}
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 isSubdiv = screenX >= split;
float lvl = isSubdiv ? clamp(P_SUBDIV_LVL, 0.0, 4.0) : 0.0;
float wireVis = clamp(P_WIRE_VIS, 0.0, 1.5);
float spin = iTime * max(P_ROT_SPEED, 0.0);
vec3 ro = vec3(0.0, 0.04, 2.38);
vec3 rd = normalize(vec3(uv, -1.55));
vec3 col = mix(vec3(0.028, 0.038, 0.062), vec3(0.075, 0.098, 0.148), smoothstep(-0.55, 0.55, uv.y));
float t = 0.0;
bool hit = false;
for (int i = 0; i < 64; i++) {
float d = mapShape(ro + rd * t, lvl, spin);
if (d < 0.0018) { hit = true; break; }
t += d * 0.88;
if (t > 7.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec3 n = calcNormal(p, lvl, spin);
vec3 objP = p;
objP.xz = rot2(spin * 0.6) * objP.xz;
objP.yz = rot2(0.42 + sin(spin * 0.3) * 0.18) * objP.yz;
float wireSub = triWireframe(objP, lvl);
float wireCage = triWireframe(objP, 0.0);
vec3 l1 = normalize(vec3(0.60, 0.82, 0.55));
vec3 l2 = normalize(vec3(-0.72, -0.25, 0.52));
float diff1 = max(dot(n, l1), 0.0);
float diff2 = max(dot(n, l2), 0.0);
float spec = pow(max(dot(n, normalize(l1 - rd)), 0.0), 48.0);
float rim = pow(1.0 - max(dot(n, -rd), 0.0), 3.0);
vec3 alb = isSubdiv ? vec3(0.18, 0.74, 0.76) : vec3(0.84, 0.50, 0.28);
col = alb * (0.24 + 0.86 * diff1 + 0.24 * diff2) + vec3(0.95) * spec * 0.55 + vec3(0.42, 0.76, 1.0) * rim * 0.30;
if (isSubdiv) {
col = mix(col, vec3(0.04, 0.12, 0.16), wireSub * 0.45 * min(wireVis, 1.2));
// Subtle gold highlight of original valence-4/6 extraordinary control edges
col = mix(col, vec3(1.0, 0.86, 0.38), wireCage * 0.35 * min(wireVis, 1.2));
} else {
col = mix(col, vec3(0.14, 0.07, 0.04), wireCage * 0.72 * min(wireVis, 1.2));
}
}
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 |
|---|---|---|---|
| loop-subdivision-live | Tesla T4 1920x1080 | 16.8× baseline (moderate) · 0.521 ms / 0.535 ms | opengl-timer-query · 36 frames · GPU Weight Atlas · Colab T4 sweep |
| loop-subdivision-live | NVIDIA L4 1920x1080 | 13.4× baseline (moderate) · 0.212 ms / 0.220 ms · 2.5× faster on L4 | opengl-timer-query · Cross-architecture validation |
| loop-subdivision-live | NVIDIA A100-SXM4-40GB 1920x1080 | 11.4× baseline (moderate) · 0.330 ms / 0.341 ms · 1.6× faster on A100 | opengl-timer-query · Cross-architecture validation |
Crosses
- Triangle-native Loop subdivision with continuous semi-sharp creases: Bringing DeRose-style continuous sharpness weights to pure triangle Loop subdivision surfaces lets triangle-first game meshes and sculpted assets hold crisp mechanical bevels and tapered ridges without converting to quad Catmull-Clark topology.
- Quadric Error Metric Simplification: Subdivide a base mesh then reproject; or simplify first and subdivide for LOD.
Sources
- primaryCharles Loop. Smooth Subdivision Surfaces Based on Triangles. microsoft.com.Verified via live page · 2026-11-29
- primaryHugues Hoppe, Tony DeRose, Tom Duchamp, Mark Halstead, Hubert Jin, John McDonald et al. (1994). Piecewise smooth surface reconstruction. Proceedings of the 21st annual conference on Computer graphics and interactive techniques - SIGGRAPH '94.Verified via crossref · 2026-11-29doi:10.1145/192161.192233
- implementationPixarAnimationStudios (2012). PixarAnimationStudios/OpenSubdiv. An Open-Source subdivision surface library.GitHub API · license NOASSERTION · 2026-11-29