Home Technical Talk

Unity 5 PBR why use metallic texture?

polycounter lvl 14
Offline / Send Message
Axcel polycounter lvl 14
Hi
I am still adapting to PBR and biting it from different angles. ;)

My today's question is maybe simple. Why use metallic texture to differentiate metal parts from non-metals when I can do this by albedo + spec map.

Why it's better using metalness map instead specular map? Is it better only because it limits possible artist's errors which could be putting too much variation and tinting spec maps?

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    With the metalness workflow, the metallic texture defines where you have 100% reflectivity (metal - white) and 4% reflectivity (non metal - black). The albedo is just defining the color or the reflection, and not the intensity of the reflections. So if you want gold for example, then first you need white in your metallic map, and then gold color in your albedo map. A gold color in your albedo, without 0 in metalness map would act as a gold colored non metal. And a white color in your albedo map with 1 in metalness would give chrome look. Metalness 1 and black albedo would give black metal.

    Its basically an alternative, easier way for mapping specular reflection.

    You can't use the metalness and the specular workflow at the same time, because its almost the same thing (slight mathematical difference). A pbr shader can use metallic OR specular input only at the same time. As far as I know, you need the metalness workflow with unity. Correct me if I'm wrong please.
  • Farfarer
    Options
    Offline / Send Message
    Additionally, the glossiness value is tread from the alpha of the metalness texture.
  • gnoop
    Options
    Offline / Send Message
    gnoop sublime tool
    Axcel wrote: »
    Hi
    I am still adapting to PBR and biting it from different angles. ;)

    My today's question is maybe simple. Why use metallic texture to differentiate metal parts from non-metals when I can do this by albedo + spec map.

    Why it's better using metalness map instead specular map? Is it better only because it limits possible artist's errors which could be putting too much variation and tinting spec maps?


    It's no better in any regards imo. It's just what you say basically. An inflexible approach to do materials not allowing "mistakes". While old way was flexible and allowed to do whatever you want it to be.

    But in fact, if your shader/lighting math have some simplifications or just errors maybe you couldn't anymore do something with it on art level since inflexible system just wouldn't allow you.

    So it's just like everything flexible vs inflexible, every side has its pluses and minuses.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Also, the metalness workflow has a downside. The transition between metal/non metal can look ugly/"pixelated" because of the math it uses to separate metal and non metal reflectivity.But... It is much more user friendly, and yeah, you can't really make mistakes.
  • gnoop
    Options
    Offline / Send Message
    gnoop sublime tool
    Obscura wrote: »
    Also, the metalness workflow has a downside. The transition between metal/non metal can look ugly/"pixelated" because of the math it uses to separate metal and non metal reflectivity.But... It is much more user friendly, and yeah, you can't really make mistakes.

    Turning something real like dust or dirt covered galvanized metall into a nightmare and requiring a lot smaller texel size/ bigger or more repetitive texture.
    Contrast roughness transitions make "halos" too altogether making material less pixel to pixel precise

    I wouldn't call such "cool programmers achievement" especially artist friendly.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    I'd say it's better in the regard of using less memory. It's most surely an optimization as much as a unified and simple workflow to get a "correct" look. Instead of having a full RGB texture to define if its metal and what color. Now you can settle for 1 channel and fetch the metals color from the Albedo instead.

    Also depending on what engine/context newer PBR shading models might come with some internal features which you might not be aware of. Not features that you need to take action for, but niceties. Better fresnel terms, energy conservation, reflection sharpness/roughness, proper gamma handling, etc. Of course, this all depends on what you're coming from and have been used to working with before.
  • Axcel
    Options
    Offline / Send Message
    Axcel polycounter lvl 14
    PBR is so hot topic. :)
    Why do we have PBR only now not a few years ago? Materials are much more complex to compute or what?
  • gnoop
    Options
    Offline / Send Message
    gnoop sublime tool
    My guess it requires more real time calculations while before all the values were taken straight from the textures. Not sure but we probably don't see PBR on cell phones and tablets because of that exact reason.

    Although I don't see reasons why we can't bake shader tree in all necessary texture inputs even with such inflexible approach other than saving one extra texture input that often could be just a single color value.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    PBR need a lot more calculations than a simple phong shading for example. A phong only does dot products between different vectors and multiplies/powering them with thing like diffuse map/specular map/gloss map. Now very basically, pbr need to distort the reflection source (usually cubemaps) properly to the given surface, and also blend between its mips based on a roughness map.It also need to determine the exact amount of incoming light. And I didn't talk about parallax corrections, and picking the proper probe for moving objects yet... Again, this is just a very base of it, but I think this alone need more calculations then a phong. Now imagine this with every material in the scene.So yeah, its because the more complex computations, but now we have enough strong hardware to handle them properly.
  • EarthQuake
    Options
    Offline / Send Message
    This tutorial explains the differences in detail, and how to convert between metalness and spec maps: http://www.marmoset.co/toolbag/learn/pbr-conversion

    General pbr: http://www.marmoset.co/toolbag/learn/pbr-practice

    In short, spec maps are more flexible, but with the added flexibility comes a lot of freedom to make very much physically inaccurate materials, so your artists need to have a very strong understanding of physical material properties. Spec maps also use a little more texture memory.

    Metalness maps are more efficient (use less memory), and more restrictive, but make it harder to make implausible materials, and some say the metalness workflow is easier to pick up and faster to work with. As mentioned above, they also have more visible artifacts (see the white edge issue in the first link).
Sign In or Register to comment.