Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Time of Day - Dynamic Sky Dome

Discussion in 'Assets and Asset Store' started by andererandre, Mar 4, 2013.

  1. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    103
    That gradient lets you set the light color based on where the sun is in the sky; left side is when it's at its zenith (noon), right side is when it's at the horizon (sunrise/sunset).
    So with the default gradient, it should be tinting the ground yellow when the sun is very low on the horizon, and leaving the ground at its texture color when the sun is all the way up.

    You can certainly adjust the gradient, but if you want things to look at least somewhat realistic, you should keep at least some color gradient.

    I don't think there's a way to change that color directly through code (TOD_Sky.LightColor is read-only), but you shouldn't change it directly through code anyways since it's always changing itself as time progresses.
     
  2. DreamerYinYu

    DreamerYinYu

    Joined:
    Apr 14, 2018
    Posts:
    21
    OK,Thank you very much
     
  3. SLGSimon

    SLGSimon

    Joined:
    Jul 23, 2019
    Posts:
    57
    Also note that if your ground texture is from a photograph, it will include the colour of the sunlight at the time of capture - so it would be good to adjust the white balance of your ground textures to remove any colouring from the sun.
     
  4. SLGSimon

    SLGSimon

    Joined:
    Jul 23, 2019
    Posts:
    57
    @andererandre It's my understanding that Rust is working on HDRP, can you give any kind of estimate when TOD will be updated? We want to move to HDRP asap so if it's going to be multiple months then we'll probably just trying porting it ourselves...
     
  5. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    929
    Great looking system, very powerful indeed. The question I have is it possible to have the system generate a Unity skybox from the settings at the start and then apply those light and skybox settings and have the rest of the system turned off. I would love to be able to have the correct time of day lighting and cloud when the player starts my game but I don't need any of the overhead of realtime changes to any of the settings or the extra processing to render the sky dome.
     
  6. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    103
    Looking at the code, it appears that even if you turn off time advancing, all of the Update calls will still happen every frame.

    That said, the full source code is included, so it would be very easy to go to TOD_Sky.cs/LateUpdate() and comment out or if-wrap all of the update calls.

    -Scott
     
  7. SLGSimon

    SLGSimon

    Joined:
    Jul 23, 2019
    Posts:
    57
    I'm trying to update our integration of TOD with global post processing volumes, has anyone tried this?
    I have an "underwater" global volume that I need to blend fog with the day/night fog of TOD. This seems complicated as TOD is driving the global fog directly. Has anyone worked around this?
     
  8. unity_cH5CKv09zTBfWA

    unity_cH5CKv09zTBfWA

    Joined:
    Feb 23, 2020
    Posts:
    3
    Hi,

    I want to implement a milky way that is in sync with sky rotation ? Anybody had implemented this ? Also I have some other questions:

    1 - The sky is very blue and bright near horizon. I want a more black night from zenith to horizon. No matter how I adjust sky and illumination it stays blue and bright. Any hint ?

    2 - I want to create a fixed brightness near horizon simulating the lights of a city far away. Is there any texture that I can edit ?

    Thanks
     
  9. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    44
    Hi!
    0.- Have a look at the object 'space'. It is there for that purpose. It rotates with the sky.
    1.- In the object Sky Dome, the 'Day' and 'Night' sections have some gradients to control that. In the middle of the night with no moon you should have a very dark sky with default values, anyway. Perhaps try to change the hour of the day and see how this works for you, then edit the gradients. On sunset and sunrise night and day gradients mix.
    2. Have a look to the Billboards object, although they might rotate if there is wind. Other than that, no, you just have to do that yourself.

    Cheers!
     
  10. unity_cH5CKv09zTBfWA

    unity_cH5CKv09zTBfWA

    Joined:
    Feb 23, 2020
    Posts:
    3
    Many Thanks Salvador

    Ive played with gradients but never got a near horizon black sky. I'll try it again
     
  11. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,043
    Shame this asset isn't updated anymore. Really would like to use it with URP. :(
     
  12. XyrisKenn

    XyrisKenn

    Joined:
    Dec 8, 2015
    Posts:
    20
    Likewise - it's the only sky system I want to use but now HDRP is out of beta.
     
  13. Mehrdad995

    Mehrdad995

    Joined:
    Jul 17, 2013
    Posts:
    37
    Greetings,
    Thanks for developing such a great asset however there's an issue with the Sunset/Sunrise timing.
    Set blow values for "world" and you can see sunrise triggers at 1 AM whereas it shouldn't be triggered at least until ~6
    Sunset too triggers wrongly at 16 which should happen around 20 as it's visually still very bright and day.
    Apparently it doesn't take UTC into account at all :/

    Latitude: 35.74924
    Longitude: 51.37173
    UTC: 3.5
     
  14. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,043
    I've switched over to Enviro & I find it's far better than this. Check it out guys if you need to make progress in your game.
     
  15. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    103
    Thanks! Can you give some examples of how it's better and what you like about it?
     
    Salvador-Romero likes this.
  16. ikriz

    ikriz

    Joined:
    Dec 3, 2009
    Posts:
    92
    Did you port this eventually, if so is the code public?
     
  17. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    92
    Hi- I am thinking of getting Time Of Day, but I needed to know:

    Is it possible to add extra satellites/moons?
     
unityunity