Nodes/ComfyUI-BrainDead/BD Draw Ellipse
ComfyUI Node

BD Draw Ellipse

Draw with an ellipse shape OR use any existing mask as the shape. Shape priority: 1. mask input — any ComfyUI mask (lips, eyes, SAM3 output, etc.) 2. mask_from_packed — extract one R/G/B/A channel from packed_image as the mask 3. geometry — compute ellipse from x_center / y_center / radius_x / radius_y Feather is applied to whichever source is active. Two outputs (use one or both): image — fill_r/g/b blended over image (or blank canvas) packed_out — packed_image with mask written into pack_channel Feather: positive = outward from edge (interior stays 1.0), negative = inward, 0 = hard edge.

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
BD Draw Ellipse
  • mask
  • image
  • packed_image
  • image
  • mask
  • packed_out
mask_from_packednone
pack_channelnone
x_center0.500
y_center0.500
radius_x0.100
radius_y0.100
feather0
fill_r128
fill_g128
fill_b128
opacity1.00
canvas_width512
canvas_height512
Category🧠BrainDead/Segmentation

Inputs (16)

NameTypeDefaultDescription
mask_from_packedCOMBOnoneExtract 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_channelCOMBOnoneWrite 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_centerFLOAT0.5000–1Ellipse horizontal centre (0=left, 1=right). Ignored when mask or mask_from_packed is active.
y_centerFLOAT0.5000–1Ellipse vertical centre (0=top, 1=bottom).
radius_xFLOAT0.1000–2Horizontal radius as fraction of image width. Set == radius_y for a circle on square images.
radius_yFLOAT0.1000–2Vertical radius as fraction of image height.
featherINT0-200–200Edge 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_rINT1280–255Fill red. Default 128 = mid-grey.
fill_gINT1280–255Fill green.
fill_bINT1280–255Fill blue.
opacityFLOAT1.000–1Blend strength over the base image. 1.0 = fully opaque.
maskoptMASKShape 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.
imageoptIMAGEBase image for color-composite output. If not connected, a blank canvas (canvas_width × canvas_height) is used.
packed_imageoptIMAGEExisting 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_widthoptINT5121–8192Canvas width when no image is connected.
canvas_heightoptINT5121–8192Canvas height when no image is connected.

Outputs (3)

NameTypeDescription
imageIMAGEColour composite: shape blended over image (or blank canvas).
maskMASKFinal feathered shape mask (1.0 inside, 0.0 outside).
packed_outIMAGEpacked_image with mask written into pack_channel. Pass-through (or blank) when pack_channel='none'.