Nodes/ComfyUI libigl/Preview Mesh (Three.js)
ComfyUI Node

Preview Mesh (Three.js)

The interactive 3D viewer every GeometryPack workflow ends in

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Preview Mesh (Three.js)
  • trimesh

    Here's the thing nobody tells you about 3D in ComfyUI: the default image preview is useless for meshes. You need a viewer that orbits, zooms, and renders a surface, and Preview Mesh (Three.js) is the pack's plain-vanilla answer to that. One TRIMESH in, an interactive Three.js viewport in the browser with orbit controls out. It's the node you stick at the end of "I just loaded a mesh and want to confirm it's not a potato."

    It's part of ComfyUI-GeometryPack ("ComfyUI libigl") by Andrea Pozzetti. The author ships several preview nodes - this is the no-frills baseline, and the other variants exist because the baseline is too simple for the deeper analysis cases.

    How it works

    There's genuinely nothing to configure: one input, trimesh, and zero outputs (it's marked as an output node, meaning it terminates a branch). When the graph runs, the node exports the mesh and the frontend widget loads it into a Three.js scene with orbit controls - drag to rotate, scroll to zoom, that's the whole interaction model. It works for both meshes and point clouds (the node checks the geometry type and renders accordingly), so it doubles as a cheap point-cloud viewer.

    Because it's the plain viewer, it also exposes the mesh's basic stats in the widget: vertex count, face count, and bounding-box bounds and extents. That's a nice passive health check - you'll often spot "oh, this is 400 units across" the instant the viewport shows it, before any processing node wastes time on it.

    Why you'd pick this over the fancy ones

    The pack's other previews are strictly better for specific jobs - Preview Mesh (Dual) for before/after comparison, Preview Mesh (UV) for unwrap inspection, Preview Mesh (Analysis) for compute-on-click fields, Preview Mesh Batch (VTK) for flipping through lists. Reach for those when that's the job. This one is the quick look, and there's value in that: it's fast, it has no modes to mis-set, and it accepts point clouds the UV node won't. If you just want to see the thing, this is the thing to use.

    The trade-off: no textures (use the texture output of a loader with the textured preview variant if you need color), no scalar-field visualization (that's the VTK family's territory), and no multi-mesh compare.

    Install

    Same as every node in the pack: search "GeometryPack" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
    cd ComfyUI-GeometryPack
    pip install -r requirements.txt --upgrade
    python install.py
    

    Restart after. The pack installs through the experimental comfy-env package (it pulls in pixi and builds an isolated environment with the heavy 3D dependencies), so the first launch is slow - and the preview viewers are part of what gets copied into place at startup, so if the viewer pane shows blank or missing, a full ComfyUI restart is the first fix to try, before reinstalling anything.

    The one real gotcha

    If the preview comes up empty, it's almost never the mesh - it's that the viewer files didn't get copied on startup. Check the console for a "Failed to copy viewer" warning, restart ComfyUI, and try again. Also worth knowing: this pack is WIP with fast releases, so preview widgets are the thing most likely to change shape between versions - don't be surprised if a viewer you've relied on for months looks different after an update.

    Categorygeompack/visualization

    Inputs (1)

    NameTypeDefaultDescription
    trimeshTRIMESH

    Outputs (0)

    No outputs