Extensions/ComfyUI-TrellisNativeTurntable
ComfyUI Extension

ComfyUI-TrellisNativeTurntable

ComfyUI custom node for rendering seam-free turntables and multiple views from Trellis meshes using native PyTorch rendering.

By Tamerygo·Created 2 months ago·Updated 3 days ago· 4
Tamerygo/ComfyUI-TrellisNativeTurntable
Nodes
On cloudLocal install
Stars4
Updated3 days ago
Readme

ComfyUI Trellis Native Turntable

A ComfyUI custom node for rendering seam-free turntables (and Front/Side/Back views) from Trellis meshes, using the Trellis MeshRenderer directly.

It works as a "stealth" adapter around the Trellis renderer: instead of going through the PBR path (which can hang), it renders only the UV/attribute and normal passes, then does texturing and lighting in native PyTorch. This gives clean, seam-free results.

Important: requires a working Trellis workflow

This is not a standalone node. It expects an already working Trellis workflow that produces a Trellis mesh, which you then feed into this node's trellis_mesh input. Make sure your Trellis pipeline runs correctly on its own first; this node only handles the rendering/turntable step on top of it.

Demo

<!-- Replace demo.gif with your uploaded file name. For an MP4, upload it to the repo (or drag it into a GitHub issue/PR to get a hosted link) and reference that URL here. -->

Turntable demo

Features

  • Front / Side / Back / Turntable render modes
  • Native PyTorch texturing via grid_sample (falls back to vertex colors when no texture/UV is present)
  • Simple ambient + directional lighting with adjustable light direction
  • Seam-free output: the UV pass is rendered without antialiasing (antialiasing raw UV coordinates was the cause of visible texture seams), and edges are cleaned up with supersampling (SSAA) applied to the final image instead
  • seam_fix: on screen-space UV discontinuities, sampling switches from bilinear to nearest so neighboring UV islands / background don't bleed in
  • White / Black / Gray / Transparent background
  • Exports per-frame camera extrinsics/intrinsics as JSON

Requirements

  • ComfyUI
  • A working Trellis workflow that outputs a Trellis mesh to feed into this node
  • A Trellis custom node package installed alongside this one (the node imports MeshRenderer from either trellis2.renderers.mesh_renderer or trellis.renderers.mesh_renderer)
  • A CUDA-capable GPU (the node runs on CUDA)

Installation

Clone this repository into your ComfyUI custom_nodes directory:

cd ComfyUI/custom_nodes
git clone https://github.com/Tamerygo/ComfyUI-TrellisNativeTurntable.git

Then restart ComfyUI. The node appears under 3D/Trellis as Trellis Native Turntable.

Inputs

| Input | Description | |---|---| | trellis_mesh | The Trellis mesh (accepts the mesh object, a list, or a {"mesh": ...} dict) | | render_mode | Front, Side, Back, or Turntable | | resolution | Output resolution (256–1024) | | turntable_frames | Number of frames for turntable mode | | camera_distance / camera_elevation / camera_fov | Camera placement | | ambient_light / directional_light | Lighting intensities | | light_dir_x/y/z | Directional light vector | | bg_color | White, Black, Gray, or Transparent | | ssaa (optional) | Supersampling factor 1 / 2 / 4 (default 2). Higher = cleaner edges, more VRAM/time | | seam_fix (optional) | Nearest-sampling fallback on UV seams (default on) | | texture (optional) | Texture image; if omitted, the mesh's own material/vertex colors are used |

Outputs

| Output | Description | |---|---| | image_batch | All rendered frames as an image batch | | single_image | The first frame | | camera_json | Per-frame camera extrinsics/intrinsics as a JSON string |

Notes

  • ssaa=2 roughly quadruples per-frame render cost (resolution scales quadratically). If you run out of VRAM at 1024, drop ssaa to 1 and keep seam_fix on.
  • If a faint line still remains after these fixes, it's likely missing padding baked into the texture atlas around UV islands; texture dilation before sampling can address it.

License

MIT