Search Unity

Metallic Specular Highlights turns reflected areas dark when light is not reflecting.

Discussion in 'Shaders' started by MintyDog, Dec 20, 2020.

  1. MintyDog

    MintyDog

    Joined:
    Dec 13, 2020
    Posts:
    3
    Okay I'm extremely new to this and I wanted to put a specular highlight on my fur texture so individual strands of fur highlight with the sun. I haven't found a way to do this under standard specular shader because it just resulted in painting white on my model rather than designating points of reflection. So I used metallic with my black and white map, but when I paint in areas I want to reflect light, those areas conversely turn black when the sun is not reflecting on them. Like this....

    For demonstrative purposes I painted in white strokes to indicate fur
    upload_2020-12-20_8-51-23.png
    upload_2020-12-20_8-51-58.png

    Considering that I don't know what I'm doing, can you tell me how I can create these specular reflections without dealing with the inverse darkening? It makes it impossible to paint reflective strands on the white of the fur without also turning it dark. I've had no luck with normal maps or height maps either, they just appear broken.

    Here you can see applying a black and white map to the specular section results in highlights becoming silver.
     
    Last edited: Dec 20, 2020
  2. AlexTorbin

    AlexTorbin

    Joined:
    Dec 12, 2019
    Posts:
    48
    I think this is due to energy conservation in PBR. Non-metals diffuse 96% of incoming light, and reflect only 4% (hardcoded in metal workflow). That's why they look "normal" from every direction. But metallic surfaces reflect incoming light in certain direction, so from other directions they look dark. You can play with roughness/smoothness slider to change the proportion of reflection/diffusion. But you can't get full diffuse + specular highlights, because the surface can't return more light than it received (energy conservation).

    I'm also learning, so could be wrong. But I think metallic stripes will stick out anyway, no matter what you do. So you probably have to make the whole character metallic, or use a custom non-PBR shader to achieve the effect you want.

    Metallic and specular workflows require different setup of albedo map. If I remember correctly metals are black in metallic albedo, and white in specular. Probably in alpha channel information is also encoded in different ways. I don't remember the details, but you can google it.
     
    Last edited: Dec 20, 2020
    MintyDog likes this.
  3. MintyDog

    MintyDog

    Joined:
    Dec 13, 2020
    Posts:
    3

    So I went back to specular, tell me if I'm wrong, but I think my issue was that I was using a texture that was too bright. I've the highlights down to a dark gray and cranked the smoothness slider up and achieved this result.

    upload_2020-12-20_10-12-38.png
     
  4. AlexTorbin

    AlexTorbin

    Joined:
    Dec 12, 2019
    Posts:
    48
    Its hard to tell, I don't know what you're aiming for. To me it looks more like a lacquered wood than fur, but if that's what you wanted to achieve, then fine!

    Anyway, I told you all I knew, so read about specular setup and experiment..

    PS Another little advice is to make values on your texture go from 0 (black) to 1 (white). So you can get the full range of effect using only a slider.
     
    Last edited: Dec 20, 2020
  5. MintyDog

    MintyDog

    Joined:
    Dec 13, 2020
    Posts:
    3
    I can't paint in anything other than black and a dark gray or it simply colors my character white even in the shadow. What I was pointing out is how I had it reflecting on the fur texture without the white coloration.