Pattern Generator
From a blank canvas to a tileable material in one click
- pattern
- normal
The Pattern Generator is the "I need a material but I have nothing to work from" node. Most PBR workflows in this pack start from a photo or an AI output, but this one starts from nothing: you type a width, pick a pattern, and out come a grayscale texture and a matching normal map. No model, no download, no waiting - it's pure math running in your existing PyTorch install.
That makes it the perfect seed for a procedural material set. Drop the pattern output into the roughness or height slot of a channel packer, pipe the normal output straight into a normal map input, and you've got the skeleton of a brick wall or tiled floor without touching an image editor. The pack's README calls the whole suite "texture alchemy," and this is the base metal.
How it works
Under the hood it's all torch tensor math. Each pattern type paints its own geometry: brick and tile draw mortar lines as rows and columns, checker alternates tile colors, and hexagon and scales use distance fields - every pixel gets tested against a circle/hex center and colored depending on whether it's inside the element or in the gap. The normal output is generated from the pattern itself with a Sobel gradient pass, so the seams and tile edges show up as height-based bumps. That's a nice touch: one node gives you both the map and the geometry you'd otherwise derive from it.
The inputs that matter
pattern_type- brick, tile, hexagon, scales, weave, checker, or grid. Brick is the crowd-pleaser; hexagon and scales look great as stylized base textures.size- the element size, 5 to 500. Lower it for fine detail, raise it for chunky tiles.gap- mortar width. Zero gives you a seamless surface, a few pixels gives you visible grout.mortar_colorandtile_color- both are grayscale brightness values from 0 to 1, not colors. 0.2/0.8 (the defaults) is a classic dark-grout, light-tile look.seed- bumps it to get a different layout where randomness applies.
The two outputs are pattern (grayscale as RGB) and normal. Both are plain IMAGE tensors, so anything downstream that eats an image works.
Where people trip up
The colors are brightness only - if you want a red brick or a blue tile, you'll need to recolor the output (a Color Ramp node in this same pack is the obvious move) before it becomes a usable albedo. Also don't expect the randomness slider to do a lot; it's wired into the brick and tile family and the effect is gentle, so cranking it to 1.0 doesn't give you wildly organic tiles. And the normal output is simple and height-based - perfectly fine for a base layer, but don't expect Marigold-grade surface detail. For that you stack a detail map on top.
Installation
Same as every node in this pack - it ships inside amtarr/ComfyUI-TextureAlchemy. The quickest route is ComfyUI Manager: search for "TextureAlchemy" and hit install, then restart. Or go manual:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart ComfyUI, then find it under Add Node → Texture Alchemist → Procedural. There's no requirements.txt and no model download - it runs on the PyTorch that ComfyUI already bundles, which is a pleasant rarity among custom node packs.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264–8192 | — |
| height | INT | 51264–8192 | — |
| pattern_type | COMBO | 7 options: brick, tile, hexagon, scales, weave, checker, +1 | |
| size | FLOAT | 505–500 | Pattern element size |
| gap | FLOAT | 2.00–20 | Gap between elements |
| randomness | FLOAT | 0.000–1 | Pattern variation |
| mortar_color | FLOAT | 0.200–1 | Gap/mortar brightness |
| tile_color | FLOAT | 0.800–1 | Tile brightness |
| seed | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| pattern | IMAGE | — |
| normal | IMAGE | — |