Clearcoat Roughness Map
Where the lacquer wears thin
- image
- source_mask
- mask
- image
- mask
- clearcoat_roughness_info
A clearcoat that's perfectly smooth everywhere is a lie. Real lacquer scuffs, chips at the edges, and wears down to a rougher finish where it gets handled. x1ClearcoatRoughnessMap derives exactly that wear - rougher in the scuffed, noisy, less-polished regions, smoother in the bright, neutral, polished coat - from a base texture. It's the roughness half of the clearcoat pair in MKRShift Nodes' Surface/Maps branch, meant to sit next to x1ClearcoatMap.
The pack is young (no impressions, no community footprint I could find), but the map nodes are its most consistent section: same "derive, normalize, mask" shape everywhere, feeding the same preview and packing nodes downstream.
How it works
The default source_mode, combined_clearcoat_roughness, is a heuristic that reads the wear story off the texture: scuffed, noisy regions get rougher values, while bright neutral polished regions stay smooth. That's the inversion of x1ClearcoatMap - one says "where's the coat," the other says "how rough is the coat where it is." The usual shaping chain follows: normalize_mode (auto_percentile default), gamma, contrast, blur_radius, plus detail_radius / detail_strength to decide how aggressively surface breakup registers as roughness. invert_values flips the map when you need the opposite convention.
Outputs: image (grayscale map), mask (the scalar map itself), and clearcoat_roughness_info (settings log).
The intended flow
The author's recipe, which is worth following literally at first:
- Feed in a scan, base color, or already-cleaned coat texture
- Leave
source_modeoncombined_clearcoat_roughnessfor the default heuristic - Raise
detail_strengthif scratches and scuffs are underrepresented - Send the result into
x1PreviewMaterial → clearcoat_roughness, or pack it downstream
x1ClearcoatMap and x1ClearcoatRoughnessMap are designed as a pair - run both, preview them together, and the coated look lands in one pass. Use the optional mask when only part of the material should get the coat treatment.
Inputs that matter
detail_strength- the main "how much wear do I get" knob; start high and back offcontrast/gamma- how hard the scuffs read against the smooth coatinvert_values- some pipelines want rough-as-bright, others rough-as-dark; flip this instead of fighting the lookup
Installing
ComfyUI Manager → search MKRShift Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI. No models, no new dependencies.
Where people get burned
- Running it without the clearcoat map. The roughness map alone doesn't know where the coat is - the pair is the feature. Wire
x1ClearcoatMapand this together and they reinforce each other. - The
maskoutput is the derived scalar - the optionalmaskinput only gates where the map is emitted. Same pack convention, same recurring confusion. - Corrupted
settings_jsonsilently resets to defaults; if the map suddenly goes soft and generic, check the JSON before touching the sliders.
It's the "where has this painted part been handled" map - edges, contact points, scuffs. Fast, in-graph, and a lot more believable than a uniform roughness value.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| source_mode | COMBO | 7 options: combined_clearcoat_roughness, detail, inverse_luma, luma, value, saturation, +1 | |
| normalize_mode | COMBO | 3 options: auto_percentile, manual_range, auto_range | |
| value_min | FLOAT | 0.0000–1 | — |
| value_max | FLOAT | 1.0000–1 | — |
| percentile_low | FLOAT | 2.00–100 | — |
| percentile_high | FLOAT | 98.00–100 | — |
| detail_radius | FLOAT | 2.00.1–64 | — |
| detail_strength | FLOAT | 0.350–2 | — |
| gamma | FLOAT | 1.000.1–4 | — |
| contrast | FLOAT | 1.100.1–4 | — |
| blur_radius | FLOAT | 0.00–128 | — |
| invert_values | BOOLEAN | false | — |
| mask_feather | FLOAT | 8.00–256 | — |
| invert_mask | BOOLEAN | false | — |
| source_maskopt | MASK | — | |
| maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| clearcoat_roughness_info | STRING | — |