Nodes/Avatar Graph/Object Mesh From Texture
ComfyUI Node

Object Mesh From Texture

Turning a flat image into an actual 3D mesh object

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Mesh From Texture
  • image
  • IMAGE
  • BPY_OBJ
seed0

Unlike almost everything else in Avatar Graph's blender category, this one isn't a 1:1 wrapper around a stock Blender operator - there's no bpy.ops.object.mesh_from_texture in vanilla Blender. Object Mesh From Texture is Avatech's own node, and its job description matches something the pack's own README does document by name: "Create Mesh Layer" - "create a mesh object from the input images (usually a segmented part of the entire image)." This is the node that actually bridges the gap between "I have a picture" and "I have a 3D object Blender's tools can operate on."

How it works

Feed it an image - typically one segment of a character (an eye, the head outline, a mouth) cut out by an earlier segmentation step - and it builds an actual mesh object shaped and mapped to that image, which is then what the rest of the pack's blender-category nodes (subdivide, extrude, normals tricks, and so on) chain off of via BPY_OBJ. This is the node that makes the whole rest of this pack's Blender toolkit relevant to a ComfyUI image workflow in the first place: everything downstream operates on the object this creates.

The inputs and outputs that matter

  • image - the input image (typically one segmented layer of a character) the mesh gets built from.
  • seed - a reproducibility seed for whatever generation step involves some randomness (the exact algorithmic detail isn't documented, but the presence of a seed tells you the mesh-building isn't fully deterministic without pinning one).

Two outputs: IMAGE, the same image passed through for chaining into further image-side steps, and BPY_OBJ, the new mesh object - the one you'll actually wire into the pack's Blender-operator nodes.

How to install it

ComfyUI Manager: search "Avatar Graph" (avatar-graph-comfyui) and install. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, cd avatar-graph-comfyui && pip install -r requirements.txt, restart. This pack needs Python 3.10.x specifically, because it embeds Blender as a library (bpy), and bpy only ships wheels for that exact version - a newer ComfyUI environment fails to install it, or the blender-category nodes just don't show up. macOS/Linux: dedicated conda env at 3.10. Windows: Avatech's prebuilt Python-3.10 ComfyUI zip, then install the pack through Manager. Since 2023 the pack's demo workflows have circulated on Reddit as drag-and-drop .json templates (a pixel-art dog, a lipsync avatar) rather than something most people build node-by-node from scratch - worth starting from a workflow template rather than wiring this from an empty graph.

Common issues & troubleshooting

Same seed, different image, same-shaped mesh. If seed is pinned and you swap the input image for something with a very different silhouette, the underlying generation may not adapt cleanly - try letting the seed vary, or re-check the result against the new image's shape.

Result doesn't look like a clean cutout. This node works best on already-segmented, single-subject images (the README's own recommended pipeline runs SAM segmentation first) - feeding it a full, uncropped scene rather than one isolated part tends to produce a mesh you didn't want.

It's the pack's own custom node, not a Blender passthrough. Worth knowing going in: unlike most of the rest of this pack's blender-category nodes, there's no equivalent stock Blender operator to look up for exact behavior here - the README's "Create Mesh Layer" description is the closest thing to a spec.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
imageoptIMAGE
seedoptINT00–18446744073709550000

Outputs (2)

NameTypeDescription
IMAGEIMAGE
BPY_OBJBPY_OBJ