Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

is there anyway to hide sun and sun reflection in water but keep lighting

Discussion in 'General Graphics' started by melonhead, Sep 14, 2018.

  1. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    i am using aquas water, i have a dark clouds skybox, the skybox hides the sun but there is still the reflection of the sun in the water, i like the lighting as it is and dont want to change it, so is there a way to remove the sun reflection in the water as it looks stupid when there is no sun in the sky to have the reflection.

    thanks for any help in advance
     
  2. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    anybody?
     
  3. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    does nobody have a clue how to remove the sun reflection?
     
  4. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    can anyone help with this, it seems so silly that the sun is hidden by skybox but still reflected in the water
     
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I'm not sure it's possible due to the nature of lighting (you compare normal to the light direction, specular light will automatically have a bright spot that will looked like the light source, aka the sun here).

    A potential solution would be to remove the directional light input from the shader and use a fake custom light skybox for the water (on top of the cloud skybox), but you would need to know how how to modify shader.
     
  6. DeathHillGames

    DeathHillGames

    Joined:
    Mar 4, 2018
    Posts:
    2
    It looks like the Aquas_reflection script has a "Reflect layers" option that's set to "Everything" by default. I would expect you could pick a layer for your directional light ("Sun"), and then uncheck that layer in the "Reflect layers" list.
     
  7. sureshbhandary

    sureshbhandary

    Joined:
    Jan 26, 2017
    Posts:
    1
    select the object on which is casting reflection, tick off specular highlight. The hotspot of sun will not be visible on the mesh
     
    etaysch99 and dezzell like this.
  8. dezzell

    dezzell

    Joined:
    Feb 7, 2015
    Posts:
    32
    Thanks, yes very distracting when you have a mountain, and the sun is reflecting through the mountain or at night on the water. Setting to 0 or turning off specular highlight did the trick.
     

    Attached Files:

  9. unity_pTyVCICth8FYFw

    unity_pTyVCICth8FYFw

    Joined:
    Jun 2, 2022
    Posts:
    2
    Pretty late to the party here but if you're working with a metallic material just turn off Specular Highlights in the material's advanced options