RC Pattern Tiling
Seamless tiling without the seam pain
- pattern_image
- reference_image
- IMAGE
Every texture workflow eventually hits the same wall: you generated one perfect tile and now you need it covering a whole canvas, seamless and reproducible. RC_PatternTiling is that wall's demolition - it takes a pattern image and tiles it across a canvas with scale, rotation, spacing, offset, and opacity, all driven by the RC Image Compositor pack's high-performance pipeline. It sits under RC/Generate, which tells you what it is: a generator, not an editor.
How it works
The node builds the tile by transforming your pattern once (resize by pattern_scale, rotate by rotation), then stamping it across the output canvas using computed index ranges - no naive double-loop, which is why the README calls it high-performance. Then it layers on the details:
- size_mode -
customuses thewidth/heightyou set (64–8192, step 8);from_imagetakes the dimensions from the optionalreference_image. The latter is how you say "match my output canvas to this existing render." - pattern_scale (0.1–5) and rotation (-180 to +180) - transform the base tile before stamping.
- spacing_x / spacing_y - gaps between tiles. Positive = visible transparent gaps; negative = tiles overlap. You can build a tiled grid or a bleeding-overlap collage with the same node.
- offset_x / offset_y - shift the whole tile grid, so the pattern doesn't start at the top-left corner. Brick-offset looks are a negative spacing + offset away.
- opacity (0–1) - fades the entire pattern layer.
- crop_top / right / bottom / left - the sneaky useful ones. These trim the source pattern before tiling, so you can cut a repeating element out of a bigger image and tile just the crop. That's the "pre-tiling crop" the README mentions.
Output is a single IMAGE. Feed it a background, use it as a texture overlaid with a blend mode, or tile it behind a foreground - it's a leaf node, so it's a great start-of-workflow generator.
Installing it
ComfyUI Manager → search "RC Image Compositor" → install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/kj863257/ComfyUI_RC_Image_Compositor
cd ComfyUI_RC_Image_Compositor
pip install -r requirements.txt
Dependencies: pillow, numpy, opencv-python. Nothing to download.
Where people get burned
from_imageneeds areference_image. If you switch size mode to from_image without wiring one in, there's nothing to read dimensions from. It's an optional input precisely because it's only needed in that mode.- Spacing is in pixels, so it's resolution-dependent. A gap that looks right at 512 looks wrong at 2048. If you're tiling across scales, think of spacing as "the seam width," not a design element.
- Rotation makes tiles stop being seamless. A rotated tile leaves transparent corners, and the gaps show. If you want a seamless rotated pattern, rotate the pattern content - not the tile - and rotate here at 0.
- The crop inputs trim before transform. Confusingly,
crop_*edits the source, so a crop + a scale interact in ways that can surprise you. Set the crop first, then tune scale/rotation.
This is a node that rewards tinkering - negative spacing + offset gets you brick and diamond layouts with zero external tooling. For "background texture that repeats forever," it's the fastest route in the pack.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| pattern_image | IMAGE | — | |
| size_mode | COMBO | custom | 2 options: from_image, custom |
| width | INT | 51264–8192 | — |
| height | INT | 51264–8192 | — |
| pattern_scale | FLOAT | 1.000.1–5 | — |
| rotation | FLOAT | 0-180–180 | — |
| spacing_x | INT | 0-1024–1024 | — |
| spacing_y | INT | 0-1024–1024 | — |
| offset_x | INT | 0-4096–4096 | — |
| offset_y | INT | 0-4096–4096 | — |
| opacity | FLOAT | 1.000–1 | — |
| crop_top | INT | 00–4096 | — |
| crop_right | INT | 00–4096 | — |
| crop_bottom | INT | 00–4096 | — |
| crop_left | INT | 00–4096 | — |
| reference_imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |