Curvature map generation for edge wear and masking
Computes per-vertex or per-texel mean curvature to tell convex edges from concave cavities, then bakes it to a texture. Texture artists use it to drive edge wear, dirt in crevices and highlights.
Also known as curvature baking, convexity and concavity map, edge wear mask
In the family Materials, BRDFs & texturing, mask generation
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 | |
| Unity | None found | |
| Unreal 5.7 | Built in | Modeling Mode > Bake > Bake Mesh Attribute Maps > Curvature (or GeometryScript_Bake) docs |
| Blender 5.2 | Built in | Shader node: Geometry > Pointiness, baked via an Emission bake docs Per-vertex curvature approximation; Cycles only. |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Mean curvature measures how quickly the normal changes across the surface: positive on convex ridges, negative in creases. On a triangle mesh one fits the shape operator per face from the differences of vertex normals across each edge, as Rusinkiewicz does, then averages onto vertices with area or angle weights to get principal curvatures. A cheaper estimate uses the cotangent Laplacian of positions or the angle between neighbouring vertex normals. For texture-space baking, the vertex values are rasterised into the UV atlas, or computed in the pixel shader by comparing a normal map with its blurred neighbour (the screen-space Laplacian trick). Radius control comes from smoothing before measuring. The map is remapped by a ramp to produce an edge mask, which is multiplied into procedural wear, rust or paint chipping layers. Output can be signed or split into convex and concave masks.
When to choose it
Reach for it when
- need edge wear mask from a mesh
- dirt should collect in crevices and creases
- separate convex and concave areas for procedural texturing
- painted wear on corners without hand painting
- curvature map looks noisy or blocky
Choose it to drive procedural wear, dirt accumulation and edge highlighting in a texturing workflow, or to feed Weathering simulation (weathered stone) and masks in material graphs. Prefer ambient occlusion bakes (see Ground-Truth Ambient Occlusion) for crevice darkening that depends on surroundings rather than local shape. Prefer Pre-integrated skin shading when the curvature is used at runtime in a skin LUT. The baker is typically part of High-to-low-poly normal map baking tools.
Field marks
- Noisy per-vertex curvature on irregular triangulation, giving speckled wear masks
- Low-poly bevels give a single hard edge instead of a smooth falloff, so the mask looks blocky
- Normal-map-derived curvature depends on texture resolution and compression artefacts
- Mirrored or overlapping UVs bake mismatched values
- Sign convention differs between tools, inverting edge and cavity masks
Presets
SDF-Laplacian curvature visualisation
{
"EPS": 0.02,
"GAIN": 0.25
}Show GLSL (42 lines)
// GLSL ES 3.0, Shadertoy-style. Convex (warm) vs concave (cool) tint from the SDF Laplacian.
const float EPS = 0.02;
const float GAIN = 0.25;
mat2 rot(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
float map(vec3 p) {
p.xz = rot(iTime * 0.5) * p.xz;
float s = length(p - vec3(0.0, 0.55, 0.0)) - 0.55;
vec3 q = abs(p - vec3(0.0, -0.35, 0.0)) - vec3(0.8, 0.3, 0.8);
float b = length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0) - 0.08;
float k = 0.2;
float hh = clamp(0.5 + 0.5 * (b - s) / k, 0.0, 1.0);
return mix(b, s, hh) - k * hh * (1.0 - hh);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
vec3 ro = vec3(0.0, 0.5, 3.2);
vec3 rd = normalize(vec3(uv, -1.6));
vec3 col = vec3(0.05, 0.06, 0.09);
float t = 0.0;
bool hit = false;
for (int i = 0; i < 90; i++) {
float d = map(ro + rd * t);
if (d < 0.001) { hit = true; break; }
t += d;
if (t > 8.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec2 e = vec2(EPS, 0.0);
vec3 n = normalize(vec3(map(p + e.xyy) - map(p - e.xyy), map(p + e.yxy) - map(p - e.yxy), map(p + e.yyx) - map(p - e.yyx)));
float lap = (map(p + e.xyy) + map(p - e.xyy) + map(p + e.yxy) + map(p - e.yxy) + map(p + e.yyx) + map(p - e.yyx) - 6.0 * map(p)) / (EPS * EPS);
float c = clamp(lap * GAIN, -1.0, 1.0);
vec3 base = vec3(0.45);
vec3 tint = c > 0.0 ? mix(base, vec3(1.0, 0.65, 0.2), c) : mix(base, vec3(0.1, 0.3, 0.8), -c);
float diff = 0.25 + 0.75 * max(dot(n, normalize(vec3(0.5, 0.8, 0.6))), 0.0);
col = tint * diff;
}
fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);
}Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| curvature-laplacian-sdf | Tesla T4 1920x1080 | 11.1× baseline (moderate) · 0.366 ms / 0.388 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| curvature-laplacian-sdf | NVIDIA L4 1920x1080 | 8.55× baseline (moderate) · 0.136 ms / 0.142 ms · 2.7× faster on L4 | opengl-timer-query · Cross-architecture validation |
| curvature-laplacian-sdf | NVIDIA A100-SXM4-40GB 1920x1080 | 6.88× baseline (moderate) · 0.198 ms / 0.202 ms · 1.9× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Real-time hatching with tonal art maps, Suggestive contours.
Crosses
- Weathering simulation (weathered stone): Curvature masks decide where edge wear and cavity dirt accumulate.
- High-to-low-poly normal map baking: Both bake from the same high-poly mesh and share UVs and cage settings.
Sources
- primaryS. Rusinkiewicz. Estimating curvatures and their derivatives on triangle meshes. Proceedings. 2nd International Symposium on 3D Data Processing, Visualization and Transmission, 2004. 3DPVT 2004..Verified via crossref · 2026-11-29doi:10.1109/tdpvt.2004.1335277