Nodes/ComfyUI-Texture-Simple/Texture Viewer Pro
ComfyUI Node

Texture Viewer Pro

See your PBR maps lit on a 3D mesh without leaving ComfyUI

By gokayfem·Created 2 years ago·Updated 24 days ago· 57
Texture Viewer Pro
  • color_map
  • displacement_map
  • normal_map
  • ao_map
  • metalness_map
  • roughness_map
  • alpha_map
  • passthrough

A normal map, roughness map, or displacement map is meaningless as a flat PNG. It only means something once it's lit on geometry - and the classic workflow for checking that was generate → save → open in Blender or Substance Painter → hate it → regenerate. TextureViewer closes that loop inside ComfyUI. You wire your generated texture maps into it and the node renders them live on a 3D mesh right in the browser, lit, rotatable, and tweakable. It's the payoff node at the end of the ComfyUI-Texture-Simple pack: the toolkit of offline PBR nodes (normal-from-height, channel packing, tiling, analysis) all exists to feed this thing.

The pack's README points at two ways to get the maps: the Jags SDXL workflow (SDXL + XY tiling for seamless textures) and comfy_mtb's seamless texture example. That's the intended shape of things: generate in the graph, preview on a sphere or plane, iterate until it reads right, then export.

How it works

The node is pure bookkeeping on the Python side and a three.js viewer on the browser side. On each queue, process_images takes whichever of its IMAGE inputs are connected, converts each tensor to a PIL image, and saves it into Comfy's temp directory as a PNG (color, normal, roughness, etc. are saved as 8-bit; displacement is saved as 16-bit, which matters for the Displacement slider). The results come back through a ui dict, and the bundled browser extension (threeVisualizer) fetches those temp files and applies them to a THREE.MeshPhysicalMaterial on built-in primitives - or a GLB/OBJ you load yourself via the Load GLB/OBJ button.

There's no model, no GPU work, and no network call in the viewer itself. The entire dependency story is numpy and Pillow - both of which ComfyUI already ships. That makes it one of the rare custom nodes you never have to fight to install. (v3 is published on the Comfy Registry, so Manager handles it cleanly.)

The inputs that matter

All seven inputs are optional, so you can preview a single map to sanity-check it. Hook them up in pairs and it gets interesting:

  • color_map - the albedo/base color. The one you almost always feed first.
  • normal_map - what makes the surface read as 3D instead of flat.
  • roughness_map and metalness_map - together with color, these are what make it look like a real PBR material rather than plastic.
  • displacement_map - saved as 16-bit so the Displacement slider has real range.
  • ao_map - darkens crevices; subtle, but sells the material.
  • alpha_map - makes the material transparent (double-sided by default since v2).

Inputs must match batch counts, or be a single image broadcast across the batch. Feed it a batch and a dropdown appears so you can flip through frames.

The output

It's an output node, so it's the end of a path - nothing wires out of it except its passthrough IMAGE output, which returns the first connected input batch (or a 1×1 black tensor if nothing's connected). That passthrough is batch-safe and handy when you want the preview in the middle of a chain without breaking the flow. The real output is what you see: the viewer has roughness/metalness/displacement/normal/AO sliders, repeat and wireframe toggles, tone mapping, a PNG screenshot button, and GLB/OBJ export - so you can go straight from "looks good" to a mesh with the material baked on.

Install

ComfyUI Manager → search "ComfyUI-Texture-Simple" → Install, then restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI-Texture-Simple.git

No model downloads, no heavy dependencies - restart ComfyUI and the node is under its 3D/visualization category (it displays as "Texture Viewer Pro").

Where people get burned

The README's own tips are the ones that matter. If the scene looks stale, unconnect a texture, queue, reconnect it, queue again - that's the reset dance. And if you see a black screen, clear your browser cache: the three.js assets cache hard, and the viewer is only as healthy as the WebGL context in your browser. Running ComfyUI inside a locked-down iframe can break the viewer too - open it in its own tab. None of it is hard to recover from, and that's about the whole list, which is rare for a custom node.

Categoryvisualization/3D

Inputs (7)

NameTypeDefaultDescription
color_mapoptIMAGE
displacement_mapoptIMAGE
normal_mapoptIMAGE
ao_mapoptIMAGE
metalness_mapoptIMAGE
roughness_mapoptIMAGE
alpha_mapoptIMAGE

Outputs (1)

NameTypeDescription
passthroughIMAGE