Nodes/ComfyUI_Fill-Nodes/FL Hexagonal Pattern
ComfyUI Node

FL Hexagonal Pattern

Tile an image into a hex-mosaic

By filliptm·Created 3 years ago·Updated about 12 hours ago· 628
FL Hexagonal Pattern
  • images
  • IMAGE
hexagon_size100
shadow_offset5
shadow_colorpurple
background_colorblack
rotation0
spacing1.0

Where FL_HalftonePattern turns an image into dots, FL_HexagonalPattern turns it into a mosaic of hexagonal tiles, each carrying a crop of the source image, with a drop shadow behind each hex so the whole thing reads as physically tiled rather than just gridded. It's a stylistic finishing effect - think stained glass or a honeycomb art print - more than a utility node, and it's a solid one to reach for when a plain generated image needs a graphic, crafted feel.

How it works

The node divides your image into a hexagonal grid, crops the corresponding chunk of the source image into each hex-shaped tile (using PIL's polygon drawing, per the README), offsets a shadow behind each tile, and composites the result onto a solid background. Rotating the whole grid and adjusting hex spacing changes how the tiling reads - tight spacing looks like continuous stained glass, wider spacing looks more like scattered hex chips with visible background between them.

The inputs and outputs that matter

Required: images. Everything else tunes the mosaic:

  • hexagon_size (50–500, default 100) - how big each hex tile is. Smaller hexes preserve more of the source image's detail; larger ones read as more abstract and graphic.
  • shadow_offset (0–20, default 5) and shadow_color (default purple) - the drop shadow behind each tile that gives the mosaic its sense of depth. Set shadow_offset to 0 to turn shadows off entirely.
  • background_color (default black) - fills the gaps between tiles.
  • rotation (0–360, default 0) - rotates the whole hex grid.
  • spacing (0.5–2.0, default 1.0) - gap between tiles; below 1.0 tiles start to overlap, above 1.0 they pull apart.

Output is a single IMAGE.

How to install it

It's part of the ComfyUI_Fill-Nodes pack. Search ComfyUI_Fill-Nodes in ComfyUI Manager and install, or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

then restart ComfyUI. Straight PIL drawing under the hood - no model weights, no extra dependencies to fight with.

Common issues & troubleshooting

Colors as text strings, not a color picker. shadow_color and background_color take plain color names or hex strings (purple, black, #ff0000) - if you type something PIL doesn't recognize as a color, expect an error rather than a silent fallback. Stick to standard CSS-style color names or hex codes.

Mosaic looks blocky or loses the source image entirely. That's hexagon_size set too large relative to your image resolution - a 500px hex on a 512px image is basically one giant tile. Bring it down, especially if you want the source image's content to stay legible through the tiling.

Overlapping tiles when spacing is under 1.0. That's intentional behavior, not a bug - values below 1.0 deliberately let tiles overlap for a denser, more textured look. If you wanted clean non-overlapping hexes with gaps, keep spacing at or above 1.0.

Looking for a different pattern effect? This lives in the same VFX shelf as FL_HalftonePattern (dot-print effect) and FL_ImageCollage (photomosaic using a template image's average colors) - worth trying all three on the same source if you're not sure which graphic treatment fits.

Category🏵️Fill Nodes/VFX

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
hexagon_sizeoptINT10050–500
shadow_offsetoptINT50–20
shadow_coloroptSTRINGpurple
background_coloroptSTRINGblack
rotationoptFLOAT00–360
spacingoptFLOAT1.00.5–2

Outputs (1)

NameTypeDescription
IMAGEIMAGE