BD Draw Ellipse
Circles (and secret channel-packing) for mask and atlas work
- mask
- image
- packed_image
- image
- mask
- packed_out
BD Draw Ellipse is the rounder sibling of BD Draw Rect - same design, ellipse instead of rectangle. It draws a flat-color ellipse or circle (with independent horizontal and vertical radii, so you can stretch it into an oval) that you can composite onto an image, export as a feathered mask, or inject into a packed RGBA channel. And like its sibling, the shape source isn't just geometry: wire in any ComfyUI mask and it uses that instead.
Where it actually shines in this pack's world: building iris/socket masks for face pipelines, stamping circular regions for viseme or UV-prep textures, and extracting a useful mask out of an already-packed channel so you can reuse it elsewhere. It's a small utility - don't overthink it.
Inputs and outputs that matter
Shape priority: wired mask wins → else mask_from_packed (extract R/G/B/A from a packed_image) → else geometry. The geometry dials are x_center / y_center (0–1 normalized) and radius_x / radius_y (fractions of image width/height; set both equal for a circle on a square canvas). feather works like its rect sibling: positive = outward (interior stays fully opaque), negative = inward, 0 = hard edge. fill_r/g/b + opacity control the color composite.
Outputs: image (fill blended over the base image, or a blank canvas_width × canvas_height canvas), mask (the feathered shape), and packed_out - packed_image with the final mask written into pack_channel.
Installing
ComfyUI Manager → search "BrainDead" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
Restart after installing. No model downloads, no extra dependencies.
Where people get burned
Same two traps as the rect node: a wired mask silently overrides your geometry, and feather expands outward by default rather than softening in place. And one ellipse-specific gotcha - radius_x and radius_y are fractions of different axes (width vs. height), so on a non-square image "equal" radii do not make a circle. Multiply by the aspect ratio if you need a true circle on a wide or tall canvas.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| mask_from_packed | COMBO | none | Extract a channel from packed_image and use it as the shape mask. Useful when a packed RGBA already contains a useful mask in one channel (e.g. extract the line alpha to use as a draw region). Ignored when mask is connected. none = fall through to geometry. |
| pack_channel | COMBO | none | Write the final (feathered) mask into this channel of packed_image. none = pass packed_image through unchanged. R/G/B = overwrite that colour channel. A = overwrite alpha (channel appended if image has no alpha). |
| x_center | FLOAT | 0.5000–1 | Ellipse horizontal centre (0=left, 1=right). Ignored when mask or mask_from_packed is active. |
| y_center | FLOAT | 0.5000–1 | Ellipse vertical centre (0=top, 1=bottom). |
| radius_x | FLOAT | 0.1000–2 | Horizontal radius as fraction of image width. Set == radius_y for a circle on square images. |
| radius_y | FLOAT | 0.1000–2 | Vertical radius as fraction of image height. |
| feather | INT | 0-200–200 | Edge feather in pixels (applied to any shape source). Positive: expands outward — interior stays fully opaque. Negative: bleeds inward — fill fades toward its own edge. 0 = hard binary edge. |
| fill_r | INT | 1280–255 | Fill red. Default 128 = mid-grey. |
| fill_g | INT | 1280–255 | Fill green. |
| fill_b | INT | 1280–255 | Fill blue. |
| opacity | FLOAT | 1.000–1 | Blend strength over the base image. 1.0 = fully opaque. |
| maskopt | MASK | Shape mask. When connected, skips ellipse geometry and uses this mask directly (after feather). Accepts any ComfyUI mask — lip mask from BD_FaceSocketInfill, SAM3 output, etc. Priority: mask > mask_from_packed > geometry. | |
| imageopt | IMAGE | Base image for color-composite output. If not connected, a blank canvas (canvas_width × canvas_height) is used. | |
| packed_imageopt | IMAGE | Existing packed RGBA image. pack_channel: write the final mask into this channel. mask_from_packed: extract a channel as the shape source. Typical use: u_image3 RGBA pack (R=shadow, G=highlight, B=dark, A=line) for skin_shader.glsl. | |
| canvas_widthopt | INT | 5121–8192 | Canvas width when no image is connected. |
| canvas_heightopt | INT | 5121–8192 | Canvas height when no image is connected. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Colour composite: shape blended over image (or blank canvas). |
| mask | MASK | Final feathered shape mask (1.0 inside, 0.0 outside). |
| packed_out | IMAGE | packed_image with mask written into pack_channel. Pass-through (or blank) when pack_channel='none'. |