Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Why does my Terrain look glossy and has sun reflection?

Discussion in 'World Building' started by pagan_poetry, May 26, 2020.

  1. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    102
    My terrain reflects sun and looks glossy. Metallic and smoothness of terrain layers set at 0.

    It looks unrealistic while my grass and ground is glossy. How to fix it?

    p.s. Unity 2019.2
     

    Attached Files:

    Last edited: May 26, 2020
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    943
    You can try importing the textures with black alpha.
     
  3. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    102
    I've found the temporary solution. In the Import Settings of the texture I set "Alpha Source - None".
    So, thank you for your idea to look into the import settings.

    But I don't get it what you mean by "importing the textures with black alpha." ? black alpha? do not see such option.

    Btw any ideas why does it happen?
     
  4. sandstedt

    sandstedt

    Joined:
    May 24, 2015
    Posts:
    67
    The alpha layer is basically just a greyscale texture. So depending on the shader your landscape is using, it could use the alpha channel to adjust different parameters in the shader. Ex smoothness / glossiness. So in your case, the alpha is probably set to a value that when it's 100% opaque, or 1 on a scale 0 - 1, or white in the scale black to white (think opacity 100% in Photoshop), then the shader will apply 1 to the smoothness, i.e. make it super shiny.

    If you instead set the alpha channel to 0% opaque, i.e. black, then it will be 0 in smoothness. When you remove the alpha channel completely in the import settings, then the shader understands that there is not 4th value to read, and probably reveals a smoothness slider between 0 and 1 instead.

    So what you could do here is:
    1. Export your texture without the alpha channel (ex png without transparency)
    2. Set your transparency to 0 (or black) in your graphics programs channels view (In Photoshop you find this under Windows > Channels)
    3. Remove the alpha channel in the export settings, like you did.
    Using solution number 2 leaves you with some unnecessary texture data to store in the memory, but you could also use it creatively to ex paint reflective water puddles, or glossy wood surfaces and rocks.

    (Hope this makes sense. And I'm just guessing based on my limited shader knowledge, haven't looked in to the Unity terrain shader specifically.)
     
    Samnolent likes this.
  5. restush96

    restush96

    Joined:
    May 28, 2019
    Posts:
    130
    For me it was on Lightning Setting reduce intensity Multiplier upload_2023-1-17_14-25-19.png
     
    heartingNinja likes this.
  6. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    I reduced the Intensity Multiplier to zero and it worked... for the skybox.
    The reflection of the sun is still there, very powerful.

    I'm wondering who and why would need anything like this?
    Terrains are in 99.99% of cases non reflective, or they reflect very very little.
    It's so weird that they made this IMPORTANT shader without the option to cut off completely global reflections and cut all the specularity to zero. Very very very strange choice.
     
    pagan_poetry likes this.
  7. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,703
    Just shut off the alpha in import settings, and dont use streaming mipmap support on terrain textures, and your good :)
     
    PolyMad likes this.
  8. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    That finally worked, thank you!