Nodes/RC Image Compositor/RC Pattern Tiling
ComfyUI Node

RC Pattern Tiling

Seamless tiling without the seam pain

By kj863257·Created 11 months ago·Updated 10 months ago· 16
RC Pattern Tiling
  • pattern_image
  • reference_image
  • IMAGE
size_modecustom
width512
height512
pattern_scale1.00
rotation0
spacing_x0
spacing_y0
offset_x0
offset_y0
opacity1.00
crop_top0
crop_right0
crop_bottom0
crop_left0

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 - custom uses the width/height you set (64–8192, step 8); from_image takes the dimensions from the optional reference_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_image needs a reference_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.

CategoryRC/Generate

Inputs (16)

NameTypeDefaultDescription
pattern_imageIMAGE
size_modeCOMBOcustom2 options: from_image, custom
widthINT51264–8192
heightINT51264–8192
pattern_scaleFLOAT1.000.1–5
rotationFLOAT0-180–180
spacing_xINT0-1024–1024
spacing_yINT0-1024–1024
offset_xINT0-4096–4096
offset_yINT0-4096–4096
opacityFLOAT1.000–1
crop_topINT00–4096
crop_rightINT00–4096
crop_bottomINT00–4096
crop_leftINT00–4096
reference_imageoptIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE