Nodes/ComfyUI_PHRenderFormerWrapper/RenderFormer Mesh Loader
ComfyUI Node

RenderFormer Mesh Loader

The node that gets your .obj into RenderFormer's world

By paulh4x·Created about a year ago·Updated about a year ago· 37
RenderFormer Mesh Loader
  • material
  • MESH
  • MATERIAL
mesh
mesh_path
normalize_meshtrue
trans_x0.000
trans_y0.000
trans_z0.000
rot_x0.0
rot_y0.0
rot_z0.0
scale1.00
diffuse_rgb204, 204, 204
specular_rgb25, 25, 25
roughness0.70

Before RenderFormer can render anything, it needs a mesh, and the RenderFormerLoadMesh node is the front door for 3D geometry in this pack. It loads a .obj (or whatever trimesh can read), lets you position it, scale it, and slap a PBR material on it, then hands the result to the scene as a MESH. It's one of the 15 nodes in paulh4x/ComfyUI_PHRenderFormerWrapper, the "100% vibecoded" wrapper around Microsoft's RenderFormer (SIGGRAPH 2025).

How it works

The node loads your file with trimesh, builds a transform (translation, rotation, scale) and a material, and bundles all three into a MESH object. Two outputs come out of it:

  • MESH - the mesh + transform + material bundle. This is what you wire forward (to the Scene Builder, or through RandomizeColors/Remesh/Combine first).
  • MATERIAL - the material definition on its own, so you can reuse the same surface on another mesh by connecting it to that node's material input.

The inputs that matter

  • mesh - a dropdown of files in ComfyUI's input/3d folder (the pack creates that folder for you). This is where you drop your .obj files - ComfyUI/input/3d/your_model.obj.
  • mesh_path - an alternative absolute path if the file isn't in input/3d. Handy for one-offs.
  • normalize_mesh - default true. This is a big one: it scales the mesh into a sane unit space so you're not fighting a model that's 10,000 units across. Leave it on unless you know your asset's scale is already correct.
  • trans_x/y/z, rot_x/y/z, scale - the transform, same story as the camera and lighting nodes.
  • diffuse_rgb (default 204, 204, 204), specular_rgb (default 25, 25, 25), roughness (default 0.7) - the core PBR material: base color, specular, and how matte or shiny the surface is (0–1). Color strings are "R, G, B" from 0–255.

One nice touch buried in the code: if you load one of RenderFormer's background files (plane.obj, wall0-2.obj), the node automatically applies the default background transform and skips normalization, so the background geometry lines up with the examples out of the box.

Installing it

# ComfyUI Manager: search "ComfyUI_PHRenderFormerWrapper"
cd ComfyUI/custom_nodes/
git clone https://github.com/paulh4x/ComfyUI_PHRenderFormerWrapper.git
cd ComfyUI_PHRenderFormerWrapper
git clone https://github.com/microsoft/renderformer.git renderformer
pip install -r requirements.txt
python -c "import imageio; imageio.plugins.freeimage.download()"

Restart ComfyUI. Drop your meshes into ComfyUI/input/3d/ and they'll show up in the dropdown.

Common issues

  • "Mesh file not found" - the file isn't in input/3d or the path is wrong. Use the dropdown, not mesh_path, unless you're sure.
  • Mesh appears as a speck or flies off camera - normalize_mesh is off. Turn it on.
  • Polygon budget - RenderFormer is limited to meshes of up to 8192 polygons. If your asset is dense, run it through RenderFormerRemeshMesh (target ~4096 faces) before it hits the sampler. The .glb/.fbx support is on the pack's to-do list, so for now .obj is the reliable format.

It's the node you'll reach for on every single workflow - everything in this pack starts with loading a mesh.

CategoryPHRenderFormer

Inputs (14)

NameTypeDefaultDescription
meshCOMBO0 options:
materialoptMATERIAL
mesh_pathoptSTRING
normalize_meshoptBOOLEANtrue
trans_xoptFLOAT0.000-10–10
trans_yoptFLOAT0.000-10–10
trans_zoptFLOAT0.000-10–10
rot_xoptFLOAT0.0-360–360
rot_yoptFLOAT0.0-360–360
rot_zoptFLOAT0.0-360–360
scaleoptFLOAT1.000.1–10
diffuse_rgboptSTRING204, 204, 204Diffuse color (R, G, B) from 0-255
specular_rgboptSTRING25, 25, 25Specular color (R, G, B) from 0-255
roughnessoptFLOAT0.700–1

Outputs (2)

NameTypeDescription
MESHMESH
MATERIALMATERIAL