Nodes/ComfyUI-3D-MeshTool/Mesh_Data_Statistics
ComfyUI Node

Mesh_Data_Statistics

The diagnostic node that tells you exactly what's inside a mesh

By 807502278·Created 2 years ago·Updated 2 years ago· 23
Mesh_Data_Statistics
  • mesh
  • Output_Group
  • vertex_num
  • face_num
  • Normal_true
  • UVs_true
  • vertex_color_true
  • Texture_Diffuse_true
  • Texture_reflection_true
  • device

Half the debugging in the 3D side of ComfyUI is "does this mesh even have what I think it has?" Mesh_Data_Statistics (from ComfyUI-3D-MeshTool) answers that in one shot: it counts your vertices and faces and reports, as booleans, whether normals, UVs, vertex colors, diffuse textures, and reflection textures are actually present, plus which device the mesh lives on.

It's the pack's truth-teller. Before you wire a mesh into UnwrapUV_xatlas or start editing data, run this node and see what you're actually working with.

What comes out

  • Output_Group (LIST) - a compact dictionary with all the stats in one object, handy for display or scripting
  • vertex_num (INT) and face_num (INT) - the counts that matter
  • Normal_true, UVs_true, vertex_color_true, Texture_Diffuse_true, Texture_reflection_true (BOOLEAN) - true if the channel exists, false if it's None
  • device (STRING) - where the mesh's tensors live (cpu, cuda:0, …)

The booleans are genuinely useful as graph logic: wire UVs_true into a switch that routes meshes with UVs to one path and UV-less meshes to an unwrap path. It turns a diagnostic into a branch condition.

When you'd use it

  • Right after Load_OBJ or ply_load, to see what came in before you build on top of it.
  • Before Mesh_Clean_Data, so you know which channels are actually there to strip.
  • Anytime something downstream behaves differently on two "identical" meshes - the answer is almost always that they carry different channels, and this node will tell you in a second.

Install

It ships in the pack, so:

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

Restart ComfyUI, or install via ComfyUI Manager (search "ComfyUI-3D-MeshTool").

Notes

The one real trap: this node expects an actual mesh, so feed it the output of a successful load. If a MESH socket is connected but the load failed upstream (bad path, unsupported format), you'll be poking at None and the node will error rather than shrug. That's a feature, honestly - it tells you a load went wrong even when the loader only printed to the console. And since it computes everything fresh each run, it's cheap enough to leave in the graph permanently as a mesh inspector.

Category3D_MeshTool/Basics

Inputs (1)

NameTypeDefaultDescription
meshMESH

Outputs (9)

NameTypeDescription
Output_GroupLIST
vertex_numINT
face_numINT
Normal_trueBOOLEAN
UVs_trueBOOLEAN
vertex_color_trueBOOLEAN
Texture_Diffuse_trueBOOLEAN
Texture_reflection_trueBOOLEAN
deviceSTRING