Nodes/ComfyUI-ComfyUI-Hunyuan3DWrapper/Hy3D Nvdiffrast Renderer
ComfyUI Node

Hy3D Nvdiffrast Renderer

A proper GPU turntable render of your finished mesh — the 'show it off' node

By kijai·Created 2 years ago·Updated 5 months ago· 1,033
Hy3D Nvdiffrast Renderer
  • trimesh
  • image
  • mask
render_type
width512
height512
ssaa1
num_frames30
camera_distance2.00
yaw0.00
pitch0.00
fov60.00
near0.10
far1000.00
pan_x0.000
pan_y0.000

Once you've gone through the whole Hunyuan3D pipeline - shape, decode, clean, paint, bake - you want to actually look at the thing turning, in color, from every side. Hy3DNvdiffrastRenderer is that node. It uses NVIDIA's nvdiffrast CUDA rasterizer to spin your textured mesh in a virtual orbit over a set number of frames, and hands you a batch of images plus masks. It's the closest thing in the pack to a turntable video generator.

The rest of the pack's renderers are differentiable-rasterizer plumbing tuned for feeding the paint stage. This one is built for showing off: real GPU rasterization, optional super-sampling for clean edges, and a camera that orbits the object.

The settings that matter

  • render_type - textured (default), vertex_colors, normals, or depth. textured needs a mesh with a base-color texture (i.e. one that's been through bake + apply); the others are fallbacks for untextured meshes.
  • num_frames (default 30) - how many frames in the orbit. 30 frames at num_frames yaw sweep = a one-second-ish loop of the object turning.
  • yaw / pitch - start angle (in radians, despite the defaults looking like degrees - 0.0 start, and yaw sweeps a full 360° over the frames).
  • ssaa (default 1) - super-sampling anti-aliasing. 2 or 4 makes edges much cleaner at the cost of render time.
  • width / height (default 512) - frame size.
  • fov (default 60), near / far, camera_distance (default 2.0), pan_x / pan_y - camera geometry. If the object is off-frame, camera_distance is your first knob.

Outputs: image (the orbit frames, IMAGE) and mask (per-frame alpha, MASK). Feed the frames into a video encoder or PreviewImage and you've got your turntable.

What it's for (and isn't)

This is a preview and showcase renderer, not part of the bake chain - don't try to route its output into Hy3DBakeFromMultiview. Its real uses: checking your texture looks right in motion, generating an orbit animation of a finished asset, or rendering normals/depth of a mesh you plan to reuse in a 2D pipeline. It's also the node that assumes the mesh has proper UVs and a base-color texture; a raw untextured mesh will throw "No texture found."

Install - the one with real dependencies

Pack-level clone (Manager search "Hunyuan3DWrapper", or git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper), pip install -r requirements.txt - plus two extras that only this node needs:

pip install nvdiffrast
pip install "git+https://github.com/EasternJournalist/utils3d.git#egg=utils3d"

(These live in the pack's requirements_extras.txt.) nvdiffrast is a compiled CUDA extension - it'll usually install a prebuilt wheel for CUDA 12.x, but if your torch/CUDA is off the beaten path, budget a build. On Windows this node is the one that pushes you into a matching toolchain.

Common issues

  • "nvdiffrast not found" - the extra dep isn't installed; see above.
  • "No texture found" - the mesh has no base-color texture (or it got stripped in conversion). Run it through bake + Hy3DApplyTexture first, or switch render_type to vertex_colors.
  • Orbit is empty / object missing - camera_distance or fov framing is off, or the mesh has a degenerate geometry that rasterizes away. Start with defaults.
CategoryHunyuan3DWrapper

Inputs (14)

NameTypeDefaultDescription
trimeshTRIMESH
render_typeCOMBO4 options: textured, vertex_colors, normals, depth
widthINT51264–4096Width of the rendered image
heightINT51264–4096Height of the rendered image
ssaaINT11–8Super-sampling anti-aliasing
num_framesINT301–1000Number of frames to render
camera_distanceFLOAT2.00-100.1–1000Camera distance from the object
yawFLOAT0.00-90–90Start yaw in radians
pitchFLOAT0.00-180–180Start pitch in radians
fovFLOAT60.001–179Camera field of view in degrees
nearFLOAT0.100.001–1000Camera near clipping plane
farFLOAT1000.001–10000Camera far clipping plane
pan_xFLOAT0.000-1–1Pan in x direction
pan_yFLOAT0.000-1–1Pan in y direction

Outputs (2)

NameTypeDescription
imageIMAGE
maskMASK