Nodes/BrainDead Nodes/BD Face Mesh
ComfyUI Node

BD Face Mesh

A real, textured 3D face straight from a photo

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Face Mesh
  • landmarks_batch
  • image
  • face_mesh
  • wireframe
  • status
frame_index0

For the moments when you don't want a UV bake at all - you just want a 3D face you can look at and move around - BD Face Mesh is the shortcut. It builds the canonical MediaPipe face mesh (468 vertices, 854 triangles) directly from a LANDMARKS_BATCH, and if you wire in the source photo, it colors every vertex by sampling the pixel at its landmark position. Result: a vertex-colored TRIMESH face you can spin in a preview, export, or feed into any other BD mesh node. No fitting, no optimization, no bake - the landmarks are the geometry.

The topology is MediaPipe's fixed canonical face tessellation (the same one you've seen in a thousand web demos), so the vertex count and connectivity never change - only the vertex positions move per face based on detection. Coordinates follow image convention: x = 0→W, y = 0→H (y grows downward), and z is relative depth in image-width units - rough, not metric. So this is a face shell for preview/texture work, not a metrically-accurate scan.

Inputs and outputs

  • landmarks_batch (required) - from BD Face Landmarks.
  • image (optional) - the source photo for vertex colors. Each vertex gets the pixel color at its (x,y) landmark position. Leave disconnected for an untextured mesh.
  • frame_index (0) - which frame of the batch to build; 0 for single-image pipelines.

Outputs: face_mesh (TRIMESH - connects straight to TRELLIS2 and BrainDead mesh/export nodes), wireframe (an image of the topology overlay, handy for checking detection quality), and status.

Installing

Ships in ComfyUI-BrainDead. ComfyUI Manager → search "BrainDead" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt

Restart. Needs trimesh (standard in ComfyUI 3D setups) and cv2/mediapipe for the wireframe overlay.

Where people get burned

Mostly expectations. This is a landmark-positioned shell, so it inherits whatever slop the detection had - extreme angles stretch it, and the z-depth is rough, so don't expect a scannable head. It also only covers the face region, not ears or scalp (that's what BD Face Fit with ict_facekit is for). But for a quick textured face preview, a head-turnaround test, or feeding something that just needs plausible face geometry, it's the fastest path in the pack.

Category🧠BrainDead/FaceWrap

Inputs (3)

NameTypeDefaultDescription
landmarks_batchBD_LANDMARKS_BATCHLANDMARKS_BATCH from BD_FaceLandmarks.
imageoptIMAGESource image for vertex colors. Each vertex gets the pixel color at its (x,y) landmark position. Leave disconnected for no vertex colors.
frame_indexoptINT00–63Which frame in the batch to build the mesh for. 0 for single-image pipelines.

Outputs (3)

NameTypeDescription
face_meshTRIMESH
wireframeIMAGE
statusSTRING