Search Unity

Question How to remove the sun from the physically based sky?

Discussion in 'High Definition Render Pipeline' started by Stephanommg, Sep 26, 2022.

  1. Stephanommg

    Stephanommg

    Joined:
    Aug 18, 2014
    Posts:
    88
    When I add the Visual Environment volume override and set the sky type to physically based sky, a static sun is automatically placed in the sky. Since I want a dynamic sun with directional light, I would like to get rid of this sun. Is it possible to do that?
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I think you will find the position of the sun disc is based on the direction of the directional light. When I change the directional light direction, the sun in the sky moves. (I add a bit of Bloom post processing to soften the edges of the sun.)
     
  3. Stephanommg

    Stephanommg

    Joined:
    Aug 18, 2014
    Posts:
    88
    This is only true for the sun created by the directional light. The post is about the other sun, which is static.
     
  4. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    The PBSky doesn't create any "static" sun. It's only lit by the main directional light. If you disable the directional light in the scene, the sky should go pitch black, as it's a procedural sky.

    We also don't automatically add suns in your Hierarchy when swapping the sky type.

    You should share your setup, it doesn't make much sense at the moment. ;)
     
  5. Stephanommg

    Stephanommg

    Joined:
    Aug 18, 2014
    Posts:
    88
    Ok, I solved it. The second sun was actually a directional light automatically created in the scene, and I missed that.