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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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:
    33
    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:
    496
    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:
    33
    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:
    423
    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:
    33
    Ok, I solved it. The second sun was actually a directional light automatically created in the scene, and I missed that.