Nodes/Avatar Graph/UV Randomize Uv Transform
ComfyUI Node

UV Randomize Uv Transform

Breaking up repetition on tiled or atlas textures

By avatechai·Created 3 years ago·Updated 2 years ago· 264
UV Randomize Uv Transform
  • BPY_OBJ
  • loc
  • scale
  • BPY_OBJ
random_seed0
use_loctrue
use_rottrue
rot0.00
use_scaletrue
scale_evenfalse

A Blender UV operator wrapped as a node inside Avatar Graph, avatech.ai's pack for rigging flat character illustrations into interactive avatars in ComfyUI. It nudges each UV island's location, rotation, and scale by a random amount - the classic fix for a texture that looks obviously tiled or repeated once it's mapped onto multiple mesh pieces.

When you'd actually reach for this

If a texture is applied identically across repeated geometry - think multiple similar mesh pieces sharing one texture atlas - the repetition reads immediately to the eye, especially at close range. Randomizing each UV island's transform slightly (a bit of offset, a bit of rotation, a bit of scale) breaks that visual pattern without touching the underlying mesh or texture at all - it's a UV-space trick, not a geometry or shading fix. In this pack's context, that's the kind of polish pass you'd run after your mesh layers are built and UV-mapped but before final export.

The fields that matter

  • random_seed (default 0, 0–10000) - change this to get a different random result from the same settings; the same seed reproduces the same randomization.
  • use_loc / use_rot / use_scale (all default true) - toggle which transform components actually get randomized. Turn one off if, say, you want islands rotated but not resized.
  • loc - a 2D vector input controlling the range of positional randomization.
  • rot (default 0, range roughly ±6.28) - worth flagging explicitly: that range is radians, not degrees (±6.28 is just ±2π). If you're used to thinking in degrees, dial this in carefully rather than typing a number that "looks small."
  • scale_even (default false) - whether the random scale applies uniformly to an island or independently per axis.
  • scale - a 2D vector input controlling the range of scale randomization.

Input and output are both BPY_OBJ, this pack's socket type for carrying a live Blender object reference between nodes - feed in a UV-mapped mesh, get the same mesh back with its UV islands nudged.

Installing it

Search avatar-graph-comfyui in ComfyUI Manager, or install 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

Like every mesh/UV node in this pack, this one runs through bpy - Blender packaged as a plain Python module - and bpy is fixed to Python 3.10.x. That constraint drives the whole install: the README ships a dedicated prebuilt Python 3.10 ComfyUI zip for Windows, and recommends a fresh conda create --name comfyui python=3.10 environment on Mac/Linux rather than trying to install this against whatever newer Python your main ComfyUI already runs. Restart with --enable-cors-header afterward if you want the live avatar preview panel to talk to editor.avatech.ai.

Troubleshooting

If nothing looks randomized, check that the toggle for the component you care about (use_loc, use_rot, use_scale) is actually on - it's easy to assume all three are active when one's been switched off. If the rotation looks wildly more extreme than expected, that's almost always the radians-vs-degrees mixup - a value like 3 here is roughly 172 degrees of possible rotation, not a gentle nudge. And keep in mind this only changes UV coordinates, not the mesh or the texture itself - if the underlying texture is genuinely low-resolution or badly tiled to begin with, randomizing the UVs disguises the repetition but doesn't fix the source quality.

Categoryblender

Inputs (9)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
random_seedoptINT00–10000
use_locoptBOOLEANtrue
locoptB_VECTOR2
use_rotoptBOOLEANtrue
rotoptFLOAT0.00-6.283185482025146–6.283185482025146
use_scaleoptBOOLEANtrue
scale_evenoptBOOLEANfalse
scaleoptB_VECTOR2

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ