Nodes/MKRShift_Nodes/Clearcoat Map
ComfyUI Node

Clearcoat Map

Clearcoat maps for the lacquered look, derived not painted

By criskb·Created 7 months ago·Updated 5 months ago· 0
Clearcoat Map
  • image
  • source_mask
  • mask
  • image
  • mask
  • clearcoat_info
source_mode
normalize_mode
value_min0.000
value_max1.000
percentile_low2.0
percentile_high98.0
detail_radius2.0
detail_strength0.20
gamma1.00
contrast1.25
blur_radius0.0
invert_valuesfalse
mask_feather8.0
invert_maskfalse

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_clearcoat is the default heuristic; the direct channels (luma, saturation, detail, value, mask) are for when it guesses wrong
  • detail_strength - how much surface texture suppresses the coat response; too low and everything is clearcoat, too high and you get nothing
  • gamma / 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 x1ClearcoatRoughnessMap and you've got the two-channel story.
  • The mask output is the derived scalar, not your input mask. Same pack-wide convention, same trap.
  • If you hand-edit settings_json and 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.

CategoryMKRShift Nodes/Surface/Maps

Inputs (17)

NameTypeDefaultDescription
imageIMAGE
source_modeCOMBO6 options: combined_clearcoat, value, luma, saturation, detail, mask
normalize_modeCOMBO3 options: auto_percentile, manual_range, auto_range
value_minFLOAT0.0000–1
value_maxFLOAT1.0000–1
percentile_lowFLOAT2.00–100
percentile_highFLOAT98.00–100
detail_radiusFLOAT2.00.1–64
detail_strengthFLOAT0.200–2
gammaFLOAT1.000.1–4
contrastFLOAT1.250.1–4
blur_radiusFLOAT0.00–128
invert_valuesBOOLEANfalse
mask_featherFLOAT8.00–256
invert_maskBOOLEANfalse
source_maskoptMASK
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
clearcoat_infoSTRING