Specular map not displaying as expected ("whites out" object)
I don't know if I'm not fully understanding specular maps or something, but I can't find much clear documentation on them to help myself out. From Unity's documentation, I assumed a specular map translated to meaning: Black = no specularity, White = full specularity.
I found a specular map for the earth's ocean online which I added to my object material (Standard (Specular setup)). The black does indeed nullify specularity, but the white tints the colour of the object; rather than just offering a transparent shininess effect as I was expecting.
I've probably misunderstood something somewhere along the line. If anyone can offer advice, or point me in the right direction to figure it out myself, I'd be much appreciative!
Answer by Lyfeslap · Jul 28, 2017 at 05:04 PM
It took me forever to figure out exactly how specularity, metalness, and roughness works in Unity, but I finally figured it out. Unity's specular maps work very differently from other programs; in other programs the grayscale of the specular map controls what gets reflection and what doesn't. However, in the Standard Specular Setup the color of the specular maps affects the specular tint, but for non-metal materials there shouldn't be a specular tint. So you have to convert your current specular map into the Unity environment. Here is a very helpful graphic that shows how to setup each kind of specular map: https://docs.unity3d.com/Manual/StandardShaderMaterialCharts.html I prefer to work in the Standard workflow because it works well with both metals and non-metals. The alpha, or transparency, of the texture defines whether it's smooth or not and the red channel defines whether it's a metal or a non-metal. In your case, the land should be completely transparent and the ocean should be completely black. If you wanted to make the land metal, you would make the land opaque and completely red. Objects are usually metal or non-metal and you shouldn't really use the in-between unless there's dirt or rust over the object. I hope this completely explains your issue. Here is what your specular map in the standard workflow should look like.
$$anonymous$$any thanks for your thorough response!
I think I found my way around it in the end, but it was probably a haphazard approach. I'll keep your reply in $$anonymous$$d for future reference, and hopefully it also helps out anyone else who stumbles upon this post. :)
I didn't expect you to even see this answer, I just put it here for people who need help with this in the future. Unity does a pretty poor job of actually saying how the specular aspect of their shaders work, all they give you is a graphic. Some text and examples would be nice along with the graphic.
Wow, thank you for this. This is completely not intuitive.