Suggestive contours
Line-drawing technique that adds, beyond true silhouettes, lines at places where a contour would appear under a small viewpoint change, conveying shape the way an artist's sketch does.
In the family Stylized & non-photorealistic rendering, line drawing
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 | None found | No built-in view-dependent suggestive-contour line renderer. |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | Built in | View Layer Properties > Freestyle Line Set > Edge Types > Suggestive Contour docs |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
True contours occur where the surface normal is perpendicular to the view vector. Suggestive contours are the nearby points where the surface is a minimum of the normal-dot-view function along the view-projected direction; equivalently, the radial curvature crosses zero while the derivative of curvature along the view direction is positive. These loci can be computed per vertex, linearly interpolated across triangles to extract line segments, and drawn with thickness by view-dependent criteria. Because they depend on the camera, they must be recomputed every frame or approximated in image space. Subsequent work added temporal coherence and GPU evaluation.
When to choose it
Reach for it when
- line drawing misses important shape features
- silhouettes alone don't convey the model's form
- non-photorealistic line art from 3d mesh
- illustration style outlines that show hidden ridges
Choose it when you need line-art depiction of smooth organic shapes, such as anatomy or scanned sculptures, that silhouettes alone render as a bare outline. Prefer Depth/normal Sobel edge outlines when you want a cheap image-space look for hard-surface scenes, and Inverted-hull outlines for plain game-style outlines. It is not a good fit for noisy meshes.
Field marks
- Needs clean, well-tessellated smooth meshes; noisy scans produce spurious squiggles
- Curvature derivative estimation is sensitive to mesh quality and sampling
- Lines flicker or pop in animation without temporal smoothing
- Creates no lines on flat or developable surfaces
Presets
Suggestive contours — radial curvature D_w(N·V)=0 ink lines on 3D sculpted form
{
"P_CONTOUR_WIDTH": 1,
"P_SUGGESTIVE_TH": 0.48,
"P_PAPER_TONE": 0.62,
"P_SPIN_SPEED": 1
}Show GLSL (122 lines)
const float P_CONTOUR_WIDTH = 1.0; // P Ink Width [0.4, 2.2, 0.05]
const float P_SUGGESTIVE_TH = 0.48; // P Suggestive Sens [0.1, 1.0, 0.02]
const float P_PAPER_TONE = 0.62; // P Wash Shading [0.0, 1.0, 0.02]
const float P_SPIN_SPEED = 1.0; // P Turntable Speed [0.0, 2.5, 0.05]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
float smin(float a, float b, float k) {
float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0);
return mix(b, a, h) - k * h * (1.0 - h);
}
// Sculpted organic classical bust/metaball form with rich concave valleys & cheekbones
// (concave inflections are exactly where DeCarlo suggestive contours emerge!)
float mapSculpt(vec3 p) {
vec3 q = p;
q.xz = rot2(iTime * 0.42 * max(P_SPIN_SPEED, 0.0) + 0.35) * q.xz;
q.yz = rot2(0.18 * sin(iTime * 0.35)) * q.yz;
// Torus core blended with sculpted lobes to form valleys, brow ridges & flutes
vec2 tq = vec2(length(q.xz) - 0.56, q.y);
float dTorus = length(tq) - 0.28;
float dHead = length(q - vec3(0.0, 0.24, 0.0)) - 0.46;
float dChin = length(q - vec3(0.0, -0.34, 0.22)) - 0.34;
float d = smin(dTorus, dHead, 0.26);
d = smin(d, dChin, 0.24);
// Subtle carved organic flutes producing vivid radial-curvature valleys
float ang = atan(q.z, q.x);
d += 0.048 * sin(ang * 5.0 + q.y * 4.5) * smoothstep(0.15, 0.65, length(q.xz));
d += 0.032 * cos(q.y * 9.5 - q.x * 3.5);
return d * 0.72;
}
vec3 calcNormal(vec3 p) {
vec2 e = vec2(0.0025, 0.0);
return normalize(vec3(
mapSculpt(p + e.xyy) - mapSculpt(p - e.xyy),
mapSculpt(p + e.yxy) - mapSculpt(p - e.yxy),
mapSculpt(p + e.yyx) - mapSculpt(p - e.yyx)
));
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
vec3 ro = vec3(0.0, 0.04, 2.02);
vec3 rd = normalize(vec3(uv, -1.55));
// Warm museum sketchbook paper with fine fiber grain
float grain = 0.97 + 0.03 * sin(uv.x * 210.0 + sin(uv.y * 140.0)) * cos(uv.y * 195.0);
vec3 paper = vec3(0.955, 0.925, 0.865) * grain;
vec3 col = paper * (1.0 - 0.14 * dot(uv, uv));
float t = 0.0;
bool hit = false;
for (int i = 0; i < 68; i++) {
float d = mapSculpt(ro + rd * t);
if (d < 0.0018) { hit = true; break; }
t += d;
if (t > 8.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec3 n = calcNormal(p);
vec3 v = -rd;
float ndv = dot(n, v);
// Projected view vector w onto the surface tangent plane: w = normalize(v - (n·v) n)
vec3 wRaw = v - n * ndv;
float wLen = length(wRaw) + 1e-4;
vec3 w = wRaw / wLen;
// Evaluate DeCarlo directional derivatives along w in the tangent plane:
// Radial curvature k_r proportional to D_w(n·v) = (n(p+eps*w)·v - n(p-eps*w)·v) / (2*eps)
float eps = 0.014;
vec3 pPlus = p + w * eps;
vec3 pMinus = p - w * eps;
// Project back onto isosurface for exact surface derivative
pPlus -= calcNormal(pPlus) * mapSculpt(pPlus);
pMinus -= calcNormal(pMinus) * mapSculpt(pMinus);
float ndvPlus = dot(calcNormal(pPlus), normalize(ro - pPlus));
float ndvMinus = dot(calcNormal(pMinus), normalize(ro - pMinus));
// First derivative D_w(N·V) ~ 0 at suggestive contours
float dw = (ndvPlus - ndvMinus) / (2.0 * eps);
// Second derivative D_w^2(N·V) > 0 guarantees local MINIMUM of N·V (concave valley, not ridge!)
float d2w = (ndvPlus - 2.0 * ndv + ndvMinus) / (eps * eps);
float wScale = clamp(P_CONTOUR_WIDTH, 0.35, 2.5);
float sens = clamp(P_SUGGESTIVE_TH, 0.08, 1.1);
// 1) True occluding silhouette contour: N·V -> 0
float occluding = smoothstep(0.28 * wScale, 0.08 * wScale, ndv);
// 2) Suggestive contour: D_w(N·V) crosses 0 with positive second derivative d2w > threshold
// and grazing filter so front-facing flat spots do not trigger noise
float nearZeroDw = exp(-pow(dw / (0.34 * wScale), 2.0));
float posCurv = smoothstep(0.65 / sens, 3.8 / sens, d2w);
float viewWindow = smoothstep(0.92, 0.35, ndv) * smoothstep(0.06, 0.16, ndv);
float suggestive = clamp(nearZeroDw * posCurv * viewWindow * 1.35, 0.0, 1.0);
// Subtle soft archival wash + cool/warm technical pencil tint
vec3 lDir = normalize(vec3(0.58, 0.78, 0.55));
float diff = max(dot(n, lDir), 0.0);
float washAmt = clamp(P_PAPER_TONE, 0.0, 1.0);
vec3 warmPaper = vec3(0.96, 0.93, 0.87);
vec3 coolShadow = vec3(0.56, 0.63, 0.72);
vec3 surfCol = mix(warmPaper, mix(coolShadow, warmPaper, 0.25 + 0.75 * diff), washAmt);
// Distinct ink hierarchy: deep charcoal for true contours, rich sepia-slate ink for suggestive contours
vec3 contourInk = vec3(0.06, 0.065, 0.085);
vec3 suggInk = vec3(0.16, 0.19, 0.28);
col = mix(surfCol, suggInk, suggestive * 0.92);
col = mix(col, contourInk, occluding * 0.96);
}
fragColor = vec4(pow(clamp(col, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: Original interactive WebGL2 fragment shader written for Texel Atlas (MIT).
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| suggestive-contours-live | Tesla T4 1920x1080 | 69.0× baseline (extreme) · 2.27 ms / 2.49 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| suggestive-contours-live | NVIDIA L4 1920x1080 | 52.1× baseline (heavy) · 0.829 ms / 0.844 ms · 2.7× faster on L4 | opengl-timer-query · Cross-architecture validation |
| suggestive-contours-live | NVIDIA A100-SXM4-40GB 1920x1080 | 41.4× baseline (heavy) · 1.19 ms / 1.20 ms · 1.9× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Deferred shading (G-buffer); cited by Curvature map generation for edge wear and masking.
Sources
- primaryDoug DeCarlo, Adam Finkelstein, Szymon Rusinkiewicz, Anthony Santella (2003). Suggestive contours for conveying shape. ACM Transactions on Graphics.Verified via crossref · 2026-11-29doi:10.1145/882262.882354