BD UV Unwrap
Give a machine-generated mesh a UV layout that doesn't look like a crime scene
- mesh
- mesh
- status
If you've ever loaded an image-to-3D result and found the texture smeared across the mesh like melted paint, you've met the "machine-generated UV unwrap" problem. The KB doc for 3D generation calls it out bluntly: the shapes look great and the geometry underneath is junk - and "messed-up UV unwrapping" is the second half of that sentence. This node is the fix that fits inside ComfyUI. BD UV Unwrap takes a TRIMESH and produces a clean UV layout using either the GPU-accelerated xatlas path or Blender's Smart UV Project, so you can actually bake a texture onto the thing without seams going everywhere.
It's the node to run before you texture-bake or export an atlas - part of the BrainDead recipe for turning TRELLIS2/Pixal3D voxel output into something a game engine will accept.
The two engines
blender_smart_uv(default) - Blender's Smart UV Project, the quality option. It respects seams, and withseams_from_sharpon (default), it auto-creates UV seams from sharp edges - which in this pack means color boundaries, so a stylized character's color-coded parts get clean seams instead of cuts through the middle of a face.cumesh_gpu/xatlas_gpu- CuMesh chart clustering plus xatlas packing. Fast, GPU-accelerated, good for game assets where speed matters more than packing perfection.
The shared knobs:
angle_limit(default 66°) - Smart UV's angle limit on Blender; the cone half-angle on the CuMesh side. Lower = more islands.island_margin(default 0.02) - spacing between UV islands. If you see texel bleed at island edges under mipmapping, bump this up.
The CuMesh-only chart controls (chart_refine_iterations, chart_global_iterations, chart_smooth_strength) tune the chart clustering; the timeout (default 300s) caps how long the Blender subprocess is allowed to run.
The Blender gotcha
The blender_smart_uv method runs a real Blender headlessly via subprocess, and it needs a Blender binary to exist. The pack ships one under lib/blender/, and the loader also checks sibling packs (ComfyUI-GeometryPack, ComfyUI-UniRig) and system Blender. If none is found, the node bails. First thing to check when this node errors: is there actually a Blender on disk?
Installation
Pack install as usual:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
Or ComfyUI Manager → search "BrainDead". The xatlas/CuMesh method needs CuMesh (it's part of the pack's mesh tooling; if you get a cumesh import error you're missing that piece), and the Blender method needs the bundled or system Blender described above. No model downloads.
Common issues
- "Blender not found" - the loader searched its known paths and came up empty. Check the bundled
lib/blender/survived the clone, or point it at a system Blender. - Textures still look smeared after baking - bump
island_marginso islands don't bleed into each other, and checkseams_from_sharpis on if your mesh has distinct color regions. A color-coded part mesh without seams is exactly how you get a texture smeared across the wrong island. - Slow unwrap on big meshes - either raise
timeout(the Blender pass is a subprocess and the clock is ticking) or switch toxatlas_gpufor the speed.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh | TRIMESH | — | |
| method | COMBO | blender_smart_uv | UV unwrap algorithm. cumesh_gpu uses CuMesh chart clustering + xatlas packing. |
| seams_from_sharp | BOOLEAN | true | Auto-create UV seams from sharp edges (color boundaries) [Blender only] |
| angle_limit | FLOAT | 661–89 | Smart UV angle limit (Blender) / cone half-angle in degrees (CuMesh) |
| island_margin | FLOAT | 0.020–0.5 | UV island margin |
| chart_refine_iterationsopt | INT | 00–1000 | Chart clustering refinement iterations (CuMesh only). Higher = better charts, slower. |
| chart_global_iterationsopt | INT | 11–10 | Chart clustering global iterations (CuMesh only) |
| chart_smooth_strengthopt | FLOAT | 1.00–5 | Chart boundary smoothing strength (CuMesh only) |
| timeoutopt | INT | 30060–1800 | Maximum processing time in seconds (Blender only) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mesh | TRIMESH | — |
| status | STRING | — |