Nodes/WAS Node Suite v3/Three Texture From Image
ComfyUI Node Runs on cloud

Three Texture From Image

Turn a ComfyUI image into a material texture

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Three Texture From Image
  • image
  • texture
color_spacesrgb
wrap_sclamp
wrap_tclamp
repeat_x1.00
repeat_y1.00
offset_x0.00
offset_y0.00
flip_ytrue
anisotropy1

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. clamp stretches the edge pixel, repeat tiles. 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. true matches how image files are stored against how UVs are read; false turns 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.

CategoryWAS Suite/Three

Inputs (10)

NameTypeDefaultDescription
imageIMAGEThe picture to use. A batch is read on its first frame alone.
color_spaceCOMBOsrgb'srgb' for a colour map such as albedo; 'linear-srgb' for normal, roughness, metalness or alpha.
wrap_sCOMBOclampWhat happens past the horizontal edge. 'clamp' stretches the edge pixel, 'repeat' tiles.
wrap_tCOMBOclampWhat happens past the vertical edge. 'clamp' stretches the edge pixel, 'repeat' tiles.
repeat_xFLOAT1.00-1024–1024How many times it tiles across. 1.0 fits once, 4.0 tiles four times.
repeat_yFLOAT1.00-1024–1024How many times it tiles down. 1.0 fits once, 4.0 tiles four times.
offset_xFLOAT0.00-1024–1024Slide across, in tiles. 0.5 moves it half a tile sideways.
offset_yFLOAT0.00-1024–1024Slide down, in tiles. 0.5 moves it half a tile vertically.
flip_yBOOLEANtrue`true` matches how image files are stored against how UVs are read; `false` turns it upside down.
anisotropyINT11–64Sharpness at a grazing angle. 1 is off, 16 keeps a floor crisp into the distance.

Outputs (1)

NameTypeDescription
textureTHREE_TEXTUREThe texture, for any map socket on a Three material node.