Trellis2 - Mesh Postprocess Normals
Trellis meshes with hard lighting seams? This node de-seams them
- trimesh
- trimesh
You've just generated a 3D model with Trellis and it looks great - until you light it. Then you see it: hard, jagged shading seams crawling across the surface, right where you'd expect a smooth curve. That's not a broken texture. It's normals, and this node fixes exactly that.
Trellis is the image-to-3D model that made ComfyUI feel like it does 3D for a living, and its texturing/refinement stages split and duplicate vertices as they unwrap and bake. Duplicated vertices can carry normals pointing in slightly different directions, which renders as those ugly hard lighting seams even though the geometry is smooth. The name "Mesh Postprocess Normals" is the whole job description: it recalculates vertex normals so the lighting matches what the shape actually is.
What it actually does
The mechanism is a normal-clustering pass, and it's cleverer than just "smooth everything." Every vertex position is quantized onto a grid - think of it as snapping coordinates to a coarse ruler - and faces that share a snapped position get grouped together. Within each group, the node clusters face normals by direction: normals within the crease-angle threshold are averaged together into one smoothed direction, while normals that genuinely diverge (a real edge, like the corner of a cube) stay separate. Then each vertex gets the average normal of the cluster it belongs to.
The key phrase in the README is that it does this in "quantized position space." That's what makes it a weld-in-spirit, not a weld-in-fact: it doesn't merge any vertices, it just decides which vertices would have been welded and treats them as one for normal purposes. Your topology stays untouched, which is fine for rendering and export.
It's also worth knowing how small this thing is: one node, one file, one dependency (numpy, which ComfyUI already needs). No model downloads, no GPU demands, no API keys. It runs in milliseconds even on dense meshes.
The inputs that matter
Only two knobs, and the defaults are genuinely good:
trimesh- the mesh coming out of your Trellis texturing/refinement stage, in theTRIMESHtype that Trellis nodes emit. This is not a generic OBJ loader; it expects the Trellis mesh object, so wire it straight from your Trellis workflow.position_epsilon(default1e-5) - the grid size for the quantized clustering. Smaller means vertices have to be closer together to be treated as one; larger welds more aggressively. The range is1e-8to0.01, so you have room to play, but if your mesh's vertices are properly duplicated at identical positions, leave it alone.normal_crease_deg(default55) - the smoothing angle threshold in degrees. Lower keeps hard edges hard (good for low-poly or faceted looks), higher smooths more aggressively. It ranges1to180; 180 is basically "smooth everything."
The single output, trimesh, is a TRIMESH again - same slot, same type, so it drops straight back into whatever you were feeding the mesh into: the preview, the export/save node, or the next stage of your pipeline. It's a drop-in, in and out of the same wire type.
Installing it
Grab it through ComfyUI Manager (search "ComfyUI-TrellisMeshPostprocess") or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Dodzilla/ComfyUI-TrellisMeshPostprocess.git
Restart ComfyUI. That's the entire install - there's no pip install step because the only dependency is numpy, which you already have. The node appears under Trellis2/Mesh as "Trellis2 - Mesh Postprocess Normals."
Where people get burned
The most common mistake is treating it as a fix for texture seams. If your seams show up as color/gradient breaks rather than lighting breaks, this node won't help - that's a UV or texture-bake problem, a separate beast. This only fixes shading.
The other trap is cranking normal_crease_deg up to smooth away an ugly artifact and ending up with a plasticky, over-smoothed look where legitimate detail is gone. Treat the default of 55 as your baseline; only nudge it when you have a specific problem. And because the node never actually merges vertices, your exported mesh still carries the duplication - fine for rendering, but if you're shipping to a game engine, you'll still want a real merge pass downstream.
It's a one-trick node, but it's the right trick for the most common Trellis output complaint. Drop it in after your Trellis refinement stage and your lighting stops lying about the geometry.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| position_epsilon | FLOAT | 0.00001e-8–0.01 | — |
| normal_crease_deg | FLOAT | 55.01–180 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| trimesh | TRIMESH | — |