Search Unity

Time of Day - Dynamic Sky Dome

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

  1. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    Time of Day doesn't use any hotkeys out of the box, so it shouldn't be any of my code that does this. Try a new project with just Time of Day in it and verify that it doesn't happen there.
     
  2. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,042
    That fixed it! Thanks so much!
     
  3. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    441
    Some people seem to be using this asset and Skyshop how well do they work together, and using mobile as well??

    I notice when I use Skyshop with certain tools it breaks so I want to be sure before I buy TOD. Thanks. I been on the fence awhile about TOD. Thanks.

    Also does this asset ever go on sale?? The reason I ask, I hate to buy it just for it to go on sale 2 days later. Thanks.
     
  4. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I've received some reports about issues with Skyshop in the past, but all of those have been addressed or were just configuration issues - so as far as I'm aware it does work with Skyshop. Maybe someone who's using skyshop on a regular basis can provide more information?

    Somewhat related: The Unity 5 reflection probes are very similar to what Skyshop does, so those might be a better option for some projects.

    I don't have any sales planned at the moment. I'm pretty satisfied with the number of people who buy Time of Day right now. I'm not exactly making a living wage out of my Asset Store sales, but they're not my primary source of income anyhow. The problem with sales is that while they greatly increase income for me they also amplify the amount of support requests I receive - and the more support requests I have to process the less time I have to actually work on Time of Day.

    One day, when I consider Time of Day somewhat feature complete, I might do another sale.
     
    Teila likes this.
  5. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    441

    No thanks i'm very happy with Skyshop and spent alot of money to use it, so i'm not going to ditch it for something else. I have used enough assets that were useless or lack of support to last a life time, so I been picky as of late on what I buy do to those reasons, some assets even start out with great support then die off. Plus I like Skyshop compared to Unitys Probes.



    Anyways Thanks for the info.
     
    Last edited: May 11, 2015
  6. Mogulbasher

    Mogulbasher

    Joined:
    Feb 26, 2014
    Posts:
    11
    Quick question on Scattering...

    To add scattering do we just add the TOD_Scattering script to the camera? Do we have to add it before the ToneMapping script or does the order not matter? Do we have to be in forward rendering or does it work in deferred rendering? Do we need to do anything else eg turn it on in the scripts or is adding it to the camera sufficient. I ask because I have added it to the camera but in game the sliders do not seem to do anything.

    Many thanks...
     
  7. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    TOD_Scattering has to be on the camera. Aside from a few exceptions (for example SSAO) it should be the first image effect on your camera. That being said, it's configured to run before any transparent objects are rendered so it'll always be applied before the tonemapping image effect, no matter which way you order those two. You have to be careful with other image effects that are also tagged as ImageEffectOpaque though.

    If everything is properly set up (i.e. the sky, scattering shader and dithering texture references of TOD_Scattering are all set) then you should be good to go. If you're absolutely sure that's the case and it still doesn't work, try it in an empty scene with just the sky dome, a few test cubes and the TOD_Camera and TOD_Scattering scripts on your camera. Then see if it works in there.
     
  8. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    I also have a quick question regarding scattering. I'm experimenting with multiple cameras right now with different clipping planes, to get better precision on large viewing distances (less shakiness on far away meshes). One with 0.01-10 and one with 10-100000 clipping, the latter with -1 to Depth to make it render behind. Unfortunately, the built-in global fog in Unity doesn't seem to work with two cameras, as it only renders on the closest camera, when I really want it on the far-distance camera. Do you think TOD scattering would have the same problem?
     
  9. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    Why can't you simply add the image effect to the far-distance camera?
     
  10. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Thanks for the suggestion. I tried to add Global Fog to the distant camera, but no fog shows up. I don't know the details why it's not working unfortunately, but if I disable the near camera it works again. It might have to do with the near camera having the "Depth only" as Clear Flags. This is in Deferred/Linear rendering.

    Time of Day looks amazing, and I'm planning to get it soon. Was just curious if there are similar problems there that you know of. If there are, I don't really expect you to fix them, as it's probably a more general problem with how multiple cameras are handled in Unity. I also have problems with shadow transitions between the two cameras, so I might have to stick to one camera anyway.
     
  11. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,138
    André, I have a little feature request:
    Meanwhile Time Of Day is present in allmost every of our architecture vis projects and we are really happy with it.
    The only thing that we sometimes have problems with is the amount of tint that the sky sends to the geometry.
    Sometimes it´s simply too much (blue in most cases) and we don´t have any control over it independly from the skies color.
    Means when I want a deep blue sky, the blue-tint is very strong. Reducing the skies contrast for example reduces the amount of tint but also the sky gets greyish.

    What I request is a slider ( e.g. called "Tint amount") which goes from 0 to 1 and controls the amount of tint, independendly from the sky itself.

    What do you think?
     
  12. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I just tested it with the latest version of Unity 5 and Time of Day and everything worked just fine. One camera at depth -1 (clip planes: near 1, far 5) with the TOD_Camera and TOD_Scattering image effects on it and a second camera at depth 0 (clip planes: near 5, far 1000) with the FXAA image effect. As I mentioned in this thread before, fog image effects are buggy under Unity 4, so naturally it doesn't work properly when you're not on Unity 5 yet. I can't see any issues if you're on Unity 5 though, other than Unity's wonkiness with regards to shadows, which you already mentioned as one issue of the two-camera approach in general.

    It seems like what you're looking for is ambient / reflection intensity? Try lowering Day.AmbientMultiplier / Day.ReflectionMultiplier and see if that does what you want.
     
  13. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,138
    No, it´s not about intensity or multipliers it´s only about color saturation:
    Let´s say I want a deep blue sky but the amount of blue recieved by objects to be adjustable with a slider between grey and blue.
     
    Last edited: May 19, 2015
  14. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    Cascho01, would Color Amplify work for you? It is a great IE that allows you to add your own color ramps. I love it.
     
  15. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    Posting here always runs the risk of a referral to the Unity manual but before I am referred, I want to say that I have read everything there is on water and watched videos. :) I can make unity's water look lovely except for one problem...at night, the water glows. I have tried adjusting everything and had a friend who is a programmer look it over for me. Either Unity's Water4 simply won't work with Unity 5's realtime lighting or there is some some setting I am missing in ToD. I have seen other people make scenes with nighttime oceans so it seems to me there must be a way to change the water's lighting at night.

    Any suggestions? I tried adjusting everything, fresnel, specular, etc. The only thing that seems to work is if I turn down the base color of the water to very dark at night. Could I do this with a script so that at night, the water color renders darker? My programmer says he thinks he can do it, my programmer friend says it is not a good idea.

    Thanks for any help anyone can give me. I have tried every water solution out there, and every one has problems. Some simply are not updated for Unity 5 and others don't work with ToD's scattering which I won't give up.
     
  16. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,138
    In this particular case no, thanks!
     
  17. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Thanks a lot for testing! However, I think that the near and far camera should have opposite depths, so that the near camera depth is larger and drawn on top of the other. Otherwise you'll not get the near clipping benefit from that camera as the other will be drawn on top of it. You also need to set Clear Flags to "Depth only" on the near camera so that the far camera will be rendered in the background. I'm on Unity 5, but I think I might just stick with one camera for now and solve these issues later.

    Sounds like global reflection or ambient light color is not being updated. If your reflection skybox isn't updated, your daytime skybox will be reflected on the water during night. Likewise, if ambient light color isn't updated, it will light up the water at night. I can't give you details for solving it unfortunately as I'm not that familiar with ToD, but it's probably just some setting. Could also be fog, but then it would look more like glowing fog.
     
  18. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    Thanks for the response, Sir Spunky. However, the global reflection and ambient light is working fine with the terrain, trees, and objects in the scene so my guess is a problem with the water. Seems I am not the only one having this issue and a script that changes the color will probably be my best bet.

    I don't use fog, just the scattering effect and that doesn't seem to be the problem. :)
     
  19. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    264
    As far as I can see, Water4 ignores lighting completely, with the exception of reflecting the sky on the surface, and depends on external scripting to adjust color values at runtime. Color adjustments over time might help some, but in any case, Water4 compltely ignores shadows, and there doesn't seem any simple way to deal with that. So in the end I think Water4 will always look "artificial", especially wherever there are shadows.
     
  20. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    I agree...but it will work better as a stand-in than anything else. Currently Suimono is covered with foam unless I remove the the scatter and lens flare. It looks horrible and will not do for any sort of presentation. I haven't found an option that is better than Water4 and I have purchased several. Hopefully something new will come out so there is some "water" competition. :)
     
  21. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I can see how that would be a useful parameter to adjust. I'll look into it for the next update.

    You are correct regarding the camera depth values. It's possible that I just wrote it down incorrectly and did it the right way around in the scene - I didn't save the test scene so I can't check. I did use "depth only" clear flags on the near camera and everything appeared to work correct, aside from the shadow issues I mentioned.

    What I did in Unity 4 was to use the Water 4 nighttime prefab (the "simple" one if I remember correctly) since that didn't add a static blue color but appeared blue at day nonetheless due to its reflections. I've also successfully used the "advanced" Water 4 prefab with a dynamic day / night cycle in Unity 5 before. What you have to do is to manually adjust the color properties the script exposes when the time of day changes. We added a script to the water and called SampleSkyColor() / SampleEquatorColor() on TOD_Sky, then fed those colors into the water 4 material. It's hacky but works. We then later switched to a custom water shader that uses the Unity 5 reflection and PBR features.
     
  22. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    Thanks! That is very useful information.

    I am not fond of the "simple" water since it so perfectly clear with these awful unrealistically perfect reflections. Fine for a lake but not useful for a river. A script for Water4 could work though...I can somehow wrap my head around that so will talk to my programmers. Thanks again.
     
  23. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,414
    I often find myself getting rather excited about the improved clouds that you are working on. Hows that stuff going? Of all the sky systems for Unity I've bought over the years, yours is my firm favourite and if you can make the clouds look better then I'll be on cloud 9!
     
    Teila likes this.
  24. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I've been a bit short on time recently, but I'm planning to release the new semi-volumetric clouds next month as part of 3.1.0 together with support for real-life star constellations. I'll then start working on the fully volumetric clouds once I have more time.
     
  25. Deleted User

    Deleted User

    Guest

    I just purchased this, and I have to say is as good as I expected except one thing. I am really disappointed with clouds implementation, possible adding dynamic perlin noise over/single default will look better, also clouds shadows on the ground is really weird. I've also expected weather effects to work. Frankly you should not give up developing this because everything else is very good. If you could improve those I'll give it 10/10.
     
  26. toxtronyx

    toxtronyx

    Joined:
    Aug 21, 2014
    Posts:
    114
    Hi there,
    maybe this has been asked before. When switching the sky from LDR to HDR I am getting that caribbean look especially at the lower parts of the sky. Tonemapping looks awfull, maybe a third party plug makes things better, but I thought I ask before purchasing something. Is there a way to get a colder look for the sky when using HDR?

    Cheers!
     
    ghiboz likes this.
  27. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I'm not planning to stop development on Time of Day - not sure why you would think that. Both clouds and cloud shadows will be improved in the next update.

    When you switch the sky dome from LDR to HDR you have to add a tonemapper to your camera and make sure your camera is set to "HDR" as well. You can also just switch your camera and leave Time of Day to "Auto" as it will then detect the HDR camera and switch to HDR output. Unity comes with a number of tonemappers that are part of the Standard Assets - you can find more info on how to use those in the Unity manual. Using the "photographic" Unity tonemapper will look pretty much exactly the same as the LDR Time of Day mode because it uses the same equation.
     
    toxtronyx likes this.
  28. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    276
    What's the best way to deal with Tonemapping and Night with this asset? The Adaptive Reinhard Auto White Tonemapper just seems to go crazy with intense blooming once the moon comes out.
     
  29. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,274
    Does adjusting the moon (mesh) object brightness and halo help?
     
  30. March_of_the_Ents

    March_of_the_Ents

    Joined:
    May 20, 2015
    Posts:
    5
    Hello, proud owner of this fine asset. Just had a question, i use a visual script tool and im able to drag and drop the components from gameobjects in the scene. So with that being said, what property am i looking for when trying to get the skies Cycle Hour?

    I tried using the GetComponent action but there is no "Cycle" property in the list nor hour/day/month/year properties.



    Im sure you can see what im trying to do is this: IF-->HOUR-->ON-->SKY_DOME = 18-->THEN-->RUN EVENT. I know you included some scripts to handle these things, but this tool is integrated in my RPG kit and can run events pertaining to the NPCs such as going to sleep, doing an activity, patrolling a path, etc.

    Any help is appreciated!
     

    Attached Files:

  31. toxtronyx

    toxtronyx

    Joined:
    Aug 21, 2014
    Posts:
    114
    Yep the sky looks still cool, unfortunately it washes out all the other colors but that is not your business :)
    However I forgot to say, that I love TOD. Its fast, smart and beautiful.
     
  32. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    The adaptive tonemappers that come with Unity are somewhat buggy. They look different on Windows / OSX and it's pretty much impossible to get decent results with them on OSX and very hard on Windows. I recommend using any of the non-adaptive tonemappers and if you want adaptive tonemapping check out some of the tonemappers on the Asset Store or get Unity to fix their adaptive tonemappers by submitting a bug report.

    I can't offer support for other third party tools I don't even know or own, but I can tell you how TOD_Sky is structured so that you can ask the developer of this scripting tool how to proceed. TOD_Sky has a class instance field called "Cycle" of type TOD_CycleParameters, which in turn contains the individual values. So what you would do in a normal script would be the following:

    Code (CSharp):
    1. TOD_Sky sky = TOD_Sky.Instance; // This is a reference of the TOD_Sky script
    2.  
    3. sky.Cycle.Hour = 0; // Make it midnight
    This is a fairly common way to organize things in Unity, and it's supported by most visual scripting tools on the Asset Store.
     
  33. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    264
    Hi,

    I have a very strange problem that clouds are not visible at all, no matter what cloud and weather conditions I set (using latest TOD and Unity 5 PE).

    Here are some screenshots out from the editor:






    Obviously I do something terribly wrong?
     
  34. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    The usual questions:
    • Did you attach the TOD_Camera script to your camera? (see the "Getting Started" section in the docs)
    • Does it work in an empty project with just Time of Day?
    • Are there any errors in the Unity console?
    • Which version of Unity are you using?
    • Is Time of Day on the latest version?
     
  35. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    264
    Yes.

    Will check that!

    No.

    The latest one 5.0.2p3

    Yes I think so (3.0.2)

    Thanks for the fast reply! I will try an empty project and after that just reimport the whole package. But maybe there's something wrong in general when you take a quick look at the screenshots above?

    edit: A fresh and empty project works like a charme, will continue trying.
     
  36. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    Ah, thanks for uploading some screenshots. You should do a full reimport of Time of Day (delete Time of Day, restart Unity, reimport Time of Day - remember to backup your sky dome settings) as it looks like your material is still using an old cloud layer shader that was removed in one of the last updates. Sadly the Asset Store doesn't automatically remove assets when you just update a package, so you kinda have to do it manually by doing a full reimport.
     
  37. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    264
    Aye, I see! That's what the purple color on the material says, right? Uh oh, should have come up to this conclusion as well. Thanks!
     
  38. Deleted User

    Deleted User

    Guest

    One more question please: if i setup a custom hour, how can i free time of day to that hour? (for a specific project)
     
  39. toxtronyx

    toxtronyx

    Joined:
    Aug 21, 2014
    Posts:
    114
    Me again. I switched the color space of the whole project to linear and used a third party tone mapper. Now I can say: No matter if LDR or HDR, TOD is somewhat unmatched in its quality and I am always positively surprised how fast it is. Really a nice addition and a must buy if you need a dynamic sky.
     
  40. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    276
    Which one are you using?
     
  41. toxtronyx

    toxtronyx

    Joined:
    Aug 21, 2014
    Posts:
    114
    hopeful likes this.
  42. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I don't understand what you're asking for. What do you mean by "free time of day to that hour"?

    I can recommend that one as well. Since the adaptive part is separate from the tonemapper it can also be used to make any of the non-adaptive Unity tonemappers adaptive.
     
    toxtronyx and Teila like this.
  43. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    276
    Thanks, that's exactly the one I had my eye on.
     
  44. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    658
    I am a novice programmer. What would I face with implementing your program with respect to:

    1. The asset store flashed a warning on Unity 5.0, This is not a 5.0 release, but has support for 5.0, what does this mean?

    2. I see several technical issues regarding, tone mapping, tree billboards and fog. Will I have to deal with these?

    3. What happens to your product when I go from scene to scene? Will the time and effects persist?

    I really want to use Time of Day, but I have limited time, and it needs to implement in Unity5.0 easily, and not cease to function when I switch scenes.

    Wood
     
  45. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    680
    I upload the package using Unity 4 to offer backward compatibility for Unity 4 users, but it fully supports Unity 5. I'm not sure why they added this warning, maybe they want to get all Asset Store publishers to upload with Unity 5.

    Regarding tonemapping: Time of Day supports LDR cameras, HDR cameras with the Unity tonemappers (as I said above the non-adaptive ones work perfectly, but the two adaptive modes are buggy on OSX - this has nothing to do with Time of Day, Unity has confirmed that it's an issue they have to fix in their code) and HDR cameras with third party tonemappers like the filmic one that was posted above.

    Regarding tree billboards: The sky dome itself works with any tree billboards. The optional aerial perspective image effect I include, as any fog image effect, doesn't work the Unity Tree Creator tree billboards, but does work with the SpeedTree tree billboards that have been added in Unity 5. You can add support for fog image effects to the Unity Tree Creator tree billboards using a custom shader or the terrain / tree shader package from the Asset Store that has been mentioned in this thread. Personally I recommend using SpeedTree trees rather than the Unity Tree Creator ones if you're on Unity 5, no matter whether or not you're planning to use fog image effects - simply because they're the better tree system of the two.

    The sky dome is a normal game object like any other game object in Unity and therefore it supports all the workflows Unity offers you in order to keep the state of a game object when loading a new scene. By default it will of course be destroyed when you unload the scene it was loaded from, but you can mark it as DontDestroyOnLoad and only instantiate it the first time you load a scene, load and unload scenes additively rather than doing full destroy / load cycles or manually save / load the current date and time information (TOD_Sky.Instance.Cycle.DateTime) when switching scenes.
     
  46. Olander

    Olander

    Joined:
    Sep 13, 2014
    Posts:
    398
    I can verify that the Filmic Tonemapping Deluxe as posted above works flawlessly with Time of Day and my personal weather system which directly influences Time of Day lighting and cloud settings. I did add the Unity 5 Optimized Bloom image effect as recommended by FTD and the effect is perfectly subtle. And makes Time of Day's fantastic lighting even better with improved depth.
     
    hopeful and Teila like this.
  47. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    193
    Hi plzdiekthxbye,
    Regarding TOD_Rays, is there a way how you can tell it to ignore *certain* MeshRenderers so that rays can pass through them?

    The reason I ask is because I have some MeshRenderers which rays need to pass through.
     
  48. joelcarlson

    joelcarlson

    Joined:
    Apr 7, 2014
    Posts:
    43
    What are the factors that go into a cloud color? I'm having cloud sprites spawn in addition to the skydome clouds. I get the cloud-color property and tint my sprites based on that, but my sprite clouds at night are very much darker than the skydome clouds. Any help would be appreciated! Thanks for the great asset!
     
    hopeful likes this.
  49. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,138
    I have an issue with TOD_Rays on (non speed tree) trees. They´re not rendering correct.
    I´m pretty sure it comes from a Z-buffer thing:
    When I use the Unity SunShafts component it renders with the same issue, but unticking "Rely on Z-Buffer" fixes it.
     
  50. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    658
    Plzdiek,

    Thank you for your response. I have been mulling it over, and decided I will purchase ToD and look at it this weekend. I will let you, the programmers, and the art wizards polish the technical details, and I will focus on getting a simple day night cycle working in my demo project.

    When you recommended SpeedTrees I went back to the asset store and found mixed reviews, so I will not switch to them at this time. Seems I would need to use their monthly service to get their assets in good shape for Unity3d, and I don't have time for that right now.

    As for ToD and scene switching, my experience with third party assets is that some have solved this problem for me, intentionally, and others have not thought about it much. What I call easy is the cInput implementation, where I put a script on a game object in my first scene, (my new game HUD screen actually) and by design the asset works in every scene after that. On the other hand, some of the time/weather assets other than ToD are challenging and insufficiently documented for me to easily get them working. I will let you know how ToD works out for me in this regard.

    Compliments on your brilliant asset!

    Woody
     
unityunity