Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Time of Day - Dynamic Sky Dome

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

  1. BenouKat

    BenouKat

    Joined:
    Feb 29, 2012
    Posts:
    222
    I'm interested by the 5.5 version too ! :)

    I just bought this wonderful asset
     
  2. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    You can adjust the scattering and atmosphere colors using the color gradients in the TOD_Sky inspector. See the tooltips / docs for more info. You'll want to look at "Day -> Sky Color" in particular.

    Replied to your PM.
     
  3. adamlukegoodwin

    adamlukegoodwin

    Joined:
    May 10, 2015
    Posts:
    15
    I sent a PM - I really need a version that works in 5.5 please! Many thanks!
     
  4. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Is there any reason why there hasn't been a new official release for so long - only updating people on a manual basis? I only ask out of curiosity.
     
  5. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Sent.

    My main job is working on an early access game on Steam, so I have little time to spare. I do work on Time of Day fairly regularly since both our early access game and some other games in development are using it, but I have to update the changelog, description and docs before I can officially release the latest version on the Asset Store. Right now simply sending out the internal releases on request is less effort for me, but that's starting to change so I'm really trying to find a free day to get the version on the Asset Store up to speed.
     
  6. Matthias1231

    Matthias1231

    Joined:
    Aug 20, 2012
    Posts:
    53
    Is it possible to have TOD_Scattering affect transparent objects, specifically water (I'm using Aquas)?

    Edit: looks like removing 'ImageEffectOpaque' did the trick
     
    Last edited: Mar 31, 2017
  7. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    308
    I haven't read through all the posts lately, but the new version we got works perfect with singlepass rendering mode now!

    Thank you very much Andrè
     
    hopeful likes this.
  8. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    250
    I'm running into a small problem with both the latest (3/20/17) and previous (12/6/16) wherein atmospheric scattering shows some weird artifacts. Has anyone run into this before or know what might be going on?

    with TOD_Scattering:


    without:
     
  9. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    308
    I love TOD + RTP :)
     

    Attached Files:

  10. AkinBilgic

    AkinBilgic

    Joined:
    Jun 14, 2016
    Posts:
    7
    Sent a PM - looking to get it working in 5.5 and up!
     
  11. movingdimensions

    movingdimensions

    Joined:
    Jan 9, 2015
    Posts:
    16
    Sent you a PM for latest release.
     
  12. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Any chance something in your scene is messing with depth or alpha values? Both are used to allow objects to occlude the directional scattering of TOD_Scattering.

    Looking good!

    Replied.

    Replied.
     
  13. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Sorry, I missed your post. Water should be rendering before ImageEffectOpaque if it writes to depth. If you just remove the tag from TOD_Scattering it will incorrectly draw over transparent objects that do not write to depth. If that's fine for your project then feel free to remove it.
     
    Matthias1231 likes this.
  14. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Quick update on the Asset Store release: I have used the holidays to wrap up the changelog and implement some final outstanding things from my TODO list. I'm planning to submit the new version to the Asset Store for review this week.
     
    danger726, Rowlan, hopeful and 3 others like this.
  15. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,160
    I think this is a new bug with 5.5.3:

    I've got the Sky Dome set up in a scene that's loaded additively to the main gameplay scene, where the camera is. I put the TOD_Camera script on the camera, but apparently due to the way the additive scene is loaded, the Sky Dome and camera don't find each other. I have to manually toggle the TOD_Script off and on again at runtime to get the Sky Dome to be assigned to that script in the inspector. Pretty sure this worked until I upgraded to 5.5.3 -- anyone seen this and is there a fix?

    thanks
    Dave
     
  16. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    165
    Could anyone help me subscribe to the OnHour event? I'm not sure of the best way to do it.
     
  17. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    This really shouldn't have changed in 5.5.3 - as long as the camera is added to the scene after the sky dome it should find it. If the camera is added first then toggling TOD_Camera looks for the sky one more time, which is expected. I can add a reverse lookup to handle this scenario before I submit the new version to the Asset Store though.

    It's pretty easy:

    Code (CSharp):
    1. void Start()
    2. {
    3.     TOD_Sky.Instance.Components.Time.OnHour += DoStuffEveryHour;
    4. }
    5.  
    6. void DoStuffEveryHour()
    7. {
    8.     Debug.Log("One hour passed.");
    9. }
     
  18. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    165
    Many thanks for the fast response - that works perfectly.
     
  19. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,160
    Thanks, I'd really appreciate that!
     
  20. rateiro

    rateiro

    Joined:
    Nov 24, 2016
    Posts:
    1
    Good afternoon, I need a version compatible with unity 5.6.0.
     
  21. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Replied to PM.
     
  22. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,160
    Could I get this fix sooner - or can you tell me what the code edit is? We need it working for playtesting...

    thanks
    Dave
     
  23. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Quick update: Version 3.2.0 is currently being reviewed by the Asset Store team and if everything goes well it should become available for download via the Asset Store over the course of this week.

    I can't find you in my PMs, so please send me your invoice ID via PM or email and I'll send you the download link.
     
    hopeful, mons00n and elbows like this.
  24. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,160
    Actually, I can wait for the update to appear in the Asset Store -- this issue only occurs in the editor, works fine in builds.
     
  25. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    You can now download version 3.2.0 directly from the Asset Store.
     
  26. toloo

    toloo

    Joined:
    Oct 1, 2014
    Posts:
    10
    Is it possible to synchronize time to the network ?
     
  27. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    308
    Yes it is! We are doing this, and it works great!
     
    hopeful likes this.
  28. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    See the "Networking" section in the docs.
     
  29. toloo

    toloo

    Joined:
    Oct 1, 2014
    Posts:
    10
    Exactly what I mean about the UNETs.
    Get time from cell time TOD_Sky

    • To network date and time, synchronize the property TOD_Sky.Cycle.Ticks of type long
    Very modestly
     
    Last edited: May 2, 2017
  30. Auto-Bot

    Auto-Bot

    Joined:
    Feb 6, 2014
    Posts:
    287
    Hey hey,

    I appear to be having an issue with the atmosphere shader. Any idea what might be causing this?

    Thanks in advance :)

    Shader error in 'Time of Day/Skybox': failed to open source file: 'TOD_Base.cginc' at line 10 (on d3d11)

    Compiling Vertex program with TOD_OUTPUT_HDR
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA

     
  31. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    165
    I have a some flashing black patches on the sky (v 1.8.9.1) Is an update likely to help? I am a bit reluctant to update right now.
     
  32. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,826
    I am trying to prepare a scene for presentation at a Unity User group meeting but the moon is pink, missing shader. Any reason why this might happen and any way to fix it? The scene has only terrain shaders, but nothing that has ever conflicted with ToD before. I am stumped. I doubt it will be impressive when the pink moon rise. lol
     
  33. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    165
    So I upgraded but am still getting the flashing black areas in the sky.. flash.jpg
     
  34. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,357
    Not sure if you've tried this, but do you get these artifacts when you run ToD in a new, empty project?
     
  35. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    165
    Good point - I should try in an empty project. However I have found a solution. On the TOD_Camera script I have reduced the DomeScaleFactor. With anything less than 0.9 the issue goes away. I'm not quite sure about he implications (if any) though of different scaling. Does anyone have any thoughts?
     
  36. danger726

    danger726

    Joined:
    Aug 19, 2012
    Posts:
    148
    This looks and sounds to me like the sky dome is clipping out against your camera's far clip plane. That would be why reducing the dome scale fixes it. There shouldn't be any problem reducing the dome scale unless you have other geometry that goes right out to the far clip distance, in which case the sky dome might intersect with it slightly.
     
  37. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    You'll have to learn that from the UNET docs.

    It says it cannot find TOD_Base.cginc - so try a full reimport as described in the docs.

    Try a full reimport and if that doesn't fix it you have to send me the shader errors you're getting on the moon shader.

    That's what the parameter is for so there's no problem with reducing it as needed. However, double check that the sky dome correctly moves with your camera since usually 0.95 works just fine. Maybe you're doing something with the depth buffer that causes this or you're rendering something behind the sky dome?
     
  38. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,826
    I did several reimports. Ended up having to use something else for the presentation. When I use ToD again, I will send the errors. It may have been just that project.
     
  39. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,063
    Hi, I've imported Time of Day in to a fresh Unity 5.6.0p3 project & I'm getting these errors:

    Is there an update to fix these please?
     
  40. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    294
    I'm interested in purchasing this asset for use in Unity 5.6. I've seen mixed responses from people saying it does and doesn't work. Can anyone give any insight? I'd like to know my $60 was well spent.
     
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    Is there some way to give the sky a grayish tint to it? I want an overcast sky look and I can increase cloud cover, but the sky always look really blue. I can't find any setting to change that.

    [EDIT]
    Doesn't anyone know this?
     
    Last edited: May 23, 2017
  42. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,357
    Well ... it appeared to be working fine for me about a week ago, on Unity 5.6. Maybe I'm not using all the features or whatever, but I have sun, sky, clouds, moon, progression of day ...
     
  43. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    The errors don't make too much sense given that Gradient.alphaKeys is clearly defined in the API: https://docs.unity3d.com/ScriptReference/Gradient-alphaKeys.html

    Any chance some script in your project is implementing a class called "Gradient" and therefore hiding Unity's implementation?

    Increase Atmosphere.Fogginess to achieve this.

    Unity 5.6 is supported, we're using it in various projects with that version ourselves.
     
  44. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    105
    Hi,
    having a problem with TOD_Scattering is Ignored unity billboard trees on the terrain
    and also ignore water (AQUAS asset) please advice me.
     
  45. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Both tree billboards and water have to write to the depth buffer in order to be affected by TOD_Scattering. This is nothing that can be addressed on my end - you will see the same problem when using Unity's built-in global fog image effect. Fog image effects simply need correct depth buffer values in order to work.

    So for the water this is an issue that needs to be resolved by the developer. For the billboards it's a little more complicated. Unity is no longer working on the tree creator trees since people are supposed to switch to SpeedTree assets (ST billboards do write correct depth values). There used to be some workarounds to enable ZWrite on the old tree billboard shader but all of those appear to have broken over the last couple of Unity updates. So long story short, as far as I'm aware there's currently no way to use the old tree creator trees with fog image effects, only the new SpeedTree trees.
     
    hopeful likes this.
  46. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    250
    For AQUAS look in the water material for a "Enable Custom Fog" boolean; check that and you should be good.
     
    nirvanajie and hopeful like this.
  47. Demonith88

    Demonith88

    Joined:
    Jun 30, 2014
    Posts:
    215
    I want to add to new project but dont know how i can add my already camera in this ?
     
  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,864
    This really doesn't work.
     
  49. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    749
    I took a look at the unity player demo terrain version, and attempted to navigate. I could easily find Orion, but for the life of me, I could not find the North Star. Is there a reason for this in the demo?
     
  50. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    All you need to add to your existing camera is the TOD_Camera script. The sky dome is its own object independent from the camera.

    It's most likely due to the latitude the demo is using. I've marked Ursa Major, Ursa Minor and Polaris in the screen shots below. The star brightness and size is adjustable. The second one uses slightly brighter and bigger stars, which makes it easier to identify if your project utilizes star constellations. Don't mind the extremely bright night sky, it's just what the project I took this from is using for gameplay reasons.

    Screen Shot 2017-06-15 at 16.49.00.png Screen Shot 2017-06-15 at 16.51.52.png
     
    wood333 likes this.
unityunity