Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Metallic Setup standard shader always having some specular value?

Discussion in 'General Graphics' started by gian-reto-alig, Jun 3, 2016.

  1. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I currently have a problem I am fighting with:

    I have some objects that follow the metallic workflow and some who don't... and for the life of me, I cannot get the two to act the same way under changing light conditions (day/night cycle).

    I narrowed the problem down to the metallic setup ones being to "shiny"... basically it looks fine under daylight conditions, save the shadowed areas getting too much GI compared to non-metallic setup objects.

    In nighttime the metallic setup objects look weird... they are just too bright, like reflecting too much ambient light.


    Tried around, in the end I found that if you switch to the specular view in the scene view, you see the specular generated by the metallic channel, but everything nonmetallic will have a grey value assign instead of black. Which could explain why these objects are behaving weird under changing light conditions.

    What am I doing wrong? Why is specular not black when I do not assign a spec map myself (metallic setup), and that part of the texture has metallic value 0 (black), and low smoothness (thus should be really rough)? Is this a limitation of the metallic setup?


    Regards

    Gian-Reto
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,209
    Because the metallic setup is not setting the specular between "0" and "1", it's setting it between approximately sRGB 56, 56, 56 for metallic = 0 and sRGB 250, 250, 250 for metallic = 1. More specifically it's a linear specular value of 0.04 for metallic = 0 and a linear specular color of 0.96 * albedo color for metallic.

    If you look at Unity's material charts you'll see that specular of 56 is right in the middle of their recommended ranges for non-metals.
    http://docs.unity3d.com/Manual/StandardShaderMaterialCharts.html
     
  3. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Thanks for your reply... makes sense now that I read these charts.

    I am not 100% sure these specular values make sense though given how Enlighten is using specular for boosting ambient light.
    I will give the specular setup a try for the additional control it gives me over specular.


    Regards

    Gian-Reto
     
  4. Talavaj

    Talavaj

    Joined:
    Sep 22, 2013
    Posts:
    41
    I personally only ever had success with the PBR specular setup.
    Neither the standard metallic nor the standard terrain shader ever look right.
    As far as I'm aware this was/is because the roughness curve is wrong and it is never actually 0. (and they never bothered to fix that or ever bothered to provide a convenient way to change the curve profile)
    You can clearly see the metalness workflow has unwanted fresnel all over the place no matter how dark you set your maps or ambient light.
    You can turn off the reflection intensity entirely, which will get rid of it, but that also gets rid of the point of using PBR in the first place.

    So, whatever.
     
  5. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    How did you learn about all this computer graphics stuff?
     
  6. Talavaj

    Talavaj

    Joined:
    Sep 22, 2013
    Posts:
    41
    I didn't. I'm an artist not a programmer.
    I only research when the target application refuses to cooperate, which is something that Unity does more often than it doesn't.
     
  7. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    So what was your solution? Using legacy shaders and ignore PBR?