Nodes/ComfyUI-Voxels/Voxel Video Preview
ComfyUI Node

Voxel Video Preview

The node that actually plays your voxel video in the browser — and has a file-stomping quirk

By DanielHabib·Created 2 years ago·Updated 2 years ago· 4
Voxel Video Preview
  • voxel_video

    Voxel Video Preview is where the pack's payoff shows up on screen. You feed it a VOXEL_VIDEO and it plays the animation - frame by frame, at the video's framerate - in a 3D viewport right inside the node, rendered with three.js. It's one of only two nodes in this pack that actually have a frontend wired up, and it's the one that makes "voxel video" a real thing you can watch.

    How it works

    On the Python side the node is simple: it takes voxel_video (VOXEL_VIDEO), dumps it to disk as JSON, and returns a {"ui": {"voxel_video": ...}} payload. The interesting half lives in the pack's JavaScript. When this node executes, the frontend receives the video dict and hands it to a VoxelVideoPlayer, which builds a THREE.Group of box meshes for every frame - one unit cube per occupied voxel, colored from the hex values - then cycles through them on an interval of 1000 / Framerate ms. OrbitControls let you spin the scene, and a grid helper gives you a sense of scale. That's a genuinely neat viewer for what is otherwise a very rough-around-the-edges pack.

    The one input

    • voxel_video (VOXEL_VIDEO) - the video object from Voxel Blocks Into Voxel Video, or from Voxel Video Loader if you're replaying a saved one.

    No outputs, no settings. It's a terminal preview node.

    The quirk you'll hit

    The Python side writes a copy of the video to disk, and the file naming is buggy in a way that will eventually bite you. It scans for files matching output/voxel_video_preview_*.json - a pattern that never exists - then writes to output/voxel_video_<N>.json, which is exactly the naming scheme Voxel Blocks Into Voxel Video uses. Because the scan always finds nothing, the counter stays at zero and every preview run writes output/voxel_video_1.json. Run a preview after saving a video with the video-maker node and your saved file gets overwritten. If the on-disk copy matters, treat preview as a purely visual node and load from a backup.

    One more practical note: the preview is only as good as the framerate you gave the video. A Framerate of 1 (the video-maker's default) plays one frame per second, which reads as a slideshow. Crank the framerate at video-build time, not here - this node just honors whatever's in the video.

    Installing it

    Standard pack install; the viewer is bundled (three.js ships inside the pack's web/ folder), so nothing extra to fetch:

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

    After restart, the node renders in the canvas in place - you don't need to open anything external. It's a single-commit, unmaintained pack from September 2024, and the viewer is easily its most polished feature. Enjoy it, just don't trust the file it drops in output/.

    CategoryVoxels

    Inputs (1)

    NameTypeDefaultDescription
    voxel_videoVOXEL_VIDEO

    Outputs (0)

    No outputs