ComfyUI Node

Load_OBJ

Where every mesh workflow starts (and where it silently resizes your model)

By 807502278·Created 2 years ago·Updated 2 years ago· 23
Load_OBJ
    • mesh
    mesh_file_path
    reloadfalse

    Load_OBJ is the front door of ComfyUI-3D-MeshTool: it loads an .obj file and hands you a MESH - the pack's core data type that every mesh node (unwrap, cleanup, data get/set, statistics) consumes. If you want to do anything to a 3D model in this pack, you start here.

    The mesh you get back isn't a file handle; it's a torch-native mesh object that holds vertices, faces, vertex/face normals, UVs, vertex colors, and optional diffuse and metallic-roughness textures - the same Mesh class ComfyUI-3D-Pack and TRELLIS-style pipelines use, with matching conventions.

    How it works

    Give it a mesh_file_path. It can be an absolute path or a path relative to ComfyUI's input folder. The node only accepts .obj - anything else prints an error and returns nothing. Behind the scenes it calls the Mesh.load() path, which parses the OBJ (and its MTL for the texture), then does three things automatically:

    1. Auto-sizes the model to fit a unit-ish bounding box.
    2. Recomputes vertex normals if missing.
    3. Keeps whatever UVs and textures the OBJ carried.

    The reload toggle exists, but in the current source it mostly just logs the load time - the file is always read fresh, so don't rely on it as a caching switch.

    The gotcha that bites everyone

    That auto-sizing is the thing to know before you wire this into a workflow. The mesh comes out normalized - scaled to fit the pack's standard bounds and centered. Your original size and world position are gone. If you're loading a mesh to composite it at a specific real-world scale, this is not the node for that; the author's own roadmap flags "restore normalized vertices to their original state" as an unfinished feature. For generating or processing (UV unwrapping, cleanup, feeding a renderer that expects unit-scale input), normalized is exactly what you want.

    Output

    • mesh (MESH) - the loaded, normalized mesh.

    From here it plugs into Mesh_Data_Get to pull raw arrays, UnwrapUV_xatlas to generate UVs, Mesh_Cleanup to de-debris it, or Mesh_Data_Statistics to see what it actually contains.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/807502278/ComfyUI-3D-MeshTool
    cd ComfyUI-3D-MeshTool
    pip install -r requirements.txt
    

    Then restart ComfyUI. ComfyUI Manager also lists it (search "ComfyUI-3D-MeshTool"). Requirements are kiui, xatlas, pyfqmr, plyfile - no model downloads. kiui is the heavy one but you likely already have it from 3D-Pack or TRELLIS work.

    Common issues

    If nothing comes out, check three things: the path resolves (remember relative paths are relative to input/), the file is actually .obj (not .ply or .glb - those aren't supported by this node, despite the README hinting at broader format dreams), and the file isn't empty or malformed. The node prints its errors to the console rather than raising them, so if you see no output, the console is where the answer is.

    Category3D_MeshTool/Basics

    Inputs (2)

    NameTypeDefaultDescription
    mesh_file_pathSTRING
    reloadBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    meshMESH