HDRP, Lit Shader Mask Map, how to create this mask?

Hi, how i can to create a mask map?
I know, that Mask map is:

  • Red channel: Metallic mask. 0 = not metallic, 1 = metallic.

  • Green channel: Ambient occlusion.

  • Blue channel: Detail map mask.

  • Alpha channel: Smoothness.

but how can i do it without photoshop?

2 Likes

You can use this tool to pack the different channels in unity - Created by Andydbc

21 Likes

Thanks you so much!

Very nice, thanks for that!

But anything official from Unity?

No, and there won’t be unless Unity decides to allocate time. Instead you will pack them using substance, or art package or utility as above OR just use shader graph to route the channels of interest.

I recall Unity talking about various options for this but I don’t think anything concrete came of it.

1 Like

Thanks

Just a word of caution, I briefly tried that tool some time ago and it for some reason did not pack anything in alpha channel.

Alloy (now free) also has channel packing tool but haven’t really tested how it works.

excuse me, I downloded this tool but… where I have to put to open in Unity?

1 Like

https://github.com/andydbc/unity-texture-packer/tree/master/Assets place these inside your assets folder.

I’m sorry, I’m new to Unity. I put those things in the Asset folder but how do I open it?

Look in the menus I guess. I don’t use it, but mostly this stuff works like that. Just explore.

Excuse me, can I ask you how I can do to open it in Unity?

I found it!! Is in Windows> Channel Packer.

1 Like

In posted .gif is not visible which map is used in each channel selection. Can someone please explain the procedure of creating a mask map?

1 Like

realy cool thank’s

https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@6.7/manual/Upgrading-To-HDRP.html

I think that the best way to create a .png smart mask is by using Substance Painter. (If you purchase now is perpetual. Later will be only subscription)

Hello guys,
I noticed this thread is some months old but I used gimp for that and it works pretty convenient. Just wanted to share it here.
I used it for terrain layer mask map (Unity - Manual: Terrain Layers) with RGBA beeing metallic, AO, height and smoothness (in that order).
If you have all your grayscale layers open in gimp, you have to do Image->Mode->Grayscale, otherwise the composition wont work. Then go to Colors->Components->Compose and select the right layer for each channel. Thats it!
In my case I had a roughness map instead of smoothness so I simply inverted the grayscale layer.

3 Likes

Note: with mask maps you’ll want to import them with sRGB unticked or will get incorrect rendering. And don’t forget that .a is never imported as sRGB, it’s not corrected (in case packing say, smoothness into albedo .a), so you can rely on alpha being imported as linear.

2 Likes

Command line tool GitHub - vbodurov/rgba-merger: Command line tool to merge Red Green Blue Alpha channel into a single image

is anything changed in 2022?) Or do we still have to pack mask map without official tools?