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
Several images wired from different parts of the graph that need to become one array, for an Iterator, a Gradient lookup, or anything expecting a sequence.
A count of how many images are connected: read Count.
The list of file paths in a folder, filtered and sorted, driving another part of the graph.
| Parameter | Type | Default | What it does |
|---|---|---|---|
inputs | Any | List | Connect Raster or RasterArray values to stack |
folder_path | String | "" | Path to a folder of images (leave empty to use multi-input only) |
extension_filter | String | "png,jpg,jpeg" | Comma-separated file extensions to include from folder |
sort_order | String | "Name" | Sort order for files loaded from folder. One of: Name, Date, Type, Size. |
frame_offset | Number | 0 | Cyclically shift frame order by N positions |
match_resolution | Boolean | false | Resize all frames to match the first frame's resolution |
fit_mode | String | "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
Add a Stack node.
Wire two or more images into the multi-input pin. They are appended in connection order.
Read Media out into an Iterator, or any node that takes a RasterArray, to use the stacked frames.
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)