Texture Contour Lines
Texture Contour Lines draws the elevation map
- image
- mask
- contour_info
Contour lines are one of those patterns everyone needs eventually - a terrain map for a strategy game, topographic lines on a logo, a decorative line pattern for a poster - and nobody wants to draw them by hand. x1TextureContourLines generates them procedurally: it fakes an elevation field and draws the contour rings through it, fully tileable and resolution-independent. It's a generator node, so there's no image input - one settings blob in, a pattern out.
How it works
The node synthesizes a smooth elevation field (layered procedural noise) and then slices it into contour lines at regular intervals. contour_scale_px (156px) sets the spacing of the elevation features - effectively how dense the linework is. pattern_mode changes what those slices look like: lines (the default, clean topographic lines), height (a stepped elevation fill rather than lines - the flat "terrace" look), terrace (broad flat bands with sharp risers between them, like rice terraces), and bevel (a smoothed height-field relief).
line_width (0.18) is how thick the drawn lines are; warp_strength (0.26) bends the elevation field with secondary noise so the contours meander naturally instead of looking like a clean sinusoidal pattern - this is the difference between "real topo map" and "decorative squiggle." terrace_strength (0.42) is what you push when you want the stepped, stylized terrain in terrace mode to be more pronounced. contrast and balance shape the tonal range, and seed rerolls the whole terrain.
The inputs that matter
Everything is in a settings_json string, prefilled:
width/height(1024) - output size.pattern_mode-lines,height,terrace, orbevel.contour_scale_px(156) - feature spacing / line density.line_width(0.18) - line thickness.warp_strength(0.26) - the meander. Crank it for organic terrain.terrace_strength(0.42) - the step effect interracemode.seed(83) - reroll the terrain.
Outputs are image, mask, and contour_info (mode, scale, seed).
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 - instant procedural math.
Gotchas
The default lines mode is quiet and elegant; most people immediately want more chaos. That's warp_strength and seed, not contour_scale_px - scaling the field smaller just makes more lines, it doesn't make them more interesting. And since it's tileable and resolution-independent, it's a great source for the pack's texture workflow: output it, then run it through x1TextureAlbedoSafe or a colorizer if you're feeding it into a real map set. If you use it as a decorative overlay on a render, multiply the mask output rather than hard-blending - the lines should sit in the material, not on top of it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| settings_json | STRING | {"width":1024,"height":1024,"pattern_mode":"lines","contour_scale_px":156.0,"line_width":0.18,"terrace_strength":0.42,"warp_strength":0.26,"contrast":1.2,"balance":0.0,"invert":false,"seed":83} | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| contour_info | STRING | — |