Nodes/Avatar Graph/Object Duplicates Make Real
ComfyUI Node

Object Duplicates Make Real

Turning virtual instances into real objects

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Duplicates Make Real
  • BPY_OBJ
  • BPY_OBJ
use_base_parentfalse
use_hierarchyfalse

Blender has more than one way to show "many copies of an object" without actually creating many objects - particle systems, Array-style modifiers, geometry-node instancing all display duplicates that don't exist as individual, selectable objects in the Outliner. Object Duplicates Make Real is the node that converts those virtual duplicates into real, individually-editable objects.

How it works

It wraps bpy.ops.object.duplicates_make_real(). Whatever's generating the virtual duplicates on your target object - a particle system scattering copies across a surface, dupliframes, instanced geometry - gets "realized" into concrete objects that live in the scene on their own, with their own entries in the Outliner. This matters more than it sounds: most export pipelines, including whatever ultimately turns an Avatar Graph rig into a .glb/.gltf, expect real objects, not the virtual instancing Blender shows you in the viewport. If a graph elsewhere in your build uses instancing to scatter repeated elements, this is the step that makes them exportable and individually addressable (for per-instance materials or face maps, say) rather than one phantom multiplied visually.

The inputs and outputs that matter

  • BPY_OBJ - the duplicator object to realize.
  • use_base_parent (bool, default false) - when on, the newly realized objects get parented to the original object, keeping them organized under one parent in the Outliner instead of scattered loose.
  • use_hierarchy (bool, default false) - when on, preserves parent-child relationships among the duplicated objects themselves, if the source had nested structure, rather than flattening everything to the same level.

Output: a single BPY_OBJ - the original base object, post-realization. The individual objects it created now exist in the scene and Outliner, but this one output doesn't enumerate all of them; downstream nodes that need to touch a specific realized instance would need to select or reference it some other way.

How to install it

ComfyUI Manager: search "Avatar Graph", install, restart - or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt

bpy only ships wheels for Python 3.10.x - the real gatekeeper here, not this operator. Windows gets a prebuilt Python-3.10 ComfyUI zip from the README; macOS/Linux wants a dedicated conda create --name comfyui python=3.10 rather than reusing a newer-Python setup. Add --enable-cors-header on restart (--force-fp16 too on Mac) for the live avatar preview; without it you still get full functionality via .glb/.gltf export.

Common issues & troubleshooting

Node not loading at all is almost certainly the Python-version pin - check for a bpy import error in ComfyUI's startup console.

Nothing visibly changes when this node runs - if the target object wasn't actually generating any virtual duplicates in the first place (no particle system, no duplicator modifier), there's nothing for this operator to realize, and it's a silent no-op rather than an error. Confirm whatever's supposed to be generating instances is actually attached and producing them before this node in the chain.

Export is missing pieces you can see in preview - this is the fix, not a coincidence. Virtual instances render fine in Blender's viewport (and in Avatar Graph's live preview) but often don't survive a naive export path the same way real objects do. If exported output is dropping repeated elements you can clearly see beforehand, check whether they're still virtual duplicates that need this node run on them first.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
use_base_parentoptBOOLEANfalse
use_hierarchyoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ