array1 end step
A 'step' that's secretly a count, and that's a feature
- array
array1 end step is the least obvious of the pack's four array generators, and once you get it, it's the most useful one. The inputs are start, step, and end - and like the rest of this family, step is lying to you. It's not a spacing, it's a count. This node builds a list that starts at start, ends at end, and contains exactly step values, evenly spaced. That's an inclusive linspace: start=0, step=5, end=10 → [0, 2.5, 5, 7.5, 10].
That's genuinely different from the pack's other generators. array1 end increment gives you fixed spacing and lets the endpoint fall where it may. This one pins both the start and the end and distributes step values evenly between them - which is exactly what you want when a downstream node demands a precise number of frames or cameras. Say you need 8 view angles between 0° and 90° inclusive: this is the node, one pass, no off-by-one fiddling.
The math, for the curious: it computes k = (end - start) / (step - 1) and builds [start, start + k, start + 2k, ...] up to end. So the last value is guaranteed to be end. Edge cases: step=1 returns just [start] (the loop never runs), and if start == end it fills the list with step copies of that value. Both are defined behavior, not crashes.
Output is a single array LIST of floats. Wire it into a camera-pose converter, a batch index, or any list consumer in the pack. For turntable renders, start=0, step=N, end=360 gives you an evenly spaced full rotation - though note it includes both 0 and 360, which are the same angle, so you may want end just under 360 to avoid a duplicate frame.
This ships in 807502278/ComfyUI-3D-MeshTool, a one-developer 3D utility pack. No models, pure Python. Install via ComfyUI Manager (search "ComfyUI-3D-MeshTool") and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-3D-MeshTool
cd ComfyUI-3D-MeshTool
pip install -r requirements.txt
Just remember the parameter lie - step is a count - and double-check the output in the UI the first time. Renamed-node red screens on old workflows are also a pack habit; recreate the node and move on.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| start | FLOAT | 0.0-999999–999999 | — |
| step | INT | 31–999999 | — |
| end | FLOAT | 0.5-999999–999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| array | LIST | — |