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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Can't get Standard Shader's metallic input to work

Discussion in 'Unity 5 Pre-order Beta' started by Warrior1424, Jan 23, 2015.

  1. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    So I'm trying to make a shader with the metallic input option on the standard shader (no specular setup), but I can't seem to get it working correctly.
    This is more than likely due to my input texture being incorrect.
    Here is what it looks like:


    Here are the channels for the Metallic input (tga file with alpha)

    Red Channel (Metallic):

    Green:
    Solid Black
    Blue:
    Solid Black
    Alpha (Smoothness):


    Also, I'm in deferred rendering and Directx11, Unity version b18.

    Those are also screencaps of the channels, so if anyone attempts to recreate the texture, it won't work.
    If it helps, I could just post the tga file itself.
    Any help would be greatly appreciated.
     
  2. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    might want to post the textures, including the albedo
     
  3. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    Alright, new problem.
    I made it not so blown-out, but it still seems off.
    It's like as the light falls off, what is shiny inverts

    Here is the same material without the albedo, to more clearly show what I mean (take note of the tiles and the grout):


    I will post the textures in the next reply after this, as I think it uses up too much memory to have both the images and the textures in the same post.
    EDIT: Nope, the Unity forums just want to be stupid and say a 2MB file is too large :)
    Here's a dropbox link instead (sorry)
    I would also post the textures themselves separately, but the forums won't let me upload a .tga file.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,960
    Your metallic texture should be black (it's not supposed to be metal, right?)
     
  5. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    That last picture without the albedo is what I would expect based on the smoothness map you posted. The grout is rough, so the light is duller in the center and then falls off slowly, the tiles are smoother, so the light is brighter in the center then falls off fast.

    That's how roughness works, more or less.
     
  6. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    i have same problem with reflection work. after hit play reflections are completely broke.

    in your case try to create new scene and put your model and material. watch on it in scene editor and then hit play and look hot its just gone. after that you cant get back your reflection, only create new scene work to fix it.

    try that way. if im wrong, then you luky and ill post my problem =)
     
  7. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    ok. i found way out seems. set continious baking to ON for fix problem with metallic. i hope it will work.
     
  8. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    @AcidArrow : I guess I'm not quite used to physical shading yet. I'm so used to making everything have some sort of shine, I simply felt the need for something to be there :)

    @Zomby138 : I did not know exactly how roughness effected light, so thank you!

    @zelmund : The reflections were not the problem, but thanks anyway!

    Thank you all for your help. I changed the red channel to black as well, but it seemed silly to have a tga file just for the alpha, when I could have a jpg file of the alpha with it set to generate alpha based on grayscale. It's the same size, and gives pretty similar results (and is easier to edit)
     
  9. Harold_83

    Harold_83

    Joined:
    Nov 25, 2014
    Posts:
    44
    I cant get how PBR works in Unity. I am watching tutorials and doing the same thing and there is no change in the material. When I try it in unreal 4 it works. I tried plugging in the spec, nothing. The surface is evenly shinny. I went through every shader option that is spec related and no change.
    I am tried using the metallic input and that does not work. Does Unity PBR method not work yet?
    Im using 5.0 b18 specexample.JPG metalpalte.JPG
     
    Last edited: Feb 4, 2015
  10. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    that black/white map, what is it?
     
  11. Harold_83

    Harold_83

    Joined:
    Nov 25, 2014
    Posts:
    44
    Spec map, there should be a noticeable difference. This is not the original map. This is an extreme example to show that the materials are not working.