Nodes/ComfyUI libigl/Preview Mesh UV
ComfyUI Node

Preview Mesh UV

The UV check you do before you paint anything

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Preview Mesh UV
  • trimesh
    show_checkerfalse
    show_wireframetrue

    A UV unwrap can look fine in the editor and still be secretly terrible - overlapping islands, stretched shells, texel density all over the place - and you won't know until you actually paint something on it and it comes out smeared. Preview Mesh UV is the check-before-you-paint node: it shows your mesh in a split-pane viewer with the 3D surface on one side and its UV layout on the other, with a checkerboard toggle that makes distortion embarrassingly obvious.

    It's part of ComfyUI-GeometryPack ("ComfyUI libigl") by Andrea Pozzetti, and it slots naturally after the pack's UV Unwrap node (which runs xAtlas, libigl LSCM, or Blender projection backends) - unwrap, then preview, then iterate.

    How it works

    One required input, trimesh, and two toggles that do most of the work:

    • show_checker (default false) - the author's tooltip calls it out directly: it applies a checker pattern to visualize UV distortion. A uniform checker on the 3D surface means the UVs are clean; stretched, wavy, or smeared checker squares are the visual signature of a bad unwrap. This is the single most useful control on the node - turn it on.
    • show_wireframe (default true) - draws the wireframe over the 3D view so you can see triangle density while you're checking the UVs.

    The viewer renders the mesh with its UV coordinates on one pane and the 3D surface on the other, so you can see both the layout and how it maps back onto geometry at the same time. It's marked as an output node - no outputs, it's a terminal - and it returns an error message in the widget rather than a crash if you feed it something that can't be UV-viewed.

    The gotchas, which are real

    • Point clouds refuse - no faces, no UVs. The node explicitly errors with "UV viewing requires a mesh with faces" if you hand it a point cloud. Load a mesh, don't load a cloud.
    • No UVs yet = nothing to see - if the mesh has no UV coordinates at all (a raw scan, a CAD import), the UV pane has nothing to show. Run UV Unwrap first; this node verifies, it doesn't create.
    • Checker doesn't lie - if show_checker reveals distortion, the answer is a better unwrap (different backend, more islands), not a bigger texture. The node's job is to make you have that conversation with yourself.

    Install

    Same pack, same routine: 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 (pixi included) and copies its viewer files into place on startup - slow first boot, and a blank viewer after an update is "restart ComfyUI" before anything else.

    It's a narrow node: UV inspection only. But in a pipeline where you're unwrapping and texturing dozens of assets, "unwrap → preview with checker → re-unwrap if smeared" is the loop that keeps your textures from looking like they were painted on wet clay. The pack is WIP with fast releases, so if the checker rendering changes between versions, that's iteration, not breakage.

    Categorygeompack/visualization

    Inputs (3)

    NameTypeDefaultDescription
    trimeshTRIMESH
    show_checkeroptBOOLEANfalseApply checker pattern to visualize UV distortion
    show_wireframeoptBOOLEANtrueShow mesh wireframe on 3D view

    Outputs (0)

    No outputs