If you download a PBR material and bring it into Unity HDRP, the texture set often will not match the shader slots one-for-one. A typical material gives you separate metallic, roughness, normal, height, and color maps. HDRP's Lit shader expects some of that data combined into a single Mask Map.
For a standard HDRP Lit material, the Mask Map uses red for metallic, green for ambient occlusion, blue for the detail mask, and alpha for smoothness. The part that usually causes trouble is the alpha channel because many PBR texture sets provide roughness instead of smoothness. Roughness has to be inverted before it goes into the Mask Map.
Unity documents this channel layout in its HDRP Mask and Detail Maps reference. Once the channel order is clear, building the texture is straightforward.
What goes in a Unity HDRP Mask Map?
For the standard HDRP Lit shader, the channel order is R = Metallic, G = Ambient Occlusion, B = Detail Mask, A = Smoothness. These are grayscale data channels packed into one RGBA image. HDRP reads each channel for a different material property rather than treating the image as visible color.
That means the packed texture should also be imported as linear data. Unity's own HDRP guidance says to disable sRGB (Color Texture) for the Mask Map because the channel values are used as material data rather than display color. The same principle applies to other packed PBR maps: you want the shader to receive the stored numerical values without an sRGB conversion changing them. Unity's HDRP artist guide describes the same Mask Map layout and linear import requirement.
If your source material only contains metallic and roughness, you can still build a usable Mask Map. The missing channels need sensible constant values rather than random image data. For ambient occlusion, white means unoccluded. For the detail mask, white allows the detail layer through across the surface, while black suppresses it. Whether white is the right detail-mask default depends on whether the material actually uses HDRP's detail inputs, so it is worth checking the material before packing a library in bulk.
Convert roughness to smoothness before packing alpha
Most metallic-roughness PBR sets use roughness, while Unity's standard Lit workflows expose smoothness. They describe the same microsurface property in opposite directions.
The conversion is Smoothness = 1 - Roughness. A roughness value of 0.8 becomes a smoothness value of 0.2. A polished region with roughness 0.1 becomes smoothness 0.9. If you place the roughness map into the alpha channel without inverting it, matte areas become glossy and polished areas become rough.
We cover the relationship in more detail in our roughness map vs gloss map guide. For the HDRP Mask Map, the practical rule is simpler: invert the roughness image, then put the resulting smoothness data into alpha.
Do the inversion while the map is still treated as data. You can use an image editor, a texture-packing utility, a build script, or your own material pipeline. The exact tool matters less than keeping the values predictable and avoiding color-management operations that were intended for photographs rather than masks.
How to pack the four channels
Start with four grayscale images at the same resolution. Put the metallic map in red, ambient occlusion in green, the detail mask in blue, and the inverted roughness map in alpha. Export the combined image in a format that preserves all four channels, then import it into Unity and disable sRGB on that texture.
A source PBR set may not include ambient occlusion or a detail mask. That does not mean you should substitute a different map just to fill the channel. Height is not the blue channel in a standard HDRP Lit Mask Map. Roughness is not an ambient occlusion map. Leaving a channel at a controlled constant is better than feeding the shader unrelated data.
This is also why copying an Unreal-style ORM texture into HDRP does not work. A common Unreal ORM layout stores occlusion in red, roughness in green, and metallic in blue. HDRP expects a different channel order and smoothness rather than roughness. Our ORM texture guide breaks down the layouts side by side.
Using separate twirl maps in HDRP
twirl currently provides albedo, normal, roughness, metallic, and height as separate PBR maps. That keeps the source material easy to move between Blender, Unreal, Unity, and other renderers without baking one engine's packing convention into the download.
For HDRP, use the albedo as Base Color and import the normal map as a normal texture. The metallic map becomes the red channel of the Mask Map. Invert the roughness map to create smoothness for the alpha channel. If your project needs ambient occlusion or a custom detail mask, those channels have to come from the asset or another step in your pipeline because twirl does not currently export a ready-made HDRP Mask Map.
The twirl Unity material page covers the broader Unity setup, while the AI PBR material generator is useful when you need a new surface and want the underlying maps kept separate before engine-specific packing.
Do not put the height map in the blue channel for a Lit material
One source of confusion is that Unity uses more than one packed-texture convention under the name Mask Map. For a regular HDRP Lit material, the blue channel is the Detail Mask. It is not height.
Terrain is different. In current Unity documentation for Terrain Layers, the HDRP and URP TerrainLit shader uses red for metallic, green for ambient occlusion, blue for height, and alpha for smoothness. Unity's Terrain Layer documentation explicitly shows that layout.
So a packed texture made for HDRP Lit should not automatically be reused as a Terrain Layer Mask Map. The red, green, and alpha channels line up, but blue has a different meaning. For a Lit material it controls the detail mask. For TerrainLit it carries height used by the terrain material workflow.
This is one of those cases where the shader is the specification. Before packing textures, check what shader will read them rather than relying only on a filename such as mask.png.
Unity 6 URP can also use a packed texture, but check the shader
URP is another reason not to describe one Unity Mask Map layout as universal. In Unity 6, the URP Lit and Complex Lit shaders can use a channel-packed RGBA texture with red = metallic, green = occlusion, blue unused, alpha = smoothness. Unity documents this directly in its URP channel-packed texture guide.
That layout is close to HDRP Lit, but the blue channel does not serve the same purpose. HDRP reserves it for the detail mask, while Unity 6 URP's documented packed Lit texture leaves blue unused. Custom Shader Graph materials can use entirely different arrangements.
If you move a material between URP and HDRP, keep the original separate maps somewhere in the project or source library. Rebuilding an engine-specific packed texture from known channels is much easier than trying to recover the source data from a packed file later.
Import the Mask Map as linear data
After packing the image, select it in Unity's Project window and disable sRGB (Color Texture) in the texture import settings. Unity's documentation for data textures is consistent on this point: smoothness, metallic, occlusion, and similar masks contain numerical shader data, not display color.
If sRGB is left enabled, Unity applies a color-space conversion to the RGB channels. That changes the values before the shader uses them. The result can be subtle enough that the material simply feels wrong rather than obviously broken, especially with roughness and ambient occlusion gradients.
The alpha channel is not transformed by sRGB in the same way as RGB, but the packed texture still needs to be configured as a data texture because metallic and occlusion live in red and green. Treat the whole Mask Map as linear.
Our PBR texture color space guide covers the same distinction across a full material set. Base color is usually sRGB. Metallic, roughness, smoothness, height, occlusion, and other masks are data.
The smoothness slider still affects the result
Adding a Mask Map does not necessarily mean the values in the texture appear untouched in the final material. HDRP exposes controls that can remap or scale material properties, including smoothness. If a packed smoothness channel looks correct in an image editor but the material still looks too glossy or too matte, inspect the material's smoothness settings before editing the source map again.
This is useful when you want several materials to share the same packed texture but need slightly different responses. It can also make debugging confusing because there are now two places influencing the result: the texture data and the material settings.
A good test is to look at the material under lighting with a clear reflection or highlight. Roughness and smoothness are much easier to judge when the environment gives the surface something to reflect. If the response looks inverted, check the roughness-to-smoothness conversion first. If the pattern is correct but the whole surface is uniformly too glossy or too dull, check the material's smoothness remapping or multiplier.
Normal and height maps stay separate from the standard Lit Mask Map
The normal map should remain a separate texture and be imported using Unity's normal-map texture type. It does not belong in the standard HDRP Lit Mask Map. Height is also a separate input for standard Lit materials rather than part of that packed RGBA layout.
Keeping those maps separate matters because they are sampled and interpreted differently. A tangent-space normal map contains directional vector data across multiple color channels. A height map is a scalar field used by displacement or parallax workflows. Packing either into a channel intended for metallic, occlusion, detail masking, or smoothness would change the meaning of the material rather than optimize it.
If you are coming from Blender or a generic PBR download, this is the main conversion to keep in mind: the underlying surface information is still usable, but Unity's shader decides how that information has to be arranged.
A reliable HDRP packing workflow
For a regular HDRP Lit material, keep the original PBR files as your source, create smoothness by inverting roughness, pack metallic into red, ambient occlusion into green, detail mask into blue, and smoothness into alpha, then import the result with sRGB disabled. Keep normal and height as separate textures.
If the material is for TerrainLit, do not reuse that blue channel without checking it because Terrain expects height there. If the project is URP, check the shader and Unity version because its packed layout is similar but not identical. If you are using Shader Graph, the graph itself can define a completely different contract.
That extra attention to the target shader is more useful than memorizing one channel order for every Unity project. The maps describe the same physical surface, but the packing format belongs to the renderer that consumes them.