Texture Marble Vein
Marble veins that look like marble, not a spill — and they tile
- image
- mask
- marble_info
Marble is one of those materials that diffusion models get wrong in a specific, recognizable way - the veins end up looking like spilled ink or lightning bolts, not like calcite deposits that flowed through the stone. Texture Marble Vein is a procedural generator built around the actual structure: veins that flow, fork, and thin out along mineral seams. And true to this pack's pattern, it's seamless by construction, so a floor tile of it actually tiles.
How it works
The procedural_marble_pattern core builds the classic flow-noise marble: a smooth noise field (flow_strength controls how much the veins are carried by a drifting flow) modulates a repeated pattern so the veins bend organically instead of running straight. A separate mineral noise field mixes in the mottled background stone (mineral_mix), the way real marble has cloudy regions between the veins. direction_deg sets the overall vein orientation, and vein_scale_px sizes the veining.
Three pattern_mode options cover the marble family: classic (the flowing, chaotic veins that read instantly as marble, the default), vein (straighter, more linear mineral seams), and onyx (broad translucent bands rather than fine veins). Everything is wrapped value noise in numpy, deterministic on seed, instant, and seamless.
The inputs that matter
All settings live in a single settings_json text box - the pack's convention is JSON over sliders. Defaults are runnable; the ones you'll actually reach for:
pattern_mode- classic / vein / onyxvein_scale_px- vein size (168 px default)flow_strength- how much the veins get carried and bent by the flowmineral_mix- background stone mottlingseed- new vein layoutcontrast/balance/invert
Outputs are the pack-standard trio: image (grayscale field as RGB), mask (single-channel version - perfect as the mix source when you composite veins onto a colored base), and marble_info with resolved settings. Because it's seamless, you skip the detile pass entirely.
Installing it
Ships in MKRShift Nodes from criskb. Install via ComfyUI Manager (search "MKRShift Nodes"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI; it's under MKRShift Nodes → Surface → Texture. No models or pip extras - numpy/Pillow/torch only. The README's ffmpeg and slicer requirements are for other parts of the pack and don't touch this node.
Common gotchas
This pack has no community footprint yet, so the code is your best reference. The recurring MKRShift gotchas apply: broken JSON in settings_json silently reverts to defaults, and out-of-range values get clamped silently - if your marble doesn't match your edits, fix the JSON first. One aesthetic tip: marble reads best when the veins aren't perfectly evenly spaced, so if your first render looks too regular, bump flow_strength before touching the scale.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| settings_json | STRING | {"width":1024,"height":1024,"pattern_mode":"classic","vein_scale_px":168.0,"direction_deg":22.0,"flow_strength":0.46,"mineral_mix":0.32,"contrast":1.14,"balance":0.0,"invert":false,"seed":97} | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| marble_info | STRING | — |