Video Ring Painter
Put a glowing ring around anything in your shot
- images
- mask
- preview
- ring_mask
Some effects you reach for every day; Video Ring Painter is the one you reach for when you need a glowing ring to encircle something - a subject highlight, a product focus, a target reticle vibe - and you want it on video, frame after frame, tracking whatever your mask tracks. It takes an images batch and a mask, and draws a customizable ring around the masked region. If you're making UI mockups, video callouts, or just want that "this is the important part" frame, this is your node.
It's one of the smaller, focused tools in DJZ-Nodes, and it's a good example of why that pack is worth installing even when you only have a vague idea of what's in it.
How it works
The mechanism is simple and robust: it takes the mask, finds the outline of the masked area, and expands it outward by stroke_width pixels to create the ring region. The ring gets feathered edges from stroke_blur, is filled with highlight_color, and is composited over the frame at highlight_opacity. Everything outside the ring can be darkened to background_color, which is how you get the classic "spotlight" framing where the subject pops and the edges fall away.
Because the ring is derived from the mask, it's motion-tracking by proxy - if your mask is a segmentation mask that follows the subject, the ring follows it too. That's the real power move here: combine this with an automatic segmentation mask and you get a professional-looking "highlight the subject" effect with no manual keyframing.
The inputs that matter
images- the frame batch.mask- the area to ring. This is the input that does the heavy lifting; the ring traces this mask's edge.stroke_width(0–999, default 20) - ring thickness in pixels. 0 means no ring, so that's your off switch.stroke_blur(0–100, default 6) - edge softness. Low = crisp ring, high = diffused glow ring.highlight_colorandbackground_color- both accept hex (#FF0000) or comma-separated RGB floats (1.0,0.0,0.0), so you can feed them from other string nodes. Black background = the area outside the ring goes dark.highlight_opacity(0–1, default 0.8) - ring transparency.
Outputs
Two of them, which is the part people miss:
preview(IMAGE) - the composited frame, ready to preview or export.ring_mask(MASK) - a grayscale mask of just the ring shape. This is gold: wire it into a blend or inpaint chain and you can composite the ring over anything with full control, instead of being locked into the node's own compositing.
Installing it
Pack-level install, same as the rest of DJZ-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Restart ComfyUI, or search "DJZ-Nodes" in ComfyUI Manager.
Troubleshooting
- Ring is huge / tiny.
stroke_widthis in pixels and is relative to the mask's shape. On a big subject, 20px can look like a hairline; on a small one, it swallows the subject. Size it per shot. - No ring at all. Check
stroke_width- 0 disables it. Also check the mask actually has a region; an empty mask produces an empty ring. - Edges look like a hard sticker. Lower
stroke_blur... no wait, the opposite - raisestroke_blurfor a softer, more diffused edge. 0 gives you a crisp hard ring, which is a style choice, but most people want it feathered. - The background color does nothing.
background_coloronly affects the area outside the ring if the ring is actually composited over it - if your workflow uses thering_maskoutput for its own compositing, the background_color is baked into thepreviewonly.
It's a small tool with a surprisingly high ceiling once you use the ring_mask output. Underrated node in the pack, honestly.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| mask | MASK | — | |
| stroke_width | INT | 200–999 | — |
| stroke_blur | INT | 60–100 | — |
| highlight_color | STRING | #FF0000 | — |
| background_color | STRING | #000000 | — |
| highlight_opacity | FLOAT | 0.80–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| preview | IMAGE | — |
| ring_mask | MASK | — |