Nodes/Avatar Graph/Mesh Primitive Torus Add
ComfyUI Node

Mesh Primitive Torus Add

Dropping a donut into your Avatar Graph scene

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Primitive Torus Add
  • location
  • rotation
  • BPY_OBJ
seed0
align
major_segments48
minor_segments12
mode
major_radius1.00
minor_radius0.25
abso_major_rad1.25
abso_minor_rad0.75
generate_uvstrue

Most of Avatar Graph's Blender nodes exist to process a mesh you already have - remesh it, bake it, transfer data onto it. Mesh Primitive Torus Add is one of the handful that generate geometry from nothing: it drops a torus (a donut shape) into the scene. In the context of the pack's actual purpose - rigging interactive character avatars - that's not decorative. A torus is a fast way to build a ring-shaped prop: glasses rims, a halo, a bracelet, an eyeball socket edge, anything circular you'd otherwise have to model by hand.

How it works

This is a near-direct wrap of Blender's own primitive-torus operator - if you've used Blender's Add Mesh menu, every parameter here will look familiar, because the pack generates its Blender-facing node definitions straight from Blender's own operator metadata rather than hand-writing a simplified version. That's also why there are two different ways to size the same shape (major/minor radius vs. exterior/interior radius) baked into one node instead of two - Blender itself offers both, and this node just exposes the choice.

The inputs and outputs that matter

Everything is optional with sane defaults, but a few actually shape the result:

  • major_radius (default 1) and minor_radius (default 0.25) - the two numbers that matter under the default MAJOR_MINOR mode: how big the ring is overall, and how thick the tube is. Switch mode to EXT_INT and you instead set abso_major_rad / abso_minor_rad (outer edge and inner edge distance) - same shape, different way of specifying it.
  • major_segments (default 48) and minor_segments (default 12) - how smooth the ring looks and how round the tube cross-section is. Lower these for a low-poly look or a lighter mesh.
  • location and rotation - where and how the torus lands in the scene (both B_VECTOR3 types, Blender's 3-axis vector).
  • align - WORLD, VIEW, or CURSOR; controls what the initial orientation is measured against, the same three options Blender's own toolbar gives you.

Output is a single BPY_OBJ - the new torus object, ready to feed into any of the pack's other Blender nodes (a remesh, a data transfer, a duplicate-move) the same way you'd chain operators in Blender itself.

How to install it

ComfyUI Manager, search "Avatar Graph" and install, or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui

then pip install -r requirements.txt and restart. This is a bpy-backed node, so the pack's core requirement applies in full: Python 3.10.x specifically, because that's the only version Blender's bpy package ships for. On macOS/Linux, that means its own conda environment rather than folding it into an existing ComfyUI install running a newer Python - mixing bpy into a 3.11/3.12 environment is the fastest way to get import errors before you've even placed your first shape. Windows users can sidestep this with Avatech's prebuilt Python-3.10 ComfyUI zip and install the pack through Manager on top of it.

Common issues & troubleshooting

If the node won't load at all, that's the pack's bpy install, not this specific node - confirm you're on Python 3.10.x and that pip install -r requirements.txt ran clean in that environment. This is a known, recurring class of problem for any ComfyUI pack that embeds Blender's Python module as a dependency, not something unique to Avatar Graph.

If the torus appears but at an unexpected size or position, check mode first - it's easy to set major_radius/minor_radius expecting them to apply while mode is actually set to EXT_INT, which reads abso_major_rad/abso_minor_rad instead and silently ignores the other pair.

Categoryblender

Inputs (12)

NameTypeDefaultDescription
seedoptINT00–18446744073709550000
alignoptCOMBO3 options: WORLD, VIEW, CURSOR
locationoptB_VECTOR3
rotationoptB_VECTOR3
major_segmentsoptINT483–256
minor_segmentsoptINT123–256
modeoptCOMBO2 options: MAJOR_MINOR, EXT_INT
major_radiusoptFLOAT1.000–10000
minor_radiusoptFLOAT0.250–10000
abso_major_radoptFLOAT1.250–10000
abso_minor_radoptFLOAT0.750–10000
generate_uvsoptBOOLEANtrue

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ