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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Time of Day - Dynamic Sky Dome

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

  1. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,741
    what are the official sky solutions provided by unity? As far as I know, there is none.
     
  2. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    683
    From what I understand the Physically Based Sky is intended to be the future. They are also working on Volumetric Clouds and Cloud Layers.
     
  3. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,741
    but that's for high definition, not for mobile which was the main use of these packages
     
  4. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    54
    Thank you, Andre. If you have moved on perhaps this is the best thing to do. Why did Unity asked you to make changes? Did they ask you to support the new render pipelines, perhaps?
     
  5. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    54
    Given that this might be the sunset of this asset, I'd like to publicly thank @PanicEnsues for years of support of his fellow users, including me, in this forum. Your answers were always fast, well informed and detailed. Thank you for disinterested support!
     
  6. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    185
    You're quite welcome, glad I was able to pay forward some of the great Unity Forums help I've received over the years!

    And thanks to @andererandre for making this plugin; it saved me a ton of work on my last game and was quite easy to work with.
     
    Salvador-Romero likes this.
  7. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    185
    Knowing what the actual error is (and the code that caused it) would be kind of essential to helping with any debugging.

    This function will convert a float hour to a 24-hour time string:
    Code (CSharp):
    1.     public static string HoursToTimeString(float hour)
    2.     {
    3.         var ts = System.TimeSpan.FromHours(hour);
    4.         string val = ts.Hours.ToString("00") +
    5.             ":" + ts.Minutes.ToString("00") +
    6.             ":" + ts.Seconds.ToString("00");
    7.         return val;
    8.     }
     
    rusvenlee likes this.
  8. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    54
    Add this script as a component to the UIText object you are using to display hours or minutes:

    Code (CSharp):
    1.     public class CurrentTimeInText : MonoBehaviour
    2.     {
    3.         public enum TimeSection { Hour, Minute};
    4.  
    5.         public TimeSection section; //This is to select if you want the text to show hours or minutes from the editor
    6.         private TOD_Sky TodManager;
    7.         private Text Text;
    8.  
    9.         void Awake()
    10.         {
    11.             var tod = GameObject.FindGameObjectWithTag("TimeOfDay");
    12.             TodManager = tod.GetComponent<TOD_Sky>();
    13.             Text = GetComponent<Text>();
    14.         }
    15.  
    16.         void Update()
    17.         {
    18.             Text.text = section == TimeSection.Hour ? TodManager.Cycle.DateTime.Hour.ToString("00") : TodManager.Cycle.DateTime.Minute.ToString("00");
    19.         }
    20.     }
    TOD example.png

    I use separate UIText objects for hours and minutes so I can layout them easier, but you may not need it.

    You may need to add the tag "TimeOfDay" to the Time of Day object.

    Cheers.
     
    rusvenlee likes this.
  9. zak666

    zak666

    Joined:
    Mar 3, 2014
    Posts:
    40
    Dam its gone, looks really good really wanted to buy this RIP
     
  10. Ukounu

    Ukounu

    Joined:
    Nov 2, 2019
    Posts:
    206
    There is an error in "Atmosphere.shader". The bottom vertex of that sphere has its normal pointing straight up (0, 1, 0), and the shader is not handling that data correctly.

    Easy solutions (either will work):
    1) in Sky.fbx import tab enable mesh compression;
    2) import Sky.fbx into any 3D editing software and slightly move that bottom vertex so as to change its normal;

    Or you can edit Atmosphere.shader and fix the error, of course.

    Just leaving this here in case somebody else will be googling for this fix a few years later.
     
  11. alvaro95bs

    alvaro95bs

    Joined:
    Oct 3, 2018
    Posts:
    1
    Hi, how can I download? its from Unity 2018, thanks!
     
  12. hermitmode

    hermitmode

    Joined:
    Sep 15, 2020
    Posts:
    43
    Hey. I understand that this asset is a decade old, that the creator has deprecated it because he does not have the time to support it, that other solutions exist and that those that have been helping in this thread have even abandoned it, with the last response going unanswered for months.

    I would still like to take a shot with this question: Using built in renderer, forward rendering path and the CREST WATER system, the "Camera Atmospheric Scattering" is not taking into account the ocean and the "fog" of the atmospheric scattering is not being applied over any visible ocean. Does anyone have any idea as to a fix for this, be it script execution orders, shader modification, or whatnot?

    Thanks