Gamedev Quick Tools

Channel packer

Build one texture from the red, green, blue and alpha channels of other textures, or reorder the channels of a packed texture. Values are copied exactly when a texture matches the output size, with no gamma or colour changes.

Files

Textures (PNG, JPG, WebP, BMP or TGA), up to 8

No textures loaded

Textures

No textures loaded

Output channels

Preview

Load a texture to start

Export

How the channel packer works

Each channel of the output (red, green, blue and alpha) takes its values from one channel of a loaded texture, from the greyscale luminance of a texture (“Grey” in the Channel list; Rec. 709 weights on the stored values), or from a constant between 0 and 255. Invert flips a channel to 255 minus its value.

  • Load up to 8 textures with Choose textures or drop them onto the tool. Hover over, focus or tap a thumbnail to see its name, size and transparency under the grid; use × or Delete to remove it. Use the arrow keys (Home and End for the ends) to move between thumbnails, and Tab to leave the grid.
  • Undo with Ctrl+Z and redo with Ctrl+Y or Ctrl+Shift+Z, or use the Undo and Redo buttons. They cover loading and removing textures, every channel setting, Swizzle a single texture and the output size. While you type in a field, these keys act on the field instead.
  • Data textures such as masks, roughness and normal maps should be treated as linear.

Pixels with an alpha of 0 keep their colour. If a texture is a different size from the output, it is resampled with bilinear smoothing, which blends neighbouring values. That is fine for colour, but it changes the numbers in data textures, so match sizes where you can.

To rearrange the channels of one texture, load only that texture, turn on Swizzle a single texture and pick where each output channel comes from. For example, invert G to convert a normal map between DirectX and OpenGL. Export as an 8-bit PNG or an uncompressed 32-bit TGA.

Example: a Unity HDRP mask map

Say you have four greyscale maps of the same size: metallic, ambient occlusion, a detail mask and roughness. HDRP’s mask map holds smoothness, not roughness, so the roughness map goes into alpha inverted.

  • Load all four with Choose textures.
  • In R (red), set Source to the metallic map. A greyscale map has the same value in red, green and blue, so Channel R is enough here and in the other rows.
  • In G (green), set Source to the ambient occlusion map.
  • In B (blue), set Source to the detail mask.
  • In A (alpha), set Source to the roughness map and turn on Invert.
  • Check each channel with the Show list (R only to A only), keep Output size on Largest image, and use Download PNG or Download TGA.

The same steps make an ambient occlusion, roughness and metallic texture for a material that expects that order: ambient occlusion in R, roughness in G without Invert, and metallic in B.

Questions

What is channel packing?

Channel packing stores several greyscale maps, such as ambient occlusion, roughness and metallic, in the red, green, blue and alpha channels of one texture. A material then reads one texture instead of several, which saves texture samples and memory.

Which channels does Unity HDRP’s mask map use?

Red holds metallic, green ambient occlusion, blue the detail mask and alpha smoothness.

Are the values copied exactly?

Yes, when a texture is the same size as the output: textures are decoded without premultiplying alpha or converting colour profiles, and the PNG is written without a canvas, so the 8-bit values match the source. If your browser can’t use WebGL, the tool says so, because colour under fully transparent pixels may then be lost.