Thickness Map
Thickness maps from flat images — the subsurface secret ingredient
- image
- source_mask
- mask
- image
- mask
- thickness_info
A thickness map is the thing that tells a renderer how much light scatters through a material - thick areas glow warmly, thin areas like ears and nose tips let light punch through. It's the map everyone forgets until their character looks like plastic and the ears look solid. Thickness Map derives one from a plain image, which is the classic trick: you don't have a 3D model's distance data, so you approximate thickness from the image's values and channels. It's the difference between subsurface scattering that looks like skin and SSS that looks like a glow filter.
How it works
This is one of the pack's "real widget" nodes - actual dropdowns and sliders, no JSON editing. The source_mode dropdown picks what the map is derived from: combined_thickness (the default, blends value and luma into a plausible thickness), inverse_luma, luma, value, alpha (if your image has alpha, thin = transparent), detail (edge/contrast-based thickness), and mask (build the map from a supplied source_mask). The key mental model: in a thickness map, bright = thick, so inverse_luma is often the most intuitive starting point - bright highlights become thin regions.
Then normalize_mode controls the tone curve: auto_percentile (stretch so the 2nd–98th percentile maps to full range - the safe default that resists outliers), auto_range (simple min-max), or manual_range with explicit value_min/value_max. gamma and contrast shape the response, detail_radius/detail_strength add a high-frequency pass for skin pores and texture, blur_radius smooths, and invert_values flips the map. Optional source_mask feeds the mask source mode; optional mask restricts the whole operation to a region.
The inputs that matter
source_mode- where the thickness comes from (start withinverse_lumaor the defaultcombined_thickness)normalize_mode- leave onauto_percentileunless you have a reason not togamma/contrast- the tone shaping that actually sells the mapinvert_values- flip when your renderer expects the opposite convention
Outputs: image (grayscale map as RGB), mask (single channel), and thickness_info logging source mode, the actual normalized range, and mask coverage.
Installing it
Ships in MKRShift Nodes from criskb. ComfyUI Manager → "MKRShift Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI; it's under MKRShift Nodes → Surface → Maps. No models or extra deps - numpy/Pillow/torch. The README's ffmpeg/slicer notes are for other lanes of the pack.
Common gotchas
The pack has no community footprint yet, so trust the source. Unlike the pack's JSON-configured nodes, this one gives you real widgets - which means no JSON-parsing traps, but also more ways to get a subtly wrong map. The classic mistake is convention confusion: some renderers want bright = thick, others bright = thin. If your SSS looks inverted, that's invert_values, not a broken node. And auto_percentile's 2–98 default is there to stop a single hot highlight from blowing out the whole map - keep it unless you have a reason to flatten the range.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| source_mode | COMBO | 7 options: combined_thickness, inverse_luma, luma, value, alpha, detail, +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.150–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 | — |
| thickness_info | STRING | — |