Texel A field guide to 3D techniques

Loop Subdivision × Semi-Sharp Creases

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.

Open in StudioReproduced24.7× · 0.767 ms

Loop SubdivisionGeometry · Real-timein: meshout: meshmeshSemi-Sharp CreasesGeometry · Real-timein: meshout: mesh

Verified proof

reproduced · 2026-12-01texel-lablicense MIT
Specimen render of Loop subdivision + semi-sharp creases (left: uniform smooth s=0 Loop, right: continuous semi-sharp triangle creases)
Cross-proof specimen. Loop subdivision + semi-sharp creases (left: uniform smooth s=0 Loop, right: continuous semi-sharp triangle creases). Verified WebGL2 proof · 2026-12-01

Split-screen WebGL2 proof comparing uniform C2 smooth Loop triangle subdivision that melts mechanical edges into soft blobs (left) against triangle-native Loop subdivision with continuous DeRose semi-sharp creases holding crisp beveled ridges and tapered darts (right).

Chromium Headless ANGLE/SwiftShader WebGL2 · 512x512 · preserves crisp mechanical bevels and continuous crease sharpness inside pure-triangle Loop subdivision without quad conversion

Show GLSL proof (138 lines)
const float P_SHARPNESS = 2.60; // P Crease Sharpness s [0.0, 4.0, 0.1]
const float P_TRI_WIRE = 0.45; // P Triangle Wireframe [0.0, 1.0, 0.05]
const float P_DART_TAPER = 0.65; // P Dart Taper Weight [0.0, 1.0, 0.05]
const float P_SPIN_SPEED = 0.45; // P Turntable Speed [0.0, 1.2, 0.05]

mat2 rot2(float a) {
  float c = cos(a), s = sin(a);
  return mat2(c, -s, s, c);
}

// Smooth-max controlling bevel radius continuously from sharp s>=3 to smooth C2 s=0
float smaxCrease(float a, float b, float k) {
  float h = max(k - abs(a - b), 0.0) / max(k, 1e-5);
  return max(a, b) + h * h * k * 0.25;
}

// Mechanical triangle-cage octahedral-prism sculpture with controllable semi-sharp crease weight s
float sdLoopMesh(vec3 p, float sharpS, out float creaseHeat) {
  // Control cage: intersection of axial box + octahedral planes + carved equatorial flute
  vec3 ap = abs(p);
  // Continuous DeRose bevel radius shrinks exponentially with subdivision sharpness s: r ~ 2^(-s)
  float kBase = 0.34 * exp2(-sharpS * 0.72);
  // Tapered dart along Y axis where crease fades smoothly toward poles
  float dart = clamp(1.0 - P_DART_TAPER * smoothstep(0.18, 0.78, ap.y), 0.18, 1.0);
  float k = mix(0.32, kBase, dart);

  float dAxis = smaxCrease(smaxCrease(ap.x - 0.72, ap.y - 0.72, k), ap.z - 0.72, k);
  float dOct = (ap.x + ap.y + ap.z - 1.18) * 0.57735;
  float dBody = smaxCrease(dAxis, dOct, k * 1.15);

  // Beveled central groove running around equator (semi-sharp mechanical channel)
  float groove = max(abs(p.y) - 0.17, -(length(p.xz) - 0.66));
  float dFinal = smaxCrease(dBody, -groove, k * 0.78 + 0.015);

  // Measure proximity to tagged semi-sharp crease edges for visual indicator
  float e1 = abs(dAxis - dOct);
  float e2 = abs(ap.x - ap.z);
  float e3 = abs(abs(p.y) - 0.17);
  float edgeProx = min(e1, min(e2 * 0.8 + abs(ap.x - 0.72), e3));
  creaseHeat = smoothstep(0.08, 0.008, edgeProx) * clamp(sharpS * 0.35 * dart, 0.0, 1.0);
  return dFinal;
}

vec3 calcNormal(vec3 p, float sharpS) {
  vec2 e = vec2(0.002, -0.002);
  float ch;
  return normalize(
    e.xyy * sdLoopMesh(p + e.xyy, sharpS, ch) +
    e.yyx * sdLoopMesh(p + e.yyx, sharpS, ch) +
    e.yxy * sdLoopMesh(p + e.yxy, sharpS, ch) +
    e.xxx * sdLoopMesh(p + e.xxx, sharpS, ch)
  );
}

// Pure triangle-grid 1-to-4 Loop subdivision wireframe projected on surface
float triWireframe(vec3 p) {
  vec3 q = p * 5.2;
  vec3 f = fract(q);
  float g1 = min(min(min(f.x, 1.0 - f.x), min(f.y, 1.0 - f.y)), min(f.z, 1.0 - f.z));
  // Diagonal triangle split lines across faces
  float g2 = min(abs(f.x - f.y), min(abs(f.y - f.z), abs(f.z - f.x))) * 0.7071;
  return smoothstep(0.055, 0.012, min(g1, g2));
}

vec3 acesTone(vec3 x) {
  return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 res = max(iResolution.xy, vec2(1.0));
  vec2 uvN = fragCoord / res;
  float splitX = iMouse.z > 0.0 ? clamp(iMouse.x / res.x, 0.05, 0.95) : 0.5;
  bool useCrease = uvN.x > splitX;

  vec2 p = (fragCoord - 0.5 * res) / res.y;
  float t = iTime * P_SPIN_SPEED;
  vec3 ro = vec3(0.0, 0.55, 2.55);
  vec3 ta = vec3(0.0, 0.0, 0.0);
  vec3 fw = normalize(ta - ro);
  vec3 ri = normalize(cross(vec3(0.0, 1.0, 0.0), fw));
  vec3 up = cross(fw, ri);
  vec3 rd = normalize(fw * 1.72 + ri * p.x + up * p.y);

  // Rotate object smoothly on turntable
  mat2 rx = rot2(t * 0.8 + 0.45);
  mat2 ry = rot2(0.32 * sin(t * 0.7));
  vec3 roL = ro; roL.xz = rx * roL.xz; roL.yz = ry * roL.yz;
  vec3 rdL = rd; rdL.xz = rx * rdL.xz; rdL.yz = ry * rdL.yz;

  vec3 bg = mix(vec3(0.07, 0.08, 0.11), vec3(0.16, 0.19, 0.25), clamp(p.y + 0.55, 0.0, 1.0));
  vec3 col = bg;

  float sharpS = useCrease ? P_SHARPNESS : 0.0;
  float d = 0.0;
  bool hit = false;
  float hitCrease = 0.0;
  for (int i = 0; i < 68; i++) {
    float ch;
    float h = sdLoopMesh(roL + rdL * d, sharpS, ch);
    if (h < 0.0018) {
      hit = true;
      hitCrease = ch;
      break;
    }
    d += h * 0.85;
    if (d > 8.0) break;
  }

  if (hit) {
    vec3 wp = roL + rdL * d;
    vec3 N = calcNormal(wp, sharpS);
    vec3 V = -rdL;
    vec3 L1 = normalize(vec3(0.62, 0.78, 0.48));
    vec3 L2 = normalize(vec3(-0.75, 0.22, -0.52));
    float ndl1 = max(dot(N, L1), 0.0);
    float ndl2 = max(dot(N, L2), 0.0);
    float fres = 0.05 + 0.95 * pow(1.0 - max(dot(N, V), 0.0), 4.0);
    float spec1 = pow(max(dot(N, normalize(L1 + V)), 0.0), 76.0);
    float spec2 = pow(max(dot(N, normalize(L2 + V)), 0.0), 32.0);

    // Studio ceramic/brushed alloy finish showing crisp specular bevel ribbon on right
    vec3 alb = mix(vec3(0.46, 0.50, 0.56), vec3(0.62, 0.65, 0.70), ndl1 * 0.5);
    float wire = triWireframe(wp);
    alb = mix(alb, vec3(0.14, 0.16, 0.20), wire * P_TRI_WIRE * 0.45);
    if (useCrease) {
      // Subtle amber highlight along tagged semi-sharp crease edges
      alb = mix(alb, vec3(0.96, 0.62, 0.22), hitCrease * 0.52);
    }
    // Studio softbox reflection stripe reveals curvature continuity
    vec3 R = reflect(-V, N);
    float stripe = smoothstep(0.55, 0.92, sin(R.y * 10.0 + R.x * 4.0) * 0.5 + 0.5);
    col = alb * (0.20 + 0.85 * ndl1 + 0.28 * ndl2) + vec3(1.0, 0.96, 0.90) * (spec1 * 0.82 + spec2 * 0.25 + fres * stripe * 0.45);
  }

  col = acesTone(col * 1.08);
  if (abs(fragCoord.x - splitX * res.x) < 1.0) col = vec3(0.95, 0.93, 0.89);
  fragColor = vec4(pow(clamp(col, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}

Why they connect

Loop Subdivision takes a triangle control cage and recursively performs 1-to-4 face splits with smooth vertex/edge stencils, outputting a refined triangle mesh. Semi-Sharp Creases operates directly on that triangle mesh topology by tagging edges with scalar sharpness s >= 0: at every subdivision level, edges with s >= 1 use sharp 1/2-1/2 midpoint rules and crease vertex rules (1/8, 6/8, 1/8) while decrementing sharpness by 1, fractional sharpness 0 < s < 1 linearly interpolates between smooth Loop and crease positions, and s == 0 reverts to C2 smooth Loop masks.

How to build it

Represent the control mesh with half-edge adjacency and a float sharpness attribute per undirected edge. On each subdivision iteration, compute smooth Loop edge-vertex and old-vertex weights alongside sharp crease-edge and dart/corner rules (handling 0, 1, 2, and >=3 incident sharp edges cleanly). When an edge carries fractional sharpness s in (0, 1), blend smooth and sharp positions linearly and set child edge sharpness to max(s - 1, 0). Compute exact limit-surface positions and tangent/bitangent limit normals at the final level using Loop's eigen-weighted limit stencils modified for crease vertices so specular highlights remain ripple-free along beveled triangle seams.

Field marks

  1. Extraordinary vertices (valence != 6) adjacent to terminating semi-sharp darts exhibit subtle normal pinching unless limit tangents use crease-aware eigenmasks.
  2. Non-manifold or open boundary edges must be classified identically to infinite-sharpness creases to prevent tearing.
  3. Animating sharpness values continuously across integer thresholds can cause small C1 curvature jumps unless Chaikin-style vertex sharpness blending is applied.
  4. Exponential 4x triangle growth per level demands adaptive feature-based subdivision near creases for real-time budgets.

Prior art

No prior art found on 2026-12-01.

Searches run (2)
  • arXiv: all:"Loop subdivision" AND all:"semi-sharp"
  • GitHub repos: "loop subdivision" "semi-sharp" crease