Nodes/ComfyUI Illusion & Pattern Nodes/Optical Geometric Generator
ComfyUI Node

Optical Geometric Generator

Six geometric generators that look like a 70s album cover

By orion4d·Created about a year ago·Updated about a year ago· 3
Optical Geometric Generator
    • IMAGE
    pattern_typeconcentric_squares
    size512
    frequency10
    line_width3
    color1#FFFFFF
    color2#000000

    The OpticalGeometricNode cranks out six kinds of geometric op-art - concentric squares, concentric triangles, a sine-distorted grid, a starburst, a honeycomb of hexagons, and superimposed waves. If you've ever wanted a "this would look great as a poster" background without leaving ComfyUI, this is the node. It's the visual-effects sidekick to the pack's simpler Pattern Generator: same idea, much more interesting output.

    How it works

    Straightforward PIL drawing, parameterized by frequency and line_width. The six pattern_type options are distinct algorithms, not variations on one theme:

    • concentric_squares - nested squares marching in from the edges. The op-art classic.
    • concentric_triangles - same idea, triangles.
    • wavy_grid - a grid whose lines are bent by sine waves; this is the one that genuinely moves if you stare.
    • starburst - lines radiating from the center, sunburst style.
    • hexagons - a proper honeycomb lattice.
    • waves - sinusoidal waves layered over each other, which reads as moiré when the frequency climbs.

    Everything is drawn with color1 and color2 as the two-tone palette, so the output is clean two-color line art - ideal as-is, and a great base for further processing.

    The inputs that matter

    • pattern_type (default concentric_squares): the six above.
    • size (default 512, range 128–2048): output is square.
    • frequency (default 10, range 2–100): element density. On a 512px image, 10 gives you a comfortable number of features; crank it toward 100 and you get fine, busy line work. Low values give chunky, bold shapes.
    • line_width (default 3, range 1–50): stroke thickness in pixels. This is the one that decides whether it looks like a poster or like a graph.
    • color1 / color2 (default #FFFFFF / #000000): the two-tone palette, hex strings.

    One IMAGE output (a square, remember - size sets both dimensions). Wire it to Save Image, use it as a background, or feed it into the autostereogram node as a pattern - geometric line art actually makes a great Magic Eye texture because it's full of parallax-revealing detail.

    Install

    It's in the orion4d/illusion_node pack, "ComfyUI Illusion & Pattern Nodes", under the "illusion" category. ComfyUI Manager (search "Illusion") or manual clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orion4d/illusion_node.git
    

    Restart and it's live. Requirements are numpy, torch, Pillow - all already in a stock ComfyUI. No models to download, no GPU requirements beyond what you already have.

    Common issues

    The one that confuses people is frequency - it's not a wavelength slider, it's a count, so "10" means roughly ten features across the image and "100" means a hundred. If your output looks too sparse or too dense, that's the knob. And because size forces a square, you can't get a 16:9 background directly - generate square and crop, or use a Resize node afterward. Line art at high frequency can also look muddy if the two colors are too close together; high-contrast pairs read far better.

    Categoryillusion

    Inputs (6)

    NameTypeDefaultDescription
    pattern_typeCOMBOconcentric_squares6 options: concentric_squares, concentric_triangles, wavy_grid, starburst, hexagons, waves
    sizeINT512128–2048
    frequencyINT102–100
    line_widthINT31–50
    color1STRING#FFFFFF
    color2STRING#000000

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE