I’ve been reading the docs on mask maps and I am honestly unsure how to proceed. There is bafflingly little information on them.
Can someone explain the difference, if any, between detail maps and masks? I assume they are different because one is a mask (the map) and the other is a single channel map (the mask?) Blender doesn’t have an option to output either.
I know one of them is comprised of three separate channel images stacked up in photoshop or similar and he other is on a single channel. If they are the same I’m not sure how that would work. If they aren’t, the instructions do a poor job of saying so
The detail maps are just regular textures and normal maps but the tiling is usually set quite high so as to repeat the textures across the whole surface of the model. So you can have a small texture of a snakes’ scales and have it cover the snakes body. But the issue is that you may not want the scales to appear on its head or underside and so that’s where the detail mask comes in. Using the mask texture you can specify where the details appear.
So to make a bumpy sphere but with a smooth area on it - place a detailed normal map (water?) into the ‘Secondary Maps’ normal map and set the tiling to 5. Then set the ‘Detail mask’ texture to the default particle texture (black texture with white light). Apply the material to the default sphere. The sphere should be bumpy but with one side smooth because that’s where all the black pixels of the detail mask are.
That’ll be showing you what Unity does with all the various channels internally when passing them to the shader. The Smoothness has nothing to do with the detail mask. It’s the Smoothness you see in the Material editor just below Metallic.
This may be better documentation for somebody that just wants to create a material with a detail map and detail mask.
No, it would be impossible to store a normal map in a single channel. The normal map will be stored in different texture than the one shown. The detail mask is an 8 bit gray scale texture, which explains how they’re able to store it in a blue channel internally.
But you don’t need to concern yourself with all that. You would create your detail mask in an application like Blender by painting onto your model directly and then importing the 8 bit texture into Unity and selecting it through your material’s ‘detail mask’ property.
This is in HDRP only, though. The OP is also talking about HDRP, apparently, while zulo3d posted a link about the Standard Shader from the Built-in Render Pipeline. They are working quite differently, though, which may lead to confusion. In Built-in, the detail mask has a separate slot, but it uses the alpha channel of whatever texture you put in there, so you can put it in the alpha channel of the detail map itself, which also has a dedicated RGB slot (Detail Albedo), as does the normal map.
In HDRP, however, this is quite different: The detail mask is part of the “Mask Map” which uses each channel for a specific purpose, and the detail mask is the blue channel. The detail map on the other hand combines detail albedo and normal map, and also has a channel for smoothness (in Built-In there is no additional smoothness map for detail). This means that the detail albedo is only one channel and therefore grayscale, so it only affects the brightness of the material, not the color.
By the way, URP works similar to Built-in, however, the tooltip for the Detail “Base Map” says that the alpha “determines surface hue and intensity”, but I’m not sure what that means, exactly.
Okay this is important info that I just can’t find online. Thank you. Is there anything else you can tell me about making one? A set of instructions I can pass to my artist would help.
Yes, I don’t think Zulo read what I was saying very carefully. They have been sending me off at weird tangents.
Thanks for your help. I wish they hadn’t named them so identically. And in the inverse of the other stuff. Like, the thing named map should be in the Mask and the Detail Mask should be the separate filter. Maybe call it the Detail Filter.
Have you tried YouTube? I don’t know any tutorials myself I’m afraid. But Texture Channel Mixer, which I’ve recommended to you in the other thread, has a preset for creating the Mask Map (where you can even use a roughness map which is automatically inverted to smoothness). Just be aware that the detail mask is labelled detail map in this preset. For creating the detail map you would have to make your own preset like this:
I don’t think it’s possible to desaturate a color texture in Texture Channel Mixer to put it into a single channel, so you’d have to do that in advance and then use only one of the channels as input.
Yeah sorry about that. I had no idea that they had changed how the detail mask is set in materials when using HDRP. I’ve always used the built-in pipeline.