Nodes/MKRShift_Nodes/Surface Rust Bloom Mask
ComfyUI Node

Surface Rust Bloom Mask

Surface Rust Bloom Mask gets the corrosion right

By criskb·Created 7 months ago·Updated 5 months ago· 0
Surface Rust Bloom Mask
  • image
  • source_mask
  • mask
  • image
  • mask
  • surface_rust_info
settings_json{"source_mode":"combined_rust","cavity_bias":0.48,"edge_bias":0.6,"warm_bias":0.34,"bloom_spread":0.52,"breakup":0.34,"amount":0.86,"coverage":0.48,"contrast":1.28,"gamma":1.0,"blur_radius":1.2,"invert_values":false,"mask_feather":8.0,"invert_mask":false}

Rust isn't a random brown texture - it starts at the edges, follows the water, and blooms outward from wherever the coating broke. Most people slap a generic grunge overlay on their prop and call it weathered. x1SurfaceRustBloomMask does the version that reads as real corrosion: it starts from edges and cavities, biases toward warm reddish tones, and spreads a rust bloom across the surface the way oxidation actually does. If you've got an asset that needs to look abandoned rather than decorated, this is the node.

How it works

The node scores the texture for where rust would form, then grows a bloom around those seed points. Three biases drive where it starts:

  • edge_bias (0.60) - the big one. Rust attacks exposed edges, so this steers the mask toward high-contrast boundaries and corners.
  • cavity_bias (0.48) - the recesses, where moisture pools and coating fails first.
  • warm_bias (0.34) - rust follows warm color. This rewards already-reddish/oxidized pixels, which is how the mask naturally hugs the parts of the texture that already look corroded.

Then bloom_spread (0.52) is the interesting knob: it grows the mask outward from the seeds, so a little rust at an edge fans out into a larger patch instead of staying a thin line. That's the difference between "painted on" and "bloomed." breakup (0.34) adds the organic variation, amount (0.86) and coverage (0.48) set overall strength and surface share, and contrast/gamma shape the response.

The inputs that matter

Settings are in a settings_json string, prefilled:

  • edge_bias (0.60) - how much rust starts at edges. Raise for "weathered by handling," lower for "weathered by sitting."
  • bloom_spread (0.52) - how far rust grows from its seeds. This is the one people under-use.
  • warm_bias (0.34) - how strongly it hunts existing warm/orange pixels.
  • breakup (0.34) - organic variation vs clean patches.
  • amount (0.86) / coverage (0.48) - strength and reach.

Optional source_mask restricts analysis, mask feathers output. Outputs are image, mask, and surface_rust_info (settings + coverage).

Installing it

Part of the MKRShift Nodes pack. ComfyUI Manager: search "MKRShift", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart after. No models - pure numpy, CPU-friendly on large textures.

Gotchas

If you're layering this with the pack's other surface nodes, order it like real corrosion would happen: dust accumulates on top of rust, not the reverse. So a sensible stack is rust mask first, then dust over it - wire the rust mask into the dust node's source_mask if you want dust to settle on the corroded spots. And remember the mask output is what you actually use; the image output is just the grayscale preview of the same scalar, so don't feel obligated to wire it anywhere.

CategoryMKRShift Nodes/Surface/Effects

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"source_mode":"combined_rust","cavity_bias":0.48,"edge_bias":0.6,"warm_bias":0.34,"bloom_spread":0.52,"breakup":0.34,"amount":0.86,"coverage":0.48,"contrast":1.28,"gamma":1.0,"blur_radius":1.2,"invert_values":false,"mask_feather":8.0,"invert_mask":false}
source_maskoptMASK
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
surface_rust_infoSTRING