Nodes/comfyui-panels/Draw Panels Edges Dotted
ComfyUI Node

Draw Panels Edges Dotted

The softest border in the pack

By bmad4ever·Created 12 months ago·Updated 2 months ago· 41
Draw Panels Edges Dotted
  • panels
  • canvas
  • stroke_color
  • IMAGE
  • MASK
dot_radius8.0
dot_spacing32.0
color_alpha255
upscale4

If dashed borders are the sketchy option, dotted borders are the whisper. Draw Panels Edges Dotted renders each panel outline as a string of dots instead of a line - the lightest, least committed visual separator of the pack's three edge-drawing nodes. It's the one you reach for when the panels are suggestions rather than rules: faded memory sequences, background panels, or a page that shouldn't have hard borders at all.

Same family as Draw Panels Edges and the dashed variant: you feed in panel polygons and a canvas, you get out an RGBA IMAGE and a MASK. Rendering is the same supersampled trick (draw at upscale×, downscale for clean anti-aliased dots).

How it works

Rather than stroking a polyline, the node walks the panel outline by arc length and drops a dot every dot_spacing pixels. That's why it can't just naively use your spacing: the outline's total perimeter almost never divides evenly by your spacing, so the node nudges the spacing near your value to make the dots land evenly as it closes the loop back on the starting point. Same "adjust to keep things even when closing the loop" behavior as the dashed version, just applied to dot placement.

The inputs that matter

  • panels - the polygon list.
  • canvas - the page rectangle.
  • dot_radius - default 8, the size of each dot.
  • dot_spacing - default 32, the center-to-center gap between dots (approximately; see above).
  • stroke_color - default #000000; color_alpha - default 255; upscale - default 4.

Outputs: IMAGE (RGBA) and MASK.

Installing it

Part of comfyui-panels - Manager, search "comfyui-panels", or:

cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_panels

Restart, install deps (shapely, matplotlib, opencv-python), no models.

Where people get burned

The recurring pack gotchas apply: the COLOR widget needs bmad or MTB nodes installed for the color picker to render, and the canvas defines output resolution, so keep it matched to your target image. Dot-specific: if dot_radius is large relative to dot_spacing, dots merge into what's effectively a dashed line - if you wanted dotted and got scalloped, shrink the radius or widen the spacing. And on long panel borders with small dots, keep an eye on the loop close: it's even, but a big radius at the seam can still read heavier than the rest.

CategoryBmad/Panels

Inputs (7)

NameTypeDefaultDescription
panelsPOLYGON
canvasPOLYGON
dot_radiusFLOAT8.01–256
dot_spacingFLOAT32.01–256
color_alphaINT2551–255
stroke_colorCOLOR#000000
upscaleINT41–8The lines are drawn upscaled by this factor to anti-alias the jaggies away.

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK