Animated Polka Dots (Purz)
Dots that pulse and swell
- image
Polka dots are the friendliest pattern on the internet, and PurzAnimatedPolkaDots makes them move: a grid of dots that swells, ripples, and shifts frame by frame as a wave rolls through. It's the kind of texture that instantly reads as "video," and because the dots are drawn in a regular grid, the motion stays satisfyingly rhythmic instead of chaotic.
It's one of the four Purz/Patterns/Animated nodes in ComfyUI-Purz, the utility pack by PurzBeats (a Comfy Org staffer). Same wave engine as the animated checkerboard and stripes - the difference is the base pattern: this one uses a dot grid, with an extra stagger option for the classic bricked layout.
How it works
Two textures, one wave. The node draws a polka-dot grid (regular or staggered), generates a moving wave texture with a phase that advances each frame, combines the two with a math operation, and maps the result to a color ramp. Output is a batch of frames you can play back, combine into a video, or use as an animated background behind an img2img pass.
The dot geometry is where you get the most mileage:
- dot_radius - 2–100. Big dots read as bold '60s graphic design; small dots with wide spacing read as fabric.
- spacing - 10–200, the center-to-center distance between dots.
- stagger - boolean, on by default. This offsets alternate rows (the brick layout) instead of a plain square grid, and it genuinely changes the rhythm of the pattern. Turn it off and you get a tidy grid instead.
The inputs that matter
- width / height - canvas size (64–4096).
- background_color / dot_color - hex colors. The ramp endpoint defaults follow the same pattern as the other animated nodes.
- frame_count - number of frames, up to 300. This is your video length.
- wave_type / wave_direction / wave_shape - the motion engine.
wave_directiondefaults toradial, which makes the dots breathe from the center outward - the most satisfying default of the four animated nodes. Switch tohorizontalfor a scrolling shimmer. - wave_scale - wave frequency; lower = slower, broader ripples.
- wave_factor - wave strength, 0–2. Zero = a perfectly static polka-dot texture.
- math_operation - how the wave modulates the dots (
add,multiply,maximum,sine…). - reverse_phase - flips the motion direction.
- color_ramp_type -
linear,ease,b_spline,cardinal,constant.
Output is image, an IMAGE batch with frame_count frames.
Installing it
ComfyUI Manager - search ComfyUI-Purz - or:
cd ComfyUI/custom_nodes/
git clone https://github.com/purzbeats/ComfyUI-Purz.git
cd ComfyUI-Purz
pip install -r requirements.txt
Restart and you're in business. Requirements are OpenCV, Pillow, torch, numpy - nothing to download beyond the pack itself. Slider widgets on modern ComfyUI make dialing wave_factor and wave_scale genuinely pleasant.
Where people get burned
Two things. First, don't set dot_radius larger than half of spacing - the dots overlap and you lose the polka-dot look entirely (you get blobs, which is fine if that's the vibe, confusing otherwise). Second, with math_operation set to something like divide or modulo, the dots can get clipped into hard-edged crescents; if that happens, drop back to add or multiply. Everything else is just taste. And as always with animated nodes, keep resolution × frame_count reasonable while you're iterating - prototype at 512, render big when you're happy.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264–4096 | — |
| height | INT | 51264–4096 | — |
| dot_radius | INT | 102–100 | — |
| spacing | INT | 4010–200 | — |
| background_color | STRING | #FFFFFF | — |
| dot_color | STRING | #000000 | — |
| stagger | BOOLEAN | true | — |
| frame_count | INT | 301–300 | — |
| wave_type | COMBO | sine | 5 options: sine, cosine, square, triangle, sawtooth |
| wave_scale | FLOAT | 0.100.01–1 | — |
| wave_direction | COMBO | radial | 4 options: horizontal, vertical, diagonal, radial |
| wave_shape | COMBO | sine | 3 options: sine, square, triangle |
| math_operation | COMBO | add | 12 options: add, subtract, multiply, divide, power, minimum, +6 |
| wave_factor | FLOAT | 0.500–2 | — |
| reverse_phase | BOOLEAN | false | — |
| color_ramp_type | COMBO | linear | 5 options: linear, ease, b_spline, cardinal, constant |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |