Parent epic: #543
Depends on: Slice C (#546)
Goal
Auto-generate per-mesh cavity, curvature, and AO maps; use them as brush colour sources or layer masks — the canonical way to add edge wear, crevice dirt, and weathering.
Scope
- Generators:
- Cavity — concave dark; per-vertex from normal angle to neighbours (via
HalfEdgeMesh), then rasterised to UV space with seam dilation (reuse VertexColorBaker seam plumbing).
- Curvature — signed cavity (concave -, convex +). Edge wear from positive curvature.
- AO — short-ray hemispherical occlusion. CPU bake, few seconds on 5k-tri meshes.
- Cache in
<AppData>/paint/derived_maps/<mesh-hash>/. Invalidate on topology change via EditableMesh revision counter.
- Usage:
- Brush colour source: brush colour × derived map value at painted UV; combines with gradient/stamp colour.
- Layer mask: a layer's mask initialised from a derived map; user paints on top to refine.
- One-click recipes:
- "Add edge wear" — inverse-curvature-masked layer, default = light bare metal.
- "Add crevice dirt" — cavity-masked layer, default = dark grime.
- "Add AO darken" — multiply layer of AO onto BaseColor.
- "Recalculate derived maps" button (manual invalidate).
Acceptance Criteria
Effort
~7 days.
Parent epic: #543
Depends on: Slice C (#546)
Goal
Auto-generate per-mesh cavity, curvature, and AO maps; use them as brush colour sources or layer masks — the canonical way to add edge wear, crevice dirt, and weathering.
Scope
HalfEdgeMesh), then rasterised to UV space with seam dilation (reuseVertexColorBakerseam plumbing).<AppData>/paint/derived_maps/<mesh-hash>/. Invalidate on topology change via EditableMesh revision counter.Acceptance Criteria
paint.derived_map.*.Effort
~7 days.