🔷 3D to Image (RDAWG+Open3D)
Turn a 3D mesh into a plain image ComfyUI can use
- mesh
- rendered_image
This is the payoff node. Everything upstream - loading, creating, transforming, smoothing - exists so that RDAWG3DMeshToImage can turn your 3D geometry into a regular ComfyUI image, which is where the rest of your graph takes over. Want to use a 3D object as an input to ControlNet, an img2img base, or a background plate? This is the bridge.
It renders the mesh off-screen with Open3D's visualizer and hands you a standard IMAGE tensor - no window pops up, no screenshot hacks. You can preview it, save it, or chain it straight into image-space nodes. The whole "3D to 2D for the diffusion pipeline" trick, without leaving ComfyUI.
How it works
The node spins up an Open3D Visualizer with visible=False, paints the background and mesh with your chosen hex colors, aims a camera at the mesh's center, and captures the framebuffer as a float tensor. The output is [1, H, W, C] IMAGE, so it plugs into anything that expects a standard image.
Two honest caveats from the current code. First, azimuth and elevation are in the schema but don't actually move the camera yet - the view is hardcoded to a front-on shot, with camera_distance as the only real camera control. Rotate the mesh with the Transform node instead; that's how you frame the view today. Second, mesh_color is only applied when it isn't white - so if you leave the default #FFFFFF, your mesh keeps its own vertex colors. That's actually the behavior you want for colored or textured models; set a solid color only when you're rendering a plain white/gray clay-style object.
The inputs that matter
- width / height - 64 to 2048, defaults to 512. Square is safe; go bigger if you're feeding a high-res pipeline.
- background_color - hex string, default
#000000. White or transparent-ish backgrounds help if you're compositing. - mesh_color - hex string, default
#FFFFFF(meaning: use the mesh's own colors). - camera_distance - 0.5 to 10, default 2. Lower = closer crop; the zoom is roughly
1/distance. - elevation / azimuth - present, but currently no-ops in the shipped code. Rotate the mesh upstream instead.
Output: rendered_image (IMAGE).
Install
Part of the RDAWG 3D Pack. ComfyUI Manager (search "RDAWG 3D Pack (CUDA 12.8 + PyTorch 2.9.0)") or manual:
cd ComfyUI/custom_nodes
git clone https://github.com/rdawgemfl/rdawg_3D_pack
cd rdawg_3D_pack
python install.py
Open3D 0.19.0+ is a hard import-time requirement (the pack won't load without it), and matplotlib is used behind the scenes for color parsing, so it needs to be present too. Python 3.11 is the author's recommended setup. As ever, watch the installer's torch pin - don't let it clobber a working PyTorch install.
Where people get burned
- Black image - background defaults to black and a dark mesh on dark background reads as nothing. Set
mesh_colorto a light hex. - Camera won't orbit - you set elevation/azimuth and nothing moved. Not a bug; those are no-ops right now. Transform the mesh instead.
- Textured model comes out solid - you set
mesh_colorto something non-white, which overrides the model's own colors. Leave it at#FFFFFFfor textured meshes. - Choppy result from a huge mesh - 512px default is fine for most, but if you're seeing aliasing on thin geometry, bump the resolution.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh | MESH | — | |
| width | INT | 51264–2048 | — |
| height | INT | 51264–2048 | — |
| background_color | STRING | #000000 | — |
| mesh_color | STRING | #FFFFFF | — |
| camera_distance | FLOAT | 2.00.5–10 | — |
| elevation | FLOAT | 0-90–90 | — |
| azimuth | FLOAT | 0-180–180 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rendered_image | IMAGE | — |