Nodes/ComfyUI-Voxels/Voxel Blocks Into Voxel Video
ComfyUI Node

Voxel Blocks Into Voxel Video

The node that finally turns your voxel frames into a playable voxel video

By DanielHabib·Created 2 years ago·Updated 2 years ago· 4
Voxel Blocks Into Voxel Video
  • voxel_blocks
  • voxel_video
framerate1

This is the node the whole pack is named after. Voxel Blocks Into Voxel Video takes a list of voxel blocks and turns them into a VOXEL_VIDEO - a single object where each block is a frame of an animation. Everything before this (mesh → block, block → saved file) is setup; this is where the thing you actually wanted to make starts existing.

How it works

The node expects its voxel_blocks input to be a list (it sets INPUT_IS_LIST = True). For each block it flattens the N×N×N×4 array into the pack's hex-string format - every voxel becomes either null or #rrggbbaa - then packages all the frames into one JSON document with Dimensions, Framerate, Block_count, and a Blocks array where each entry is a frame. That dictionary is the VOXEL_VIDEO.

Two things happen on execute:

  1. The video object is returned and flows downstream - wire it into Voxel Video Preview to watch it play in the browser.
  2. It's also marked an output node and writes a copy to output/voxel_video_<N>.json on disk. So even if you only want the on-screen preview, a file gets written. It's a side effect, not the main event.

The inputs that matter

  • voxel_blocks (VOXEL_BLOCK, list) - a list of blocks. The natural source is Voxel Block Loader pointed at a folder of saved frames, or a sequence of blocks you built frame by frame.
  • framerate (INT, default 1, range 1–100) - playback speed of the resulting video. The default of 1 is one frame per second, which is glacial - for actual animation you'll want 8, 12, 24, or whatever fits the vibe. Start at 12 and adjust.

The output is voxel_video (VOXEL_VIDEO), one object carrying every frame plus its framerate. Voxel Video Preview reads that framerate to time playback.

Where people get tripped up

  • The file collision with Voxel Video Preview. Both this node and the preview node write files named output/voxel_video_<N>.json. If you run a preview after this node, the preview can overwrite the video file you just saved - and the preview's own counter is broken (it scans for a voxel_video_preview_* pattern that never exists, so it always writes to voxel_video_1.json). If the saved file matters to you, load it back through Voxel Video Loader instead of trusting the copy on disk.
  • All blocks must share dimensions. The node reads shape from the first block and iterates every frame against it. Mix 20³ and 40³ blocks in one list and the flat index math will quietly misplace voxels.
  • Big grids are heavy on the browser. Each frame becomes a THREE.Group of individual box meshes. A 100³ block is a million potential cubes per frame - the viewer will chug long before the node does.

Installing it

Same pack install as everything else - no requirements.txt, so nothing extra is installed for you, though this node itself only uses numpy:

# ComfyUI Manager: search "ComfyUI-Voxels", or:
cd ComfyUI/custom_nodes
git clone https://github.com/DanielHabib/ComfyUI-Voxels
# restart ComfyUI

It's a single-commit, unmaintained pack from late 2024, so set expectations accordingly - but this node is the pack's actual thesis, and when the pieces line up it works: load your saved frames, pick a framerate that isn't 1, and watch your voxel animation play in the preview node.

CategoryVoxels

Inputs (2)

NameTypeDefaultDescription
voxel_blocksVOXEL_BLOCK
framerateINT11–100

Outputs (1)

NameTypeDescription
voxel_videoVOXEL_VIDEO