Nodes/ComfyUI-Paint3D-Nodes/3D_SaveUVMapImage
ComfyUI Node

3D_SaveUVMapImage

Save your finished 2K texture (and keep a backup automatically)

By N3rd00d·Created 2 years ago·Updated 2 years ago· 77
3D_SaveUVMapImage
  • mesh_model
  • uv_map
  • MESHMODEL

Every pass in this pack has been building toward one file: the texture map that actually ships with your mesh. 3D_SaveUVMapImage writes that file. It takes the final UV-space inpaint result and saves it as albedo.png in the Paint3D/ folder next to your obj, and it does the polite thing of renaming the previous version to before_albedo.png first, so you can always roll back to the last good texture.

What it does

Given the mesh and the texture image you feed it, it saves the image straight to disk as the albedo texture (the lightless diffuse map), and updates the mesh's in-memory texture state to match. Because it also refreshes that state, anything downstream - notably 3D_GeneratePreviewVideo, which checks for albedo.png - sees the new texture on its next run.

In the bundled workflow this node sits at the very end, after the final UV inpaint pass gets upscaled: the workflow takes the inpainted UV map, runs it through ImageUpscaleWithModel with a RealESRGAN_x2.pth upscaler to hit 2K, and then 3D_SaveUVMapImage writes the result. So the file you end up with is the 2K upscaled texture, not the raw 512-era map.

Inputs that matter

  • mesh_model - the MESHMODEL (needed so the node knows where your obj lives and which texture state to update).
  • uv_map - the IMAGE texture to save. In the workflow that's the upscaled output of the final inpaint pass, straight from 3D_GenerateInpaintUVMapMask's downstream sampler.

Output

One output: MESHMODEL - the mesh with its texture state synced, so you can chain more nodes after saving if you want.

Installing

The standard pack install - Manager search "ComfyUI-Paint3D-Nodes", or clone into custom_nodes and run:

pip install -r requirements.txt
pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.1.0_cu121.html

Nothing extra is needed for this node specifically; the upscaler (RealESRGAN_x2.pth) that feeds it in the sample workflow is a standard ComfyUI model file.

Gotchas

The before_albedo.png backup is automatic, but only one generation deep - run the save twice and the first backup is gone. If you want to keep earlier states, copy albedo.png out of the Paint3D/ folder yourself. And keep in mind the file lands next to your obj file, not in ComfyUI's output folder - people spend a confused minute looking in the wrong place. It's a simple node, and it's the least likely to surprise you, which after a full texturing run is a small mercy.

CategoryPaint3D

Inputs (2)

NameTypeDefaultDescription
mesh_modelMESHMODEL
uv_mapIMAGE

Outputs (1)

NameTypeDescription
MESHMODELMESHMODEL