ComfyUI Node
BD Atlas Pack
Pack multiple images into one grid atlas (rows x columns) with padding. Sources are concatenated in order: the `images` batch, then image_1..image_8, then `masks` (batch) supplies each cell's alpha (falls back to an RGBA image's own alpha, else opaque). Each image is fit into a uniform cell via contain / cover / stretch. Outputs the atlas image, a single-channel mask atlas, and a JSON layout string with per-cell pixel + normalised-UV rects for game engines.
BD Atlas Pack
- images
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- masks
- atlas
- mask
- layout
◄columns0►
◄rows0►
◄cell_width0►
◄cell_height0►
◄fit_modecontain►
◄padding0►
◄background_hex#000000►
◄orderrow_major►
◄output_alphafalse►
Category🧠BrainDead/Segmentation
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| imagesopt | IMAGE | Batched IMAGE (B,H,W,C) — each frame becomes one cell, in batch order. | |
| image_1opt | IMAGE | Individual image for a cell (appended after the batch). | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — | |
| image_7opt | IMAGE | — | |
| image_8opt | IMAGE | — | |
| masksopt | MASK | Batched MASK — mask[i] is the alpha for cell i (aligned to the concatenated image order). If absent, an RGBA image's own alpha is used, else opaque. | |
| columnsopt | INT | 00–64 | Number of columns. 0 = auto (≈ square: ceil(sqrt(count))). |
| rowsopt | INT | 00–64 | Number of rows. 0 = auto (ceil(count / columns)). Expanded if too small to fit all cells. |
| cell_widthopt | INT | 00–8192 | Pixel width of each cell. 0 = use the widest input image. |
| cell_heightopt | INT | 00–8192 | Pixel height of each cell. 0 = use the tallest input image. |
| fit_modeopt | COMBO | contain | contain — fit whole image in cell, pad with background (no crop). cover — fill cell, center-crop overflow. stretch — resize to cell, ignore aspect. |
| paddingopt | INT | 00–512 | Pixels of background between cells AND around the outer border. |
| background_hexopt | STRING | #000000 | Background / padding fill colour (hex). Mask atlas pad regions are always 0. |
| orderopt | COMBO | row_major | row_major — fill left-to-right then down. column_major — fill top-to-bottom then right. |
| output_alphaopt | BOOLEAN | false | If True, the atlas IMAGE is RGBA (alpha = the mask atlas). Default is RGB. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| atlas | IMAGE | — |
| mask | MASK | — |
| layout | STRING | — |