Unity Mask Maps Explained: How to Pack Metallic, AO and Smoothness

A Unity mask map is four grayscale textures stored in one file. Once you know which map goes in which channel, making one takes a minute.

Updated

Why engines pack channels

Metallic, ambient occlusion and smoothness each hold one value per pixel. So each needs only one channel. Saving them as three full RGB textures uses three times the memory. The shader also has to read three textures instead of one. Packing them into the red, green, blue and alpha channels of one texture is a free speed boost. That is why every modern engine expects it.

The HDRP mask map layout

  • Red: metallic. 0 is not metal, 255 is metal. Leave it at 0 for materials with no metal.
  • Green: ambient occlusion, the soft shadow in cracks and corners. 255 means no occlusion, so use 255 when you have no AO map.
  • Blue: detail mask. It controls where the detail map shows. Use 255 if you do not use detail maps.
  • Alpha: smoothness. 0 is rough, 255 is smooth as a mirror.

URP and the built-in pipeline are different

The URP Lit shader and the built-in Standard shader do not use a mask map. Their Metallic Map reads metallic from the red channel and smoothness from the alpha channel. It ignores green and blue. Ambient occlusion goes in a separate Occlusion Map slot, which reads the green channel.

So an HDRP mask map also works as a URP metallic map and a URP occlusion map at once. Just put the same texture in both slots.

Roughness is not smoothness

Substance Painter, Quixel, Blender and most texture libraries export roughness. Unity wants smoothness, which is the same data flipped: smoothness = 1 − roughness. Put a roughness map straight into the alpha channel, and shiny areas turn dull while dull areas turn shiny. Invert it while you pack.

Unreal, Godot and glTF use ORM instead

Outside Unity, the common layout is ORM: occlusion in red, roughness in green, metallic in blue. glTF defines it that way. Godot has an ORMMaterial3D built around it. It is also the usual setup for Unreal Engine materials. Note that ORM keeps roughness as roughness, so nothing is flipped.

Import settings that matter

  • Turn off sRGB. These channels hold data, not colour, and sRGB changes every value. In Unity, untick sRGB (Color Texture).
  • Keep the alpha channel. Some exporters and image editors drop alpha or premultiply it. That ruins the smoothness channel or the colours under it.
  • Do not judge the file in an image viewer. With smoothness in alpha, it looks partly see-through. That is correct.

The matching normal map

A packed mask map covers everything except which way the surface faces. If the material has no normal map yet, you can make one from its height map or its albedo (base colour). Unity expects the OpenGL (Y+) style.

Tools for this guide

All tools →

More guides

All guides →