Nodes/MKRShift_Nodes/Clearcoat Roughness Map
ComfyUI Node

Clearcoat Roughness Map

Where the lacquer wears thin

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

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:

  1. Feed in a scan, base color, or already-cleaned coat texture
  2. Leave source_mode on combined_clearcoat_roughness for the default heuristic
  3. Raise detail_strength if scratches and scuffs are underrepresented
  4. 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 off
  • contrast / gamma - how hard the scuffs read against the smooth coat
  • invert_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 x1ClearcoatMap and this together and they reinforce each other.
  • The mask output is the derived scalar - the optional mask input only gates where the map is emitted. Same pack convention, same recurring confusion.
  • Corrupted settings_json silently 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.

CategoryMKRShift Nodes/Surface/Maps

Inputs (17)

NameTypeDefaultDescription
imageIMAGE
source_modeCOMBO7 options: combined_clearcoat_roughness, detail, inverse_luma, luma, value, saturation, +1
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.350–2
gammaFLOAT1.000.1–4
contrastFLOAT1.100.1–4
blur_radiusFLOAT0.00–128
invert_valuesBOOLEANfalse
mask_featherFLOAT8.00–256
invert_maskBOOLEANfalse
source_maskoptMASK
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
clearcoat_roughness_infoSTRING