Nodes/Avatar Graph/Object Randomize Transform
ComfyUI Node

Object Randomize Transform

Scatter props and add variation without placing a single thing by hand

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Randomize Transform
  • BPY_OBJ
  • loc
  • rot
  • scale
  • BPY_OBJ
random_seed0
use_deltafalse
use_loctrue
use_rottrue
use_scaletrue
scale_evenfalse

Object Randomize Transform is the node that makes a scene full of clones look organic. It wraps bpy.ops.object.randomize_transform, which jitters the location, rotation, and scale of the selected objects by random amounts. If you've got twenty strands of hair, a bunch of identical accessories, or a crowd of identical avatars and you want them to stop looking like a copy-paste, this is your answer.

How it works

Every Object_* node in this pack runs against the headless Blender scene, and this one shuffles whatever is selected. The inputs map to the operator's own parameters:

  • BPY_OBJ - the object to work from (becomes active; selection still drives what gets randomized).
  • random_seed - reproducibility. Same seed, same jitter, every run. This is the "make it deterministic again" dial.
  • use_loc / loc - toggle location randomization and set the maximum offset per X/Y/Z axis. The B_VECTOR3 inputs are ranges, not targets: loc of (0.5, 0.5, 0) means "nudge up to half a unit on X and Y, nothing on Z."
  • use_rot / rot - same idea for rotation.
  • use_scale / scale / scale_even - scale jitter, with scale_even keeping the object proportionally scaled (no squashed-looking props). Default is off, which is a common "why is my prop stretched?" trap.
  • use_delta - apply the randomization to the object's delta transform instead of the base transform. Leave it off unless you know you want it.

Output is a single BPY_OBJ, the active object, so it chains cleanly.

Where you'd actually use it

In avatar-land: scattered fur strands, jewelry and accessories, a crowd of background characters, or slight pose variation across duplicated limbs. Pair it with Object Select Random to grab a subset, or Object Select All + a DESELECT pass to isolate one object first. Because it acts on selection and the scene resets each run, the typical pattern is: build → select what you want to shuffle → randomize → continue.

Installing it

Part of the Avatar Graph pack. ComfyUI Manager → search "Avatar Graph" → install → restart, or:

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

Pack-wide notes still apply: bpy==3.6.0 needs Python 3.10, and the first import auto-downloads the SAM and mediapipe models. And the one gotcha specific to this node: it randomizes selected objects, and Blender ops here don't "remember" selection between runs - so if nothing seems to shuffle, your selection nodes did the deselecting for you.

Categoryblender

Inputs (10)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
random_seedoptINT00–10000
use_deltaoptBOOLEANfalse
use_locoptBOOLEANtrue
locoptB_VECTOR3
use_rotoptBOOLEANtrue
rotoptB_VECTOR3
use_scaleoptBOOLEANtrue
scale_evenoptBOOLEANfalse
scaleoptB_VECTOR3

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ