Edge Wear Mask Generator
Wear masks without the tedium
- normal_map
- curvature_map
- ao_map
- mask
Nothing sells a material like wear. A pristine texture reads as a 3D mockup; one with chipped edges and scratched corners reads as something that's actually been through the world. Hand-painting that wear is misery, which is why this node exists: Edge Wear Mask Generator produces a believable edge-wear mask from geometry maps - or from nothing at all - in a single pass.
The output is a grayscale mask where the "worn" areas are bright, ready to drive a weathering blend in the pack's Multi-Texture Blender or a wear generator. The classic use: mask out the edges of a painted surface so the metal shows through.
How it works
It builds the wear pattern from whatever geometry you give it, in priority order:
- curvature_map - if you feed it a curvature map (edges and crevices are bright), it uses that directly as the wear base. This is the most accurate path: curvature literally means "where the surface folds," and folds are where paint chips.
- normal_map - no curvature? It derives an edge signal from the normal map on the fly.
- nothing - with neither connected, it generates a procedural distance-based edge pattern (wear concentrated toward the borders of the texture), which is surprisingly useful for tile borders.
On top of the base, it adds noise (noise_strength, default 0.3) so the wear edge isn't a clean ruler line - real chipping is ragged. Then edge_width and edge_sharpness shape the falloff, and an optional ao_map modulates the result so wear also collects in crevices (via the pack's AO Approximator, for instance).
The inputs
width/height- output resolution.edge_width(0.01–0.5, default 0.1) - how far wear extends inward.edge_sharpness(0.1–10, default 2) - higher = crisper chip line, lower = softer gradient.noise_scale/noise_strength/seed- the raggedness and its randomness.- Optional:
normal_map,curvature_map,ao_map.
Output: a single mask IMAGE.
Tips and traps
The workflow the pack recommends is Curvature Generator → Edge Wear → Weathering, with AO added for crevice dirt. For the best quality, feed both a curvature map and an AO map; the difference between "edge only" and "edge + crevice" wear is what separates a good prop from a great one. The trap is cranking edge_width - 0.1 is already a chunky chip zone, and 0.3+ starts eating the whole surface. Start at the defaults, look at the mask, then tune.
Installation
Part of amtarr/ComfyUI-TextureAlchemy, under Add Node → Texture Alchemist → Masks. Install via ComfyUI Manager (search "TextureAlchemy") or:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart ComfyUI. No dependencies, no models - pure procedural torch.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264–8192 | — |
| height | INT | 51264–8192 | — |
| edge_width | FLOAT | 0.100.01–0.5 | Width of edge wear (0.0-1.0) |
| edge_sharpness | FLOAT | 2.00.1–10 | Edge falloff sharpness |
| noise_scale | FLOAT | 101–100 | Variation noise scale |
| noise_strength | FLOAT | 0.300–1 | Amount of edge variation |
| seed | INT | 00–18446744073709550000 | — |
| normal_mapopt | IMAGE | — | |
| curvature_mapopt | IMAGE | — | |
| ao_mapopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | IMAGE | — |