Search Unity

[RELEASED] Enviro - Sky and Weather (Dynamic Sky and Weather System)

Discussion in 'Assets and Asset Store' started by Vondox, Apr 11, 2015.

  1. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hi, the ambient sounds are defined in each weather preset. Most presets don't have ambient sounds for winter season, so you may need want to raise the days to get to spring to hear them, or assign your own sounds here.

    upload_2019-4-20_15-4-53.png
     
  2. Arrhenius

    Arrhenius

    Joined:
    Nov 16, 2017
    Posts:
    9
    Thank you very much!!
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, I have send you a private message as we may have to take a look into your setup in a screenshare.
     
  4. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    135
    So, the thing here is that the sun does not glow behind the clouds when it is obscured. I've messed with the scattering parameters and found some approximations of this effect, but I think in reality we'd see a rough shape of the sun behind them.

    The shot below is from our setup with Enviro (which looks great btw, this is just a detail I'm interested in)

    upload_2019-4-19_23-21-39.png

    This is an actual photo.Depending on the thickness of the clouds, a certain amount of the sun shines through.



    Let me know if you have ideas for achieving this effect. Cheers
     
  5. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, sorry such rough shape of the sun disc like in your photo currently is not possible. I may will add another setting to allow for that later. Currently you could raise the "HG Phase" setting to allow for more directional sun scattering.

    For example with less dense clouds and HG Phase set to 0.75 instead of 0.4:
    upload_2019-4-20_23-23-56.png
    upload_2019-4-20_23-36-0.png

    These screenshots also from next update 2.1.2 with some improved clouds lighting I worked on for 2.2.0 update.
     
    mmaclaurin and Firlefanz73 like this.
  6. pierre92nicot

    pierre92nicot

    Joined:
    Aug 21, 2018
    Posts:
    33
    Hi, will the Aura 2 integration be part of the 2.2 update ?
    Thanks.
     
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hi, yes. Aura 2 integration will be added in one of the next updates.
     
  8. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    135
    @Vondox that new shot looks great!

    I'm seeing a bunch of LWRP and HDRP stuff in the codebase. Have you announced a release window for those?

    Also, I have to tell you that I was planning on stacking HX Volumetric Lighting on top of Enviro, but your Volumetric solution actually works very well for us.This was a happy surprise, as I only bought Enviro for the clouds and sky stuff. I wonder, how do you rate the performance of your volumetrics? I haven't done a thorough analysis yet and just curious what you figure I should expect.
     
  9. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    135
    I'm finding that in the latest version 2.1.1 any attempt to set the progressTime setting to .None will revert to .Simulated when we enter play mode. Looking at the code this appears to happen in EnviroSky.cs:1378 in Play(). Suggest sending the inspector value in as that param instead of always .Simulated.
     
  10. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    135
    Ok got another one for you @Vondox.

    When EnviroSkyMgr is in a separate scene from a volume light, the volume light is getting enabled = false when entering play mode. Looks like EnviroVolumeLight.cs:118 is where it's happening. If I comment out that line, the Volume Light is enabled but does not render. If I flip it enabled = false then true in editor, it renders.

    Like I said, EnviroSkyMgr is present in the game, but it is in another scene that is loaded concurrently. This doesn't strike me as an uncommon setup. If I move EnviroSkyMgr into the same scene as the volume lights, they are enabled properly and render.

    Looks like a race condition. I have a local fix that looks like this (around that line)

    Code (CSharp):
    1.    
    2.     IEnumerator TryEnableNextFrame()
    3.     {
    4.         yield return null;
    5.         this.enabled = true;
    6.     }
    7.  
    8.     /// <summary>
    9.     ///
    10.     /// </summary>
    11.     void OnEnable()
    12.     {
    13.         if (EnviroSkyMgr.instance == null)
    14.         {
    15.             StartCoroutine(TryEnableNextFrame());
    16.             this.enabled = false;
    17.             return;
    18.         }
    19.     }
    20.  
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello,

    sorry no release window for srp support yet. But it won't be that far away. As I don't have any third party volume light assets right now, it is hard to compare.

    Thank, already fixed that one on my side and will be in included in 2.1.2 that should be released in the next days.

    Thanks again! I will have a look into this and add it to 2.1.2. :)
     
  12. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    60
    Hey @Vondox , from script is possible to sync the time / weather between the HDInstance and LWInstance before activating one of them? Or i have to copy all values manually?

    Thanks
     
    Last edited: Apr 23, 2019
  13. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,033
    I updated to 2.1.1, but the moon still isn't right -- I checked the young crescent (screenshot) and quarter phase, same issue with both. Are these the tricky ones that aren't fixed yet?

    Screen Shot 2019-04-23 at 11.25.35 AM.png
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, currently you need to sync those yourself. But I will add a function for that.
     
    Weendie-Games likes this.
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, I have further worked on this for 2.1.2 and could send you a modified shader to test. I will contact you in skype.
     
    gecko likes this.
  16. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    75
    Hey @Vondox , observing an issue with 2.1.0 when using Distance Blur in combination with Volumetric clouds.

    When moving the camera, there is a flickering around the sun which seems to be a result of the blur operation. It seems worse when "High Quality" is checked. Without that, the flickering is reduced (but a black spot appears in the centre of the sun at the point of flicker)... does that point to NaN results from the shader ?

    Whilst playing around with the various settings to try and see what influences it, I increased the blur radius from 7 to 10, and the editor game window flood filled, crashed Unity, locked the graphics driver and the whole machine - the only way out was a hard reset !! Something doesn't seem right with this.. maybe you've seen it already ?

    Distance Blur config that produces the flickering:
    Anti Flicker = ON
    High Quality = ON
    Radius = 7
    Blur Distance = 2000
    Blur Intensity = 0.5
    Sky Blur Intensity = 2.5

    On Unity 2017.4.21f1, Windows platform, Deferred setup
     
    Weendie-Games likes this.
  17. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    93
    I have not updated Enviro for a while, I like the new switch to desktop/mobile. So I'm trying...

    How could I instantiate and enable everything in runtime? I cannot find the functions on the included PDF (I'm still reading this forum, btw).

    My game has lots of settings, I don't include Enviro or any other heavy package in my scenes to allow it to be executed in low end PCs. So I need a way to:

    * Load Enviro Manager from a resource prefab (it maybe an empty prefab with Enviro prefab inside)
    * Load and activate PC or Mobile versions (also with resources, so they won't be loaded in a blank scene)

    On old versions I just put the Enviro prefab inside a Resources folder and it worked very well, I load it with Resources.Load depending on user settings, but now with these changes I'm stuck hehe.

    I hope that it continue working this way, it's an amazing asset.
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, thanks for your report! I could reproce the black screen when setting blur radius to 10. Need to limit that in next update. But I could not get any black pixel with your settings on my side. Could you please send me your profile and weather preset for debugging?
     
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, you would need to create the manager prfab yourself and add both versions and save that as prefab in your resources folder. It should look like this:
    upload_2019-4-24_12-29-22.png

    Now you can instantiate and switch between enviro version like this:

    Code (CSharp):
    1.     void Start ()
    2.     {
    3.        //Instatiate the Manager prefab that have both version already setup
    4.        Instantiate(Resources.Load("Enviro Sky Manager", typeof(GameObject)));
    5.     }
    6.    
    7.     void Update ()
    8.     {
    9.         if (Input.GetKey(KeyCode.Alpha1))
    10.         {
    11.             //Activate and assign/start lite version
    12.             EnviroSkyMgr.instance.ActivateLWInstance();
    13.             EnviroSkyMgr.instance.AssignAndStart(Camera.main.gameObject, Camera.main);
    14.         }
    15.  
    16.         if (Input.GetKey(KeyCode.Alpha2))
    17.         {
    18.             //Activate and assign/start standard version
    19.             EnviroSkyMgr.instance.ActivateHDInstance();
    20.             EnviroSkyMgr.instance.AssignAndStart(Camera.main.gameObject, Camera.main);
    21.         }
    22.  
    23.     }
     
    Firlefanz73 and Marcos-Elias like this.
  20. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,104
    That's an interesting Point for my next game that should run on PC and Android and maybe iOS.

    Can I use Enviro this way for having a game that runs the Low Instance für Smartphones, and the HD for PC?
    Smartphones should be not too old and need some good performance in my case anyway...
     
  21. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    93
    Is there a function or variable I could check within Enviro to come up with a 0->1 measure of the degree of light in the scene, such as 0 == darkest night and 1 == noon on a cloudless day?

    I'm trying to calculate when an AI person might choose to use a searchlight.

    tone
     
  22. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,104
    My characters carry torches depending on the daytime :)
     
  23. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    93
    Also -- is "date and time" always in UTC in Enviro?

    If I assume DateAndTime dateTime is in UTC, why is there a utcOffset variable in addition to the longitude? Isn't utcOffset derived from longitude?

    tone
     
  24. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    75
    Sure will do at the next opportunity... glad you found half of the issue already...
     
    Vondox likes this.
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, you could use EnviroSkyMgr.instance.Time.solarTime for that. It has exactly the range you are looking for.

    Enviro currently does not auto detect correct utcOffset for your location. So you can set it yourself and will have correct times.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, short: Yes! :)
     
    Firlefanz73 likes this.
  27. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,104
    Great, thanks :)
     
  28. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    71
    i have the wierd problem, the progress time set evrytime, i reload the scene back to Simulated. how can i prevent this?
    using Units2018.3.13f1
     
    Marcos-Elias likes this.
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, will be fixed in 2.1.2 that I will upload tomorrow. I also can send you an hotfix if you need asap.
     
    Noa3 and SickaGamer like this.
  30. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    75
    Profiles dispatched to you...
     
  31. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    93
    Thanks a lot, it worked! I just created two prefabs, so on mobile it won't even load the desktop version (otherwise I think that its assets are loaded in memory since they are referenced by an object in the scene).

    One little problem: the time progress when canvas is shown goes so fast (I think that it is the same problem related by Noa3). Is this a bug or something went wrong just here?

    Also a short question, where can I find the option for shadow intensity? I was using 0.7 before but I have not seen it in this version (to get a soft color for shadows). Or maybe I just missed it, hehe.

    Enviro is amazing, great visuals and quality, it completely changes the scene. Love it!
     
    FrozenEmpire likes this.
  32. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    71
    thx for your hard work!
     
  33. Stefan86

    Stefan86

    Joined:
    Aug 31, 2017
    Posts:
    53
    Hey @Vondox I have an error after import into an empty project..


    Assets\Enviro - Sky and Weather\Enviro Standard\Scripts\EnviroVolumeLight.cs(290,8): error CS0619: 'VRSettings' is obsolete: 'VRSettings has been moved and renamed. Use UnityEngine.XR.XRSettings instead (UnityUpgradable)'
     
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, please click on "Assets" -> "Run API Updater". I will fix this in next update to use new api for newer Unity version. So you won't need to auto update when importing.
     
  35. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    93
    My Enviro 2.0.2 setup has gotten corrupted somehow. The component links were lost.

    The sequence of failure I see now is this:

    1. Argument is out of range (index) in this line: Weather.currentActiveWeatherPreset = Weather.zones[0].currentActiveZoneWeatherPreset;
    2. a NullReferenceException occurs two calls after this last line in EnviroSky: GameObject SFX = (GameObject)Instantiate (Audio.SFXHolderPrefab, Vector3.zero, Quaternion.identity);
    3. Then, I get continual complaints that SunTransform is not set, even though I have faithfully assigned the Sun GameObject to the field in EnviroSky's Component Setup section.

    edit: I am on my way back to sanity after updating Enviro and recreating my scene.

    tone
     
    Last edited: Apr 27, 2019
  36. schildawg

    schildawg

    Joined:
    Feb 13, 2018
    Posts:
    17
    When choosing presets with high wind, such as Storm, the trees whip around like crazy, but the details such as grass and flowers wave back and forth very serenely. I know the trees use a wind zone, and the details use terrain settings, so I'm not sure there's anything you could do about it. My only thought for a work-around is to use SpeedTree's tree-based grass assets, but I'm not sure what impact that would have on performance.
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, easiest way would be to replace prefab or update enviro and use the new manager to setup. Please note that you have to delete enviro and cleanup you scene before using latest enviro version.
     
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, yeah the terrain grass system unfortunaly not work with windzones. You would need to set the wind for grass directly in terrain. I will have a look and send you some code for that after weekend.
     
  39. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,104
    Hello Hendrik,

    I am using the grass shader from vegetation studio for my grass, but I have no Terrain, but am using own dynamically created chunks and voxels.
    I hoped the wind from enviro in the scene animates my Vegetation Studio grass, but I never got it working.

    If that Maybe the same Problem as you mentioned, I am also interested in that Code :) Thanks!
     
  40. Poxican

    Poxican

    Joined:
    Oct 17, 2012
    Posts:
    37
    Brilliant! Sorry for the late reply but yeah, I use the Assign On Runtime option. It looks like 2.1.2 isn't online yet, it'd be great to get hold of that hotfix though please!
     
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, I have send you a private message with hotfix.
     
  42. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    209
    6E27EEEA-59BC-4E78-AD97-18A3C4C56930.jpeg hi just wondering, i messed around with fog lately, and seems like enviro does not have a volumetric fog solution, is this correct? is there something planned in this direction? or am i missing something?
     
    Last edited: Apr 28, 2019
  43. Nazowa

    Nazowa

    Joined:
    Oct 30, 2017
    Posts:
    15
    Can you please update the product documentation with information on how to increase night time minimum light intensity independent of seasons. Each time I have to remove and add Enviro to my project again I forget how to do this.

    Keep up the good work...
     
  44. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    397
    Hi @Vondox

    First, congrats on 2.X release, I played with it for the first time recently and I'm having some issues

    I've set it up quite basically, actually just disabled most of the features (the game is top-down, so I mostly just need the weather and night&day system)

    Let me go directly to the problem. When times run, it's perfect, sun is rotating as it should and shadows all move very well.
    But the catastrophe happens at the curse time of 16:46

    Here is a screenshot on how it looks at 16:45 (no issue)
    upload_2019-4-29_2-2-49.png

    And here is the issue at 16:46
    upload_2019-4-29_2-3-6.png

    I'm thinking that the issue is mostly with shadows (they all disappeared if you check both screenshots) my grass became totally black (It's a specific shader so that might explain why the other plants are still "lit")

    I'm really having a hard time troubleshooting that one. If you have any idea I'm taking anything

    Thanks a lot, keep up the great work (looking forward for Aura 2 integration as well ^^)
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, I planned improvements for fog rendering for update 2.2.
     
    dan_wipf likes this.
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, I will update and improve documentation from time to time.

    You can increase the moon light intensity here:

    upload_2019-4-29_15-40-19.png

    Please note: There are times/days where no moon is visible in night, when using realistic moon position in "Sky" settings. Use the "Simple" mode to have always have a moon in night.
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,903
    Hello, that is strange... I can't reproduce that jump in direct light intensity on my side. Could you please check your "direct light intensity" curve by clicking in it and check if there is something wrong?
    Also could you please check if disabling NGSS actually bring shadows back?
     
  48. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    209
    do you have any date range when this’ll be available?
     
  49. DamirS

    DamirS

    Joined:
    Aug 28, 2013
    Posts:
    15
    Hello,

    i am a happy customer of Enviro - great Package!
    Currently i encounter a transition problem as the fog seems to jump between weather changes. Can someone confirm this ? I cant really say which parameter it is :/ But you can see it in the Sample scene aswell - just switch between Clearsky and Cloudy1.
    happy day
     
  50. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    397
    Hello,

    I fixed the first issue with the time and the weird jump in intensity by reinstalling Enviro from scratch
    But I found out that I still have an issue making my grass goes all black when I enable the Cloud shadows
    I've just set the weather to Cloudy 3 and set the cloud shadow intensity to 1 and the cookie size to 1000 (the minimum)

    Without cloud shadows:

    upload_2019-4-30_17-23-12.png

    With Cloud shadows:

    upload_2019-4-30_17-23-23.png

    Even setting the cloud shadows intensity to the very very minimum the grass turns black instantly. It's only if that intensity is at 0 that the grass is green

    If you have any idea about that?