Load OBJ (WepeNerd)
Get a 3D model into ComfyUI without touching Blender
- obj_model
- preview
- preview_mask
ComfyUI is built around flat images and latent tensors, so the moment you want an actual 3D object in a workflow you're on your own. Load OBJ (WepeNerd) is the front door for that: it loads a Wavefront .obj file from disk and hands it to the pack's placement node as a reusable WN_OBJ3D connection. As a bonus it renders a grey clay preview and its mask, so you can check the model looks right before you bother positioning it.
This is a support node, not a headline act - you reach for it because you're about to build a product placement guide and you need the object in the graph. It pairs with 3D Product Placement (WepeNerd), and together they're the pack's small 3D corner.
How it works
Server-side, the node uses trimesh to load the OBJ and normalize it: geometry gets centered on its centroid and scaled so its longest axis fits in a unit box, which is what makes the placement node's scale value predictable instead of an adventure in model-specific units. It then renders a preview with pyrender - a grey, untextured clay material lit by a single directional light - and returns that render plus its alpha as the mask. The frontend also exposes an upload flow: the "choose .obj to upload" button or drag-and-drop saves the file to ComfyUI/input/3d/ and fills the path widget for you.
The inputs that matter
- obj_path - the file path. This is the one you actually interact with; the upload button handles the rest.
- preview_size - the render resolution, 512 by default. Raise it to 1024 if you want a sharper look before committing to a placement.
- preview_scale - the object's size in the preview. If the model looks tiny or exploded, this is the knob.
- rotate_x / rotate_y / rotate_z - preview orientation, degrees. rotate_y defaults to 30 so you don't start at a dead-on flat view.
- light_yaw / light_pitch / light_intensity - the preview lighting, same values the placement node uses.
What comes out
Three outputs. obj_model (type WN_OBJ3D) is the one that matters - it carries the resolved model path and feeds straight into 3D Product Placement. preview is the clay IMAGE render and preview_mask is its MASK, which you can use as a quick look before you build the composite, or pipe into other nodes if you want the raw silhouette.
Installing it
Part of ComfyUI-WepeNerd, so the shared install:
cd ComfyUI/custom_nodes
git clone https://github.com/WepeNerd/ComfyUI-WepeNerd.git
cd ComfyUI-WepeNerd
pip install -r requirements.txt
Or search WepeNerd in ComfyUI Manager. Restart, and it's under WepeNerd/3D.
Common gotchas
This is the node that drags in the heavy 3D stack: requirements.txt pulls trimesh, pyrender, PyOpenGL, and pyglet. On a headless Linux box, pyrender needs a working OpenGL context - the source's own error message suggests EGL or OSMesa when it can't render. v1 only accepts .obj files, so don't drop a .glb or .fbx on it, and the model needs actual faces - a point cloud or an empty mesh will error out with "no renderable geometry." If the preview looks wrong, fix it in the preview inputs before wiring up the placement node, since both share the same normalized model.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| obj_path | STRING | — | |
| preview_size | INT | 512128–2048 | — |
| preview_scale | FLOAT | 3201–2048 | — |
| rotate_x | FLOAT | 0-360–360 | — |
| rotate_y | FLOAT | 30-360–360 | — |
| rotate_z | FLOAT | 0-360–360 | — |
| light_yaw | FLOAT | 45-180–180 | — |
| light_pitch | FLOAT | 45-90–90 | — |
| light_intensity | FLOAT | 3.00–20 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| obj_model | WN_OBJ3D | — |
| preview | IMAGE | — |
| preview_mask | MASK | — |