Search Unity

Question Baking light with a metallic material does not receive shadows.

Discussion in 'Global Illumination' started by vitorfgd, May 3, 2023.

  1. vitorfgd

    vitorfgd

    Joined:
    Nov 4, 2014
    Posts:
    27
    Hello everyone, I'm working on a garage scene, In this scene there is a metallic table (Base map + Metallic Map + Normal map). The table is near a window, is static and the directional light is set to baked and is also static. There is a reflection probe right above the table.

    The environment reflections are:
    Source: Skybox
    Resolution: 128
    Intensity Multiplier:1
    Bounces:2

    The reflection probe has a shadow distance of 100 and clear flags set to skybox.

    The problem that I'm having is that, when the Metallic Map is using a texture or is set to 1, there is no shadows on the object. (See images below)


    The first image I was able to achieve by removing the metallic map and setting the metallic slider to 0.8. Since I'm working with PBR, there is no 0.8 metallic objects. How can i have shadows on a 100% metallic object that is not a mirror (smoothness is set to 0.7 so it's not completely polished).u.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    You can’t.

    But what kind of metal is this that is green? If it’s metal that is painted green, then the material is the paint so it’s not really metallic.
     
  3. vitorfgd

    vitorfgd

    Joined:
    Nov 4, 2014
    Posts:
    27
    Huum, i never thought of it this way. So you are saying that since the table is painted, instead of pure metal, it would be better to use metallic as 0 and a higher smoothness? If we are talking about a metallic paint, it makes sense to set as something in the middle?

    This is my first time creating something using this kind of materials.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    Especially about the smoothness, depending on the type of paint and the finish it produces any smoothness value is more or less valid.

    Same for the metalness, I bet there are types of paint that behave more like a metal than most paints.

    In the end though, it doesn't matter that much. I know the correct way is to put metalness as either 0 or 1, because either it's metal or it isn't, but... just put values that make things look pleasing to you and you can find justifications for the value you like.

    For example, even an unpainted shiny metal doesn't quite have a metalness of 1 if it has, say, a layer of dust on top.

    In any case, even if you want to stick with correctness, you need to start thinking how something looks instead of what it is.
     
  5. NatesaNathan

    NatesaNathan

    Joined:
    Aug 2, 2022
    Posts:
    2
    Hey! Why is that so? I am going through same, but I wonder why metals behave this way.
     
  6. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    For the same reason a perfectly clear mirror doesn't "catch" shadows. If a material is 100% metallic all the light it outputs comes from specular reflections, not "diffuse" lighting. You'll only see the shadows affect the specular reflections form the direct light, which are not visible at this angle.
     
    NatesaNathan and AcidArrow like this.
  7. NatesaNathan

    NatesaNathan

    Joined:
    Aug 2, 2022
    Posts:
    2
    I understand what you're saying.. would be able to help me with some resources on this topic? I wanna explore this a bit more