Clearcoat Map
Clearcoat maps for the lacquered look, derived not painted
- image
- source_mask
- mask
- image
- mask
- clearcoat_info
Clearcoat is that extra layer of lacquer sitting on top of a material - car paint, varnished wood, glossy plastic - and its map says where the coat matters. x1ClearcoatMap derives a clearcoat-strength map from a base texture by finding the bright, neutral, relatively smooth regions that a real clearcoat would sit on. It's the partner node to x1ClearcoatRoughnessMap in MKRShift Nodes' Surface/Maps branch, and the pair is designed to be used together.
Like the rest of this young pack, it's deterministic and dependency-light: pick a source, derive a scalar, normalize, mask. No models anywhere in sight.
How it works
The author's docs lay it out as a two-step: sample a scalar source from the chosen channel or mask, then in combined_clearcoat mode (the default source_mode) favor bright, low-saturation areas with less local noise. The heuristic reads "clean polished coat lives on the bright neutral smooth parts of the material," and detail_radius / detail_strength control how strongly local texture breakup suppresses the clearcoat response - that's what keeps scratches and bumps from falsely reading as coat.
Then the standard shaping chain: normalize_mode (auto_percentile default), gamma, contrast, and the optional mask / mask_feather to restrict where the map is emitted. Outputs are the pack-standard triple: image (grayscale map), mask (the scalar map itself), clearcoat_info (settings log).
The workflow it slots into
The intended path is spelled out in the docs: image → x1PreviewMaterial → clearcoat. When you want to soften or remap the result first, x1ScalarMapAdjust is the designated follow-up. And of course it packs - a clearcoat channel is a natural extra in x1ChannelPack or a PBR set when you're building a shader-input atlas.
Inputs that matter
source_mode-combined_clearcoatis the default heuristic; the direct channels (luma,saturation,detail,value,mask) are for when it guesses wrongdetail_strength- how much surface texture suppresses the coat response; too low and everything is clearcoat, too high and you get nothinggamma/contrast- the two shaping knobs that decide how hard the mask reads
Installing
ComfyUI Manager → search MKRShift Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI. No models, no requirements.txt, CPU-only math.
Where people get burned
- Using it alone. A clearcoat map without its roughness partner reads flat - the whole point is that coat regions are smooth. Pair it with
x1ClearcoatRoughnessMapand you've got the two-channel story. - The
maskoutput is the derived scalar, not your input mask. Same pack-wide convention, same trap. - If you hand-edit
settings_jsonand break the JSON, the node silently falls back to defaults - check that before chasing ghosts.
When a material needs that "wet with lacquer" separation - painted parts, coated metals, glossy woods - this is the fast in-graph way to get the mask without firing up a paint program.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| source_mode | COMBO | 6 options: combined_clearcoat, value, luma, saturation, detail, mask | |
| 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.200–2 | — |
| gamma | FLOAT | 1.000.1–4 | — |
| contrast | FLOAT | 1.250.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_info | STRING | — |