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

Setting Standard shader to full metallic makes object black instead of reflective

Discussion in 'General Graphics' started by JosephCc, Mar 21, 2015.

  1. JosephCc

    JosephCc

    Joined:
    Mar 21, 2015
    Posts:
    5
    Having a strange issue as stated in the title. This happens when I import regular maps, or even when tested on a blank shader. Putting the Metallic value all the way to one makes the sphere black instead of metallic.

    Anyone have this issue? Is it a known bug? Am I missing a simple checkbox somewhere? Using Unity 5.0.0f4 on Windows 7 Vista.
     
  2. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Reflection probe is missing (or present, but not baked yet) - that gives black color ("no reflection") for metalness maxed out.
     
    theANMATOR2b likes this.
  3. JosephCc

    JosephCc

    Joined:
    Mar 21, 2015
    Posts:
    5
    Ah thanks, yeah that solved it for the most part, however the Reflection probe seems to be ignoring the roughness map for some reason. It's just reflecting at a straight value. Going to have to see what's going on.
     
    Shuhair_jr likes this.
  4. JosephCc

    JosephCc

    Joined:
    Mar 21, 2015
    Posts:
    5
    Here's the issue I'm currently having. At some angles (being hit by direct light) the reflections are correct. The metal has both rough and smooth properties. However, at other angles the reflection is completely incorrect. Showing full reflection. Have I missed something in my workflow? I'm also getting high reflection on raised areas of my normals (bright white) where I shouldn't.

    See picture below.
     

    Attached Files:

  5. JosephCc

    JosephCc

    Joined:
    Mar 21, 2015
    Posts:
    5
    OK, I might be back to square one but may be closer to seeing what my actual problem is. This project I'm working on has been ported from Unity 4 by someone else. If I start a new scene, create a 3D sphere, create a new material for it and pump up the Metallic, everything works.

    However, if I do the same thing in this current project the sphere turns black. I think the issue is the port. Something wasn't updated when the port was done.

    Update: I noticed the scene was in DX9. I set it to DX11 in the Player Settings menu but it hasn't fixed it. :(
     
    Last edited: Mar 23, 2015
  6. JosephCc

    JosephCc

    Joined:
    Mar 21, 2015
    Posts:
    5
    I'm ending my day completely frustrated with this issue. It seems like objects in my scene are simply not reflecting the skybox. Below I've done the exact same thing in both scenes. The top is a fresh scene, the bottom is our port from Unity 4. As you can see, the object on the bottom is simply not reflecting the skybox at all. We're not using a directional light in our scene (this all takes place inside) but the skybox should still reflect in the metal. Anyone know why it would work in the top scene but not the bottom?
     

    Attached Files:

  7. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    @JosephCc ever find a solution to this? I too ported my project from Unity 4 and have the same problem.
     
  8. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    I actually just figured it out. On imported projects, you have to go into Window -> Lighting and turn on Continuous Baking in "Other Settings".
     
  9. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    Or you can set it to Realtime too, I think.
     
  10. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
  11. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    255
    Having the same problem here guys, i tested everything but nothing :(
     
  12. Max_Bol

    Max_Bol

    Joined:
    May 12, 2014
    Posts:
    168
    While this might not fix the problem for everyone, I did notice one inconsistent problem with how Unity's Global Illumination manage metallic surfaces.

    To put it simple:
    When the ambient source of lightning is too dark and when only affected by baked light, metallic surface will stays black regardless of the baked light values.

    For some reason, baking lights onto a metallic surface won't make its reflection works in Unity and even if the environment around it is highly illuminated through lightmaps, the metallic surfaces will stay black and won't display the linked reflection probe data. Seems that for "static" metallic surface reflection to works, it needs either to be visible to the ambient source (skybox, gradiant or color) when it's set to a value that apply something higher than 0.3 lighting (1 is fully illuminated) value or hit by a real-time lighting source to "force" the metallic reflection to be "displayed".

    This makes interior based scenes with a dark atmosphere really hard to set when it comes to metallic surfaces.
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    Metals don't actually diffusely reflect light all that much, so in Unity they mostly rely on reflection probes.

    If you have no reflection probe set up, the material will show as black.

    By default, Unity has a global reflection probe per scene, so that even if you haven't set up any probes manually, you see *something*. To actually create the probe, you need to press "build" in your lighting tab.
     
  14. yogajedi

    yogajedi

    Joined:
    Aug 6, 2020
    Posts:
    2
    Not sure if anyone is still having this issue. I am using Unity 2020.1f1. White looks grey, turning up metallic and smoothness on white makes it look black. I tried looking for the recommended "baking" settings but could not find them in this version of Unity. However, just from BEING in the settings (without changing anything) and then exiting, the problem is now fixed. Possibly a bug?
     
  15. VisitPaul

    VisitPaul

    Joined:
    Apr 8, 2021
    Posts:
    4
    I'm having this issue too. I'm using version 2020.3 Everything in scene mode looks great including all my metalic pipes (Building a virtual flour mill so there are lots of pipes) as soon as I go to play mode anything metalic is black. then when I build and run the project, the GI is reduced and anything with a high levely of metalic is dark. Not totally black as in play mode. The two uploaded images are scene mode where the grey metalic pipes are normal and the other is in play mode where the metalic pipes are black. I thought generating the lighting would match scene mode to play mode and therefore when you build and run all colours and textures would also match the scene mode. I'd really appreciate any advice. I'm new to unity so I'm probably doing lots wrong but need some help to get me on track again. Thanks everyone. Play_Mode_Eample.png Scene_Mode_Example.png
     
  16. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Your reflection probe needs to cover the area want reflections in, and be baked.
     
    DreamersHQ and VisitPaul like this.
  17. VisitPaul

    VisitPaul

    Joined:
    Apr 8, 2021
    Posts:
    4
    Thank you. I will give that a go. Much appreciated.
     
  18. VisitPaul

    VisitPaul

    Joined:
    Apr 8, 2021
    Posts:
    4
    Thank you for your help and suggestion. I have put a single reflection probe in and that has worked for making the metalic surfaces look metalic again. However most other textures and models have gone very dark and part of the ceiling has gone ultra bright. This is now in both Play and Scene and Game modes. One more thing I have noticed is that some models above this ceiling have got overlapping UV's will this make a difference? Is the there something else I'm missing? Any help would really save me. Thank you
    Screen Shot 2021-06-02 at 14.59.07.png
     
  19. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The next step is to adjust the cubemap's HDR value, it may be injecting too much brightness for your given (or lack of) tone mapping and other settings.

    Typically a PBR scene requires all of the following:
    • correct pbr materials with the correct packing of channels including inverted rough/smooth etc
    • reflection probes
    • lights
    • exposure
    • tone mapping
    If you don't use exposure and tone mapping then how bright things are will be all over the place, and break constantly, causing most beginners to tweak their way out of it and make bad assumptions, teaching themselves the wrong things. This happens all the time on these forums.

    Instead it's best to ensure you have both tone mapping and exposure in your scene, these will create a sensible visual range for your lighting to operate in. If those are present and cubemaps are present then:

    1. tweak exposure
    2. tweak cubemap brightness (usually on the material for it if skybox, or on the probe itself)
    3. tweak lights

    If the cubemap is rendered by unity's reflection probes and not an imported cubemap you probably don't need to mess with it's brightness.

    Finally, ensure for the sake of testing at least, that Unity's lightprobes are set to realtime because of several versions of Unity having bugs that force you to refresh them in some manner. That's Unity's fault, not yours. When you are satisfied you can tell it to bake on play or other optimised scheme.
     
    VisitPaul likes this.
  20. VisitPaul

    VisitPaul

    Joined:
    Apr 8, 2021
    Posts:
    4
    Thank you. I really appreciate your help and comments. That feels like a lot to get my head round but I'll certainly try as you suggested. I'll just add that for ages what I was seeing in Scene mode was just the same in game and play mode. So, obviously I have done something to make it all appear differently. I don't understand why Scene mode is good then Play mode is way off? I will follow your advice, need to get the manual out and learn about exposure and tone mapping, don't know what that is. Thanks again.
     
  21. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    i cant even bake probes at all, and there are no answers anywhere on this.