Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

[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:
    2,017
    Hi, update is planned in late May.
     
    dan_wipf likes this.
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Thanks, for your report. I will have a look into this before I upload 2.1.2 now. Besides this 2.1.2 is pretty much ready for release.
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, looks like that your grass shader does not work with directional light cookies. Please send me your shader in a private message and I can have a look into this.
     
  4. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    Hey, the star twinkling effect in 2.1 is neat, but I'd actually like to disable it. I can set the twinkle rate to 0, but there still seems to be a spleckled-black overlay in front of the Stars cube map. Is there a way to remove that?
     
  5. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, thanks for your suggestion. I will add an option to disable stars twinkling in 2.1.2.
     
    gecko likes this.
  6. BrandStone

    BrandStone

    Joined:
    Jul 21, 2014
    Posts:
    66
    @Vondox I’m a bit behind with the Enviro roadmap. I know I saw in some of your posts that you are working on hdrp version. Is it out already?

    I would like to upgrade my project to hdrp and enviro is driving some core ai mechanics (based on time of day).
     
  7. Monorio1

    Monorio1

    Joined:
    Dec 10, 2018
    Posts:
    17
    Is there a way of making the weather map pan in the direction of the wind zone? I mainly want Cloud shadows on the ground to go in the same direction as my fog.
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, sorry srp support isn't out yet.
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, it does as when you use the "Use WindZone Direction" option in "Edit Profile" -> "Cloud Settings" -> "Wind Settings". Also make sure to set a positive "Weather Anim Speed Scale".
     
  10. Sam512

    Sam512

    Joined:
    Jan 13, 2019
    Posts:
    178
    Hello, folks!
    Anyone can tell me why I get fps drop from 4 PM to 6:30 PM in the evening and 6 AM to 9 AM in the morning?
     
    Last edited: May 2, 2019
  11. Monorio1

    Monorio1

    Joined:
    Dec 10, 2018
    Posts:
    17
    Would it be possible to get a fog speed multiplier so I can crank the wind force for my trees and avoid having fog being incredibly fast
     
  12. DamirS

    DamirS

    Joined:
    Aug 28, 2013
    Posts:
    16
    @Vondox Can you please check the Volumetric Light in Single Pass Stereo ... It looks like the right eye got a slight offset.
    Happy Weather
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, sounds like it is related to raising shadow casters at dawn/dusk, You naturally will see more shadow casters when sun stays low.
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, thanks for your feature request. I will add this in next update. :)
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, what Unity version do you tested and what VR SDK you use? Single-pass rendering sometimes tend to break with Unity updates. I will take a look and provide a fix, once I know your version.
     
  16. DamirS

    DamirS

    Joined:
    Aug 28, 2013
    Posts:
    16
    Yeah sure , sry for not thinking on that ;) Its 2018.3.12f1 .
    I am thinking to use Nvidias VRWorks ... did you tested it with enviro ?
    yours
    Damir
     
  17. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Just Update 2.10 to 2.11 and get some problems
    Same profile and time , the moon light(different rotation angles??Why?)is gone.
    How can I fix it?

    ENV_SameTime.jpg (Same time)
    ENV_Shadow.jpg Ver2.10
    ENV_NoShadow2.11.jpg Ver2.11
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, sorry for that one. Please open the EnviroCore.cs and search and for this line and remove the "//":

    Code (CSharp):
    1. Components.DirectLight.rotation = Components.Moon.transform.rotation;
    I will finish 2.1.2 now and upload it to the asset store today.

    Code (CSharp):
    1. Changelog 2.1.2:
    2.  
    3. ---- Fixes
    4. * Fixed issue that resets the "progress time" mode.
    5. * Fixed issue that destroys the weather effects causing a null reference error.
    6. * Fixed incorrect moon phases finally.
    7. * Fixed moon light rotation.
    8. ---- Volume Clouds:
    9. * Greatly improved volume clouds performance.
    10. * Greatly improved lighting and visuals of volume clouds.
    11. * Greatly improved weather map generation speed.
    12. * Added more control over weather map generation. This brings more different cloud formations.  
    13. * Added mip levels to volume clouds 3D textures.  
    14. * Added new slider to control the clouds height.
    15. * Added new options for clouds formation control in weather presets.
    16. * Minor changes in volume clouds interface.
    17. ---- General
    18. * Reworked all standard weather profiles.
    19. * Reworked standard profiles sky and lighting settings.
    20. * Some code rework in EnviroSkyRendering script.
    21. * Added a post effect stack v2 profile I used while developing.
    22. * Added a new setting to define a temperature when snow starts to melt.
    23. * Disabled stars twinkling when setting stars twinkling rate to "0".
     
    Last edited: May 3, 2019
  19. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    Changes look great!

    > Reworked all standard weather profiles.
    So if I've tweaked the weather profiles quite a bit, should I not update them....but then would I be missing some good improvements?
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    You can keep them. But as there changed a lot you have to go through your weather presets and set the volume clouds settings.
     
    gecko likes this.
  21. nyarsulik

    nyarsulik

    Joined:
    May 7, 2014
    Posts:
    54
    Vondox, I was going to just start using the script to control the time and weather preset settings (to get around the reset of the progress time item) but I couldn't correctly figure out how to change to a specific weather preset. When I try to read the current active it comes back null, and I can't seem to output the list of available. Is there a full C# example that someone could point me to on how to change the current weather preset? Thanks!
     
  22. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Hi,
    Just downloaded the latest version.
    Got this compile error.
    Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroVolumeLight.cs(423,8): error CS0619: 'VRSettings' is obsolete: 'VRSettings has been moved and renamed. Use UnityEngine.XR.XRSettings instead (UnityUpgradable)'

    Any solution for this?

    Thx.
     
  23. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    138
    Hi @Vondox

    A couple of sky materials are being written to when we enter play mode. Could you consider cloning them? They're showing up as changed in source control.

    /Assets/Enviro - Sky and Weather/Core/Materials/Enviro_CloudsLayer_1.mat
    /Assets/Enviro - Sky and Weather/Core/Materials/Enviro_CloudsLayer_2.mat

    Thanks
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, please check the documentation.

    To change weather:
    Code (CSharp):
    1. EnviroSkyMgr.instance.ChangeWeather(int weatherID);
    2. EnviroSkyMgr.instance.ChangeWeather(EnviroWeatherPreset weatherPreset);
    3. EnviroSkyMgr.instance.ChangeWeather(string weathername);
    To get a list of all weather presets (Please note that weather list will be generated based on all your zones in first frame after start. So you may need to use a coroutine with "yield return null" when you want to get weather list at start.)
    Code (CSharp):
    1. List<EnviroWeatherPreset> presets = EnviroSkyMgr.instance.Weather.weatherPresets;
     
    Marcos-Elias likes this.
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, please run the "API Updater" ("Assets" -> "Run API Update...") This also wil be fixed with 2.1.2 that should be online on monday.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hi, thanks for your suggestion. I will implement that in next update. :)
     
  27. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    82
    @Vondox hello I use the manager and when I uncheck dont destroy on load in edit mode in play mode he is reactive .
    if I remove it in the script it will still directionnal light and enviro effect
     
  28. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Thanks. Fixed.

    is there a demo scene in a folder somewhere that shows the weather effects right out of the box, by just hitting play, or do we have to build one?

    I'm new to this asset. The Enviro-Sample Scene demo appears to need to be built up a bit, before seeing clouds and other effects,.... unless i'm misunderstanding how this works.
    thx.
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, sounds like that you have saved the Enviro Sky Manager as prefab. Please either don't make it a prefab or make sure to "Apply" changes you made to your prefab, then it won't reset those in play mode.
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, please click on the "Enviro Sky Manager" object in sample scene and then click -> "Create Standard Instance" -> "Activate" -> "Auto Assign". Then everything is ready to go. Please read through documentation for more information.
     
  31. schildawg

    schildawg

    Joined:
    Feb 13, 2018
    Posts:
    17
    In Legend of Zelda: Breath of the Wild, they have flocks of birds flying around in the sky. I am pretty sure they are not individual birds (at least in the distance) but some sort of particle effect, or sky overlay. Please consider this as a feature to add to Enviro sometime in the future.
     
    transat likes this.
  32. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    424
    I'm struggling a little with the night to day and day to night jump

    With the slider "day night switch" set by default, I have a clear jump of Directional intensity from 0.XX to 1.4/1.5
    If I set the slider all the way to the left, the transition from Night to day is smooth but the Day to Night is a big jump from very low luminosity to high one (moon)
    If I set the slider all the way to the right, it's the opposite (day to night transition is smooth, the other one is not)

    When setting it in the middle, they both have a clear cut and I can't find a way to have both day to night and night to day to transition smoothly

    EDIT: Actually the jump is all the time whatever the slider is. It's just that it happens earlier or later. But this jump from ~0.0XXX light intensity to 0.8 or 1.x is really huge

    Also I just noticed that it's not only the light intensity that changes a lot. But also the light rotation that completely change.

    I thought this could be a 2 directional lights solution with the sun and the moon but as it's a one light solution, there might be something wrong here

    This is with the default settings (Enviro 2.1.2)

    6:59AM
    upload_2019-5-4_20-29-8.png

    A minute later:
    upload_2019-5-4_20-29-15.png
     
    Last edited: May 4, 2019
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hi, yeah in your case with a late switch to sun at 0.55 sun altitude and that day where no moon is around at that time you will see such big jump.

    If you set "DayNight Switch" back to default of around 0.45 you won't see that big jump, as it switches to the sun the moment it shows up at horizon and will start with a way lower intensity.

    If you check both intensity curve, sun is based on sun altitude and moon curve is based on moon altitude to make sure that it won't "backlight" your scene at night where moon is not visible (under your terrain).

    upload_2019-5-4_21-50-39.png

    If you really need such late switches I only can imagine a fast solution would be using a lerp to have a smoother transition. I will implement that in 2.1.2 now. I also can send you an hotfix.

    The other and most realistic solution would be using two directional lights like you already mentioned. Enviro currently only uses one for obvious performance reason. You can test that in your scene by adding another directional light. If the performance lost is not a problem for your project that would be the way to go. I also can implement that as an option, but it will be in 2.1.3 then.

    Hope that helped you! :)
     
    Last edited: May 4, 2019
  34. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    424
    Thanks for all those explanation
    The hotfix with the lerp is very interesting to me

    And for the longer shot, I do think a dual light system could be very neat, the second directional would be totally off at night (and vice versa) while their position/rotation would be way more accurate, I'm totally for that for the Enviro Standard version targeting desktop, performance seems ok with a dirty non optimized test
     
    Vondox likes this.
  35. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    I've updated to 2.1.2, but getting an error at runtime -- but I sure can't find where to assign the cloudShadowMap....where is it?

    UnassignedReferenceException: The variable cloudShadowMap of EnviroSky has not been assigned.
    You probably need to assign the cloudShadowMap variable of the EnviroSky script in the inspector.
    EnviroSky.UpdateCloudShadows () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSky.cs:749)
    EnviroSky.Update () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSky.cs:689)
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hi, please try to click on "Apply all Settings" in your Enviro Sky instance. This will regenerate the clouds shadow render texture. If you still getting errors take a look in top of your console you may got another error. You also could just delete your instance and re-create it.
     
  37. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    that fixed it, thanks!
     
  38. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    Well, spoke too soon. Now I get a lot (like 30,000) of this error -- any idea?

    NullReferenceException
    UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Transform parent, System.Boolean instantiateInWorldSpace) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.bindings.cs:264)
    UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Transform parent, System.Boolean worldPositionStays) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.bindings.cs:300)
    UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Transform parent) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.bindings.cs:295)
    EnviroSky.PreInit () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSky.cs:194)
    EnviroSky.OnEnable () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSky.cs:160)
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Oh yeah, thanks for your report. There is a small typo... I will re-upload 2.1.2 with a fix now. Also looks like that you may haven't assigned the lightning prefab in your Profile -> "Weather Settings".

    I will send you an hotfix now.
     
  40. WeArePrism

    WeArePrism

    Joined:
    Jan 7, 2019
    Posts:
    2
    Hi - quick question about custom sky. Client is requesting a custom sky box during the day, but wants the default stars at night. Is there still no way to do this in Enviro without handling the stars at night on our own? Any way to edit the default sky box to include our sky during the day? Can we transition between the custom sky box and the default night stars sky box? Could our sky simply be some sort of card in the background? If we do need to handle stars on our own - any examples of how to go about doing it? Thank you!
     
  41. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,135
    Is the hotfix useful for those who not have seen that error yet?
    Then I would like to have, too thanks.

    Since I got Lightshafts running, too, my game Looks so Beautiful, great :)
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, please send me a private message with some further information what you actually need in your skybox. For example do you need moon with phases and a dynamic sun disc? What's about atmospheric scattering. Do you want a mix of the default sky and your skybox texture on day or only your skybox texture on day that will get darker until night with stars.
     
  43. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,135
    Hello Friends of Enviro,

    did ever anybody try enviro for a 3D space arcade game? Like using it's lighting of Course, but Maybe it's volume Clouds and stars combines or something like that? Just changing Colors and see how it Looks or some better ideas or any experiences?

    I want to create a 2D sytle arcade shooter with Player flying upwards, but with 3D GFX.
    Maybe there are Presets already ?

    Thanks :)
     
    Last edited: May 7, 2019
  44. Monorio1

    Monorio1

    Joined:
    Dec 10, 2018
    Posts:
    17
    I saw earlier in the thread that you would be looking into Amplify shader editor to add the fog support for unlit or transparent material. Has there been any progress on that end? We have a pretty big piece of unlit shader in our project and it's really punching through the fog.
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hi, haven't tried something like that yet. Enviro isn't really designed for this genre, so you may have to modify some parts to make it work.
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, sorry no custom node for amplify shader editor yet. Could you please send me one of your unlit shaders?
     
  47. Calum

    Calum

    Joined:
    Mar 14, 2015
    Posts:
    11
    Hi there, I don't know if this is an Enviro problem or Volume 3 problem or both lol but I'm getting a compile error when I try to go in to play mode....

    Assets\Enviro - Sky and Weather\Core\Scripts\3rd Party Integrations\FogVolume3 Integration\EnviroFogVolumeIntegration.cs(376,29): error CS1061: 'EnviroSkyMgr' does not contain a definition for 'GetCamera' and no accessible extension method 'GetCamera' accepting a first argument of type 'EnviroSkyMgr' could be found (are you missing a using directive or an assembly reference?)

    I've tried clicking the activate Volume Fog 3 in Enviro Sky Manager but it doesn't work giving the error above.

    Hope someone can offer up a solution :) thanks in advance.
     
  48. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,135
    Hello,

    like descriped a side earlier, I made a prefab and want to use Enviro on both PC Standalone build and Android build.

    Code (CSharp):
    1.         Instantiate(Resources.Load("Enviro Sky Manager", typeof(GameObject)));
    2.         if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) //#if UNITY_IPHONE  #if UNITY_ANDROID
    3.         {
    4.             //Activate and assign/start lite version
    5.             EnviroSkyMgr.instance.ActivateLWInstance();
    6.             EnviroSkyMgr.instance.AssignAndStart(Camera.main.gameObject, Camera.main);
    7.         }
    8.         else
    9.         {
    10.             //Activate and assign/start standard version
    11.             EnviroSkyMgr.instance.ActivateHDInstance();
    12.             EnviroSkyMgr.instance.AssignAndStart(Camera.main.gameObject, Camera.main);
    13.         }
    Works fine in PC standalone.
    When in Android I get the following two Errors:

    Assets\Scripts\GameManager.cs(173,35): error CS1061: 'EnviroSkyMgr' does not contain a definition for 'ActivateLWInstance' and no accessible extension method 'ActivateLWInstance' accepting a first argument of type 'EnviroSkyMgr' could be found (are you missing a using directive or an assembly reference?)

    Assets\Scripts\GameManager.cs(179,35): error CS1061: 'EnviroSkyMgr' does not contain a definition for 'ActivateHDInstance' and no accessible extension method 'ActivateHDInstance' accepting a first argument of type 'EnviroSkyMgr' could be found (are you missing a using directive or an assembly reference?)

    Any idea? Thanks :)
     
  49. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    138
    Hey Vondox,

    I was wondering if there's currently a way to shut off the time-based interpolation of values in Enviro. At runtime I like the interpolation, but when I'm editing I find it makes it more difficult to get feedback on values as I change them. Thanks.
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,017
    Hello, thanks for your issue report. I wil send you an hotifx for that one and include fix in next update.
     
    Calum likes this.
unityunity