Nodes/ComfyUI MotionDiff/Render SMPL Mesh
ComfyUI Node

Render SMPL Mesh

Rendering SMPL to Image, Depth, Mask

By Fannovel16·Created 3 years ago·Updated 2 years ago· 212
Render SMPL Mesh
  • smpl
  • IMAGE
  • DEPTH_MAP
  • MASK
draw_platformfalse
depth_onlyfalse
yfov0.60
move_x0.00
move_y-0.10
move_z0.00
rotate_x0.0
rotate_y0.0
rotate_z0.0
background_hex_color#000000
frame_width512
frame_height512
normalsfalse

This is the payoff node of the whole text-to-motion pipeline. Render SMPL Mesh takes a fitted SMPL body and renders it into actual images - a shaded color IMAGE, a DEPTH_MAP, and a MASK - one frame for every frame of the motion. It's how a generated dance becomes depth maps or silhouettes you can feed into a ControlNet to drive an image or video model. The "Pony SDXL MotionDiff Txt2Vid" style workflows people share are built exactly on this: text → motion → SMPL → depth maps → SDXL depth ControlNet.

You get full camera control here, which is the single-subject node's advantage over the multi-subject renderer: you're not locked into an estimated camera. Frame size is yours too, so you can render directly at your downstream model's resolution.

How it works

The SMPL pose parameters are converted to a mesh per frame, then drawn with pyrender. Alongside the shaded render it produces a depth map (normalized and inverted into the near-is-bright convention ControlNet expects) and a mask that separates body from background. The camera is a standard perspective rig controlled by yfov plus move/rotate offsets.

The inputs that matter

  • smpl - the body, from Smplify Motion Data or SMPL Loader.
  • yfov (0.6) - vertical field of view in radians, "kinda the inverse of zoom": larger value = wider view = subject smaller. This is the one people fumble because they assume degrees.
  • frame_width / frame_height (512/512) - output resolution; render at the size your ControlNet actually wants.
  • move_x/y/z, rotate_x/y/z - camera rig. Default move_y is -0.1, a small nudge down.
  • depth_only - skip color, just depth.
  • draw_platform - draw a ground plane for depth continuity.
  • background_hex_color - background color (default black).
  • normals - optional normal-map pass.

Outputs: IMAGE, DEPTH_MAP, MASK.

Installation

Part of Fannovel16/ComfyUI-MotionDiff. Install via ComfyUI Manager (search "ComfyUI MotionDiff") or clone into ComfyUI/custom_nodes, install requirements, restart. Rendering needs OpenGL bindings - on Linux, sudo apt-get install libglfw3-dev libgles2-mesa-dev freeglut3-dev is effectively mandatory before any render node will run.

Gotchas

The depth map comes out dark, and dark depth plus PNG storage bands badly - a known complaint from the earliest users, who wanted a gain knob to brighten it 4–5x. Brighten before saving if you're persisting it.

The author's own community note remains the most quoted gotcha: depth maps from SMPL renders can cause ControlNet to produce "half-naked women" - his theory is the model learned that pattern from the depth maps in its training data. Not your graph's fault, but worth knowing when a depth-conditioned generation surprises you. And remember yfov is radians; if your dancer looks microscopic or like a close-up torso, that's the dial to fix it.

CategoryMotionDiff/smpl

Inputs (14)

NameTypeDefaultDescription
smplSMPL
draw_platformBOOLEANfalse
depth_onlyBOOLEANfalse
yfovFLOAT0.600.1–10
move_xFLOAT0.00-500–500
move_yFLOAT-0.10-500–500
move_zFLOAT0.00-500–500
rotate_xFLOAT0.0-180–180
rotate_yFLOAT0.0-180–180
rotate_zFLOAT0.0-180–180
background_hex_colorSTRING#000000
frame_widthINT51264–4096
frame_heightINT51264–4096
normalsoptBOOLEANfalse

Outputs (3)

NameTypeDescription
IMAGEIMAGE
DEPTH_MAPIMAGE
MASKMASK