---
id: "curvature-map-baking"
title: "Curvature map generation for edge wear and masking"
aliases: [curvature baking, convexity and concavity map, edge wear mask]
domain: "materials"
stage: "material"
realtime: "interactive"
platforms: [blender, cpu, desktop-gpu, webgl2, python, houdini]
year_introduced: 2004
inputs: [mesh, normals]
outputs: [texture]
style: "both"
dynamic: "static"
cost: "offline"
authority: "Rusinkiewicz"
url: "https://texelatlas.vercel.app/t/curvature-map-baking/"
sources_verified_at: "2026-11-29"
---
# Curvature map generation for edge wear and masking (Rusinkiewicz)

> 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.

## 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

## 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 use it

Choose it to drive procedural wear, dirt accumulation and edge highlighting in a texturing workflow, or to feed [Weathering simulation (weathered stone)](https://texelatlas.vercel.app/t/weathering-simulation.md) and masks in material graphs. Prefer ambient occlusion bakes (see [Ground-Truth Ambient Occlusion](https://texelatlas.vercel.app/t/ground-truth-ambient-occlusion.md)) for crevice darkening that depends on surroundings rather than local shape. Prefer [Pre-integrated skin shading](https://texelatlas.vercel.app/t/pre-integrated-skin-shading.md) when the curvature is used at runtime in a skin LUT. The baker is typically part of [High-to-low-poly normal map baking](https://texelatlas.vercel.app/t/normal-map-baking.md) tools.

## Cost

offline — Per-vertex estimate is fast on CPU; baking to texels is a standard rasterisation pass.
Measured GPU Weight: 11.12× baseline (moderate) — 0.3659 ms median / 0.3878 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 8.55× baseline (moderate) — 0.1359 ms median (2.69× faster on L4).
Ampere A100 scaling: 6.88× baseline (moderate) — 0.1982 ms median (1.85× faster on A100).

## Failure modes

- 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

## Engine support

- blender: builtin — `Shader node: Geometry > Pointiness, baked via an Emission bake` (evidence: https://docs.blender.org/manual/en/5.2/render/shader_nodes/input/geometry.html, checked 2026-12-01) — Per-vertex curvature approximation; Cycles only.
- unreal: builtin — `Modeling Mode > Bake > Bake Mesh Attribute Maps > Curvature (or GeometryScript_Bake)` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/GeometryScript_Bake, checked 2026-12-01)

## Dataflow

- Inputs: mesh, normals
- Outputs: texture
- Platforms: blender, cpu, desktop-gpu, webgl2, python, houdini

## Presets

### SDF-Laplacian curvature visualisation (glsl-fragment; rendered 2026-11-29)

```json
{
  "EPS": 0.02,
  "GAIN": 0.25
}
```

```glsl
// 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

## Combines with

- [Weathering simulation (weathered stone)](https://texelatlas.vercel.app/t/weathering-simulation.md): Curvature masks decide where edge wear and cavity dirt accumulate.
- [High-to-low-poly normal map baking](https://texelatlas.vercel.app/t/normal-map-baking.md): Both bake from the same high-poly mesh and share UVs and cage settings.

## Sources

1. [primary] S. Rusinkiewicz Estimating curvatures and their derivatives on triangle meshes. Proceedings. 2nd International Symposium on 3D Data Processing, Visualization and Transmission, 2004. 3DPVT 2004.. https://doi.org/10.1109/tdpvt.2004.1335277 (verified via crossref on 2026-11-29)

## Cite this entry

Texel. "Curvature map generation for edge wear and masking." https://texelatlas.vercel.app/t/curvature-map-baking/ (accessed 2026-12-01).
