Three Texture From Image
Turn a ComfyUI image into a material texture
- image
- texture
Every material in the Three family can take textures, but something has to turn an image into a texture first. WASThreeTextureImage is that bridge: it takes a ComfyUI IMAGE - anything from an image loader or, more interestingly, an image generated by the graph itself - and wraps it so a Three Standard Material can read it as albedo, roughness, normals or whatever else. It's the node that lets you texture a 3D surface with pixels ComfyUI just made.
How it works
The image input is any IMAGE tensor. One detail worth knowing up front: if the image is a batch, it's read on its first frame alone - a texture is one picture, so don't expect a video to tile.
The crucial setting is color_space, and getting it wrong is the most common reason a textured object looks flat or washed out. ComfyUI images are sRGB; a shader needs to know what it's sampling:
- srgb - for a color map such as albedo. Default.
- linear-srgb - for data maps: normal, roughness, metalness or alpha. These encode information, not color, and sampling them in the wrong space mangles the values.
A normal map that looks fine on the node but makes the surface shading go haywire is usually a color space problem, not a normal map problem.
The tiling controls
The rest of the inputs are about placement on the surface, and the defaults are the beginner trap:
- wrap_s / wrap_t - what happens past the edge.
clampstretches the edge pixel,repeattiles. If your texture shows one stretched smear, the wrap mode is clamp when you wanted repeat. - repeat_x / repeat_y - how many times it tiles across. 1.0 fits once, 4.0 tiles four times.
- offset_x / offset_y - slides it, in tiles. 0.5 moves it half a tile.
- flip_y - the one to leave alone until something looks upside down.
truematches how image files are stored against how UVs are read;falseturns it upside down. - anisotropy - sharpness at grazing angles. 1 is off; 16 keeps a floor crisp into the distance.
Where it fits
Texture → material socket → Three Mesh, and the natural pairing is a Three Plane Geometry: a poster or texture test card is a plane with this node's output wired into a Standard Material's map. The same node feeds the data maps - wire one instance with color space srgb into map, and another with linear-srgb into normal_map. Remember the channel rules on the receiving material: roughness reads green, metalness blue, AO red, so the image's content has to match the socket, not just the color space.
Install
WASThreeTextureImage ships with WAS Node Suite v3. Install through ComfyUI Manager (search WAS Node Suite v3) or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
Restart after. Requires ComfyUI 0.14.0+ and Python 3.10+. If the node's missing from Add Node, check features.threejs in <ComfyUI user dir>/was-node-suite/config.yaml - that switch gates the Three family and defaults on in current releases.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The picture to use. A batch is read on its first frame alone. | |
| color_space | COMBO | srgb | 'srgb' for a colour map such as albedo; 'linear-srgb' for normal, roughness, metalness or alpha. |
| wrap_s | COMBO | clamp | What happens past the horizontal edge. 'clamp' stretches the edge pixel, 'repeat' tiles. |
| wrap_t | COMBO | clamp | What happens past the vertical edge. 'clamp' stretches the edge pixel, 'repeat' tiles. |
| repeat_x | FLOAT | 1.00-1024–1024 | How many times it tiles across. 1.0 fits once, 4.0 tiles four times. |
| repeat_y | FLOAT | 1.00-1024–1024 | How many times it tiles down. 1.0 fits once, 4.0 tiles four times. |
| offset_x | FLOAT | 0.00-1024–1024 | Slide across, in tiles. 0.5 moves it half a tile sideways. |
| offset_y | FLOAT | 0.00-1024–1024 | Slide down, in tiles. 0.5 moves it half a tile vertically. |
| flip_y | BOOLEAN | true | `true` matches how image files are stored against how UVs are read; `false` turns it upside down. |
| anisotropy | INT | 11–64 | Sharpness at a grazing angle. 1 is off, 16 keeps a floor crisp into the distance. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| texture | THREE_TEXTURE | The texture, for any map socket on a Three material node. |