Stack

Assemble images from a folder or from multiple inputs into one image sequence.

What it does

Stack collects several images into one RasterArray, a single ordered sequence for anything that consumes multiple frames, such as an Iterator doing per-instance texturing. Wire two or more images, or an existing RasterArray, into the multi-input and they are appended in connection order into one output.

Stack also scans a folder. Set Folder Path and every matching file in that directory is listed, filtered by extension and sorted by name, date, type or size, as a semicolon-separated list on the Paths output.

When to use it

ParameterTypeDefaultWhat it does
inputsAnyListConnect Raster or RasterArray values to stack
folder_pathString""Path to a folder of images (leave empty to use multi-input only)
extension_filterString"png,jpg,jpeg"Comma-separated file extensions to include from folder
sort_orderString"Name"Sort order for files loaded from folder. One of: Name, Date, Type, Size.
frame_offsetNumber0Cyclically shift frame order by N positions
match_resolutionBooleanfalseResize all frames to match the first frame's resolution
fit_modeString"Fill"How to handle aspect ratio differences when matching resolution. One of: Fill, Fit, Stretch.

Gotchas

Count reflects the images wired into the multi-input only. A folder scan by itself does not add to Count.

Extension Filter is comma-separated, for example png,jpg,jpeg, and case-insensitive. Leave it blank to include every file in the folder.

Worked example

  1. Add a Stack node.

  2. Wire two or more images into the multi-input pin. They are appended in connection order.

  3. Read Media out into an Iterator, or any node that takes a RasterArray, to use the stacked frames.

  4. Optionally set Folder Path and Extension Filter to pull the matching file paths from a folder into Paths.

See also

Sort · Partition · Capture · Rasters (images)