Extensions/ComfyUI-3D-MeshTool
ComfyUI Extension

ComfyUI-3D-MeshTool

A simple 3D model processing tool within ComfyUI.

By 807502278·Created 2 years ago·Updated 2 years ago· 23
807502278/ComfyUI-3D-MeshTool
Nodes37
On cloudLocal install
Category3D_MeshTool/Array/list_edit, 3D_MeshTool/Array/list_new
Stars23
Updated2 years ago

Nodes (37)

array1 append

Not Python append — it pairs rows and trims the excess

3D_MeshTool/Array/list_edit
array1 attribute

How long is that list, really?

3D_MeshTool/Array/list_edit
array1 convert

Three list conversions in one pass

3D_MeshTool/Array/list_edit
array1 end increment

A sequence with a real stopping point

3D_MeshTool/Array/list_new
array1 end step

A 'step' that's secretly a count, and that's a feature

3D_MeshTool/Array/list_new
array1 is null

A tiny boolean that guards your batch logic

3D_MeshTool/Array/list_edit
array1 number to angle

Turn raw numbers into camera-ready degrees

3D_MeshTool/Array/list_edit
array1 select element

Reorder a list without a single math node

3D_MeshTool/Array/list_edit
array1 step

A sequence generator whose 'step' means count, not spacing

3D_MeshTool/Array/list_new
array1 step increment

The duplicate twin of array1 step

3D_MeshTool/Array/list_new
array1 t

The transpose nobody thinks about until they need it

3D_MeshTool/Array/list_edit
array1 to camposes

Turn typed numbers into real camera orbits

3D_MeshTool/Convert
Auto_Normal

The node that fixes the 'flat shading' disaster

3D_MeshTool/Edit
get tensor shape

The honest sibling that actually reads a tensor

3D_MeshTool/Array/Tensor
img bath rotationZ

Straighten the multi-view batch so your camera angles actually line up

3D_MeshTool/Camera
img to tensor

A boring adapter that quietly unifies image and tensor types

3D_MeshTool/Array/Tensor
json to camposes

Feed your multi-view dataset's camera JSON straight into the graph

3D_MeshTool/Camera
List to Tensor

The five-line bridge between Python lists and the pack's tensors

3D_MeshTool/Convert
Load_OBJ

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

3D_MeshTool/Basics
Mesh_Clean_Data

Don't confuse this with Mesh Cleanup — this one strips data, not geometry

3D_MeshTool/Basics
Mesh_Cleanup

Drop the floating debris and non-manifold garbage from scanned meshes

3D_MeshTool/optimization
Mesh_Data_Get

Open the mesh hood and pull out every raw array it's hiding

3D_MeshTool/Basics
Mesh_Data_Set

Reassemble a mesh from raw data — the setter to Mesh_Data_Get's getter

3D_MeshTool/Basics
Mesh_Data_Statistics

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

3D_MeshTool/Basics
Mesh_Optimization

Cut a million triangles down to a renderable model

3D_MeshTool/optimization
Mesh_Subdivide

Giving Avatar Graph's shape keys more geometry to bend

3D_MeshTool/optimization
ply_load

Get your Gaussian-splat and point-cloud PLY files into the graph

3D_MeshTool/Basics
ply_normalize

The node that turns industrial point clouds into splattable data

3D_MeshTool/Edit
ply_save

Get your processed point cloud out of ComfyUI

3D_MeshTool/Basics
RT to camposes

Turn raw rotation/translation tensors into cameras 3D-Pack can orbit

3D_MeshTool/Convert
string to array1

Paste '0, 30, 60' and get a real list

3D_MeshTool/Array/list_new
tensor new

Spawn a fresh tensor of any shape, filled or random, when you need a blank canvas

3D_MeshTool/Array/Tensor
tensor shape

'tensor shape' builds a shape, it doesn't read one

3D_MeshTool/Array/Tensor
tensor to img

When a raw tensor won't preview, this is the bridge

3D_MeshTool/Array/Tensor
Tensor to List

The bridge from torch tensors to this pack's array nodes

3D_MeshTool/Convert
UnwrapUV_xatlas

Get real UVs on that mesh in one node, no Blender required

3D_MeshTool/Edit
UV_options

Fine-tune the xatlas unwrap without touching code

3D_MeshTool/Edit
Readme

ComfyUI-3D-MeshTool

Introduction: A simple 3D model processing tool within ComfyUI

Partially referenced from everyone's plugins, if there is any inconvenience, please leave a message, and I will promptly remove the corresponding code. For new features or suggestions, please provide feedback.

Note: If the node name has been changed (after update), if there is this old node in the workflow, it will turn red. A new one needs to be created and connected again.

Update:

  • 3d_meshtool #2024-0705
    • Array # Arrays can perform batch operations on certain properties, such as the of zero123, image batches, creating certain increments, etc.
      • basics # Create an array
        • array1 step # Generate an array with a starting value and step size.
        • array1 end increment # Generate an array with a starting value, end value, and increment.
        • array1 end step # Generate an array with a starting value, end value, and step size.
        • array1 step increment # Generate an array with a starting value, step size, and increment.
        • string to array # Convert a string to an array, including standardized brackets/removing non-numeric functions.
      • calculation #2024-0705
        • array1 T # Transpose the array
        • array1 number to angle # Convert array numbers to angles, including semi-angles.
        • array1 append # Concatenate arrays, automatically determining 1D and 2D addition.
        • array1 is null # Check if the array is empty.
        • array1 attribute # Retrieve array attributes.
        • array1 convert # Convert data types within the array.
        • array1 select element # Select array elements, including standardized brackets/removing non-numeric functions.
    • Basics #2024-0705
      • load_obj # Load an OBJ file.
      • mesh_data_get # Retrieve mesh data.20241007 rename
      • mesh_data_set #20241007 Set mesh data.
      • mesh_data_statistics # Statistics of mesh data, other than vertices and faces, other data is used to determine if it is empty.
      • mesh_clean_data # Clean mesh data, can customize the removal of invalid or mismatched data.
      • Ply_load #20240810 Load a PLY file.
      • Ply_save #20240820 save a PLY file.
    • Camera #2024-0705
      • array1 to camposes # Convert an array to 3dpack camera poses (requires a 6xNx3 array, refer to 3dpack's campos standard).
    • Edit #2024-0705
      • unwrapUV_xatlas # Latest (2023) UV unwrapping algorithm.
      • UV_options # Settings for the unwrapUV_xatlas node, if not connected, default settings are used.
      • Auto_Normal # Automatically calculate model normals.
      • Ply_normalize #20240810 Normalize the imported ply coordinates/colors, adjust the display size of individual points, and exchange color channels.
    • Optimization #2024-0705
      • mesh_optimization # Mesh optimization, select optimization types and parameters.
      • mesh_cleanup # Mesh cleanup, select cleaning up model debris.
      • mesh_subdivide # Mesh subdivision, increases vertices without changing the shape.
    • Show

Roadmap:

  • Basic Functions
    • Array sequence (still needs optimization)
    • Data conversion (may need to add other conversions)
    • OBJ import (used code from 3dpack, still need to add whether the model is normalized and its data output to retain the original size and position when processing models in batch)
    • PLY import (The ply point cloud output from industrial software can be imported, and the author tested its feasibility using CloudCompare)
    • 🟩 Simple direct preview window (no need to save first) + preview window for world normals/depth/mask/specified view (can be used for compositing)
    • 🟩 Save, choose which data to save
  • Model Optimization
    • Remove debris
    • Reduce faces by percentage (vertices)
    • Cut subdivision
    • 🟩 Turbine smoothing
    • 🟩 Convert to quads
    • 🟩... (other optimizations)
  • Model Editing
    • UV decomposition (xatlas)
    • Automatic vertex normals
    • 🟩 Group support for ply
    • 🟩 UV remap
    • 🟩 Restore normalized vertices to their original state
    • 🟩 High-poly to low-poly texture/bump baking, AO baking (attempt to convert Blender's code to Comfyui)
    • 🟩 ply segmentation
    • 🟩... (other edits)
  • other
    • 🟩 Display any data.
    • 🟩 Example workflow