Iridescence Map
Fake the oil-slick sheen as a grayscale mask
- image
- source_mask
- mask
- image
- mask
- iridescence_info
Iridescence - the soap-bubble, oil-slick, beetle-shell color play that shifts with viewing angle - is one of those materials that's surprisingly hard to fake in a renderer because it needs a mask telling you where the effect lives. Iridescence Map is the MKRShift node that derives that mask (plus a scalar map) straight from an image: point it at your material render or texture, and it hands you a grayscale map of where the iridescent shimmer should sit, normalized and ready to wire into a roughness, tint, or mask slot.
It lives in MKRShift Nodes/Surface/Maps, the pack's tech-art lane alongside x1Heightmap. Same DNA: pull a scalar out of pixels, normalize it, output as a map. The difference is which scalar, and that's the interesting part.
How it works
Iridescence reads as color variation across small areas - the hue shifts locally, so the node looks for regions of rapid, fine color change. The default source_mode, combined_iridescence, combines that local chroma-detail signal with saturation and value, so you get the places where color is both vivid and unstable. The other modes let you cheat toward a specific driver: saturation, value, luma (plain scalar choices), detail (edge/contrast energy - catches the glints and micro-highlights where sheen usually lands), and mask (use an existing mask as the source).
The detail-derived signal has two knobs: detail_radius (2.0) sets the neighborhood the node looks across for color variation, and detail_strength (0.1) weights how much that fine detail contributes versus the flat color terms. Then the standard map pipeline takes over: normalize_mode (default auto_percentile, the stable choice), contrast (1.15 - punch the map so sheen regions actually read), gamma, blur_radius, invert_values. Optional source_mask restricts analysis, mask scissor-limits the output.
Outputs and how to use it
You get the grayscale image map, a mask of the same values, and an iridescence_info string with the resolved source and range. Where it goes next is up to your pipeline: multiply it into an RGB tint for an oil-slick overlay, feed it as a mask to a color-shift node, or drive a roughness channel - the map is normalized, so it behaves like any other scalar mask you'd hand a material node.
The honest caveat: this derives a plausible iridescence placement from what's already in the pixels. If your render is flat and colorless, there's no local chroma variation to find and the map will come out weak - add some color noise or glints to the source first. It's a detector-plus-map, not a generator.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
then restart, or search MKRShift_Nodes in ComfyUI Manager. No pip requirements, no model files.
If the map looks like noise, you've got detail_strength too high or detail_radius too small - raise the radius so the detail detector averages over a real surface area instead of per-pixel static. That one knob pair is responsible for 90% of "why does this look like TV static" moments.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| source_mode | COMBO | 6 options: combined_iridescence, saturation, value, luma, 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.100–2 | — |
| gamma | FLOAT | 1.000.1–4 | — |
| contrast | FLOAT | 1.150.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 | — |
| iridescence_info | STRING | — |