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. jason07

    jason07

    Joined:
    May 10, 2011
    Posts:
    33
    Hi,

    I am trying to tint the sky color to a specific value and am able to get close to what I want using the Weather Sky Mod under General Configs in my weather preset, but when doing this I no longer get scattering from the sun. I know I can adjust the alpha value of the Sky Mod color ramp to blend, but I need the alpha for that to be 100% to get a specific color value for the sky. The Scattering parameters have no affect in the profile when doing this though. Is there any way I can have the scattering to work and use 100% alpha value on the Sky Mod? If not, is there any other way to tint the sky? Thanks.
     
  2. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    Well my recent learning on how to achieve the sky colour you want was to start by removing the cumulus clouds and also the sky fog in the weather preset settings... then you have more chance to get the colour you want via the scattering wavelength and other gradients...
     
  3. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    8
    Hi,
    I just want to cycle night (I need to simulate time to move the stars at night) but I don't want day. Can I cycle through just night but not day?
     
  4. darshie1976

    darshie1976

    Joined:
    Jun 11, 2008
    Posts:
    924
    Hi,
    I have been tracking this issue for weeks now; and I think that I did narrow it down to Enviro.

    This is the gist: I create a terrain with Gaia, add Aquas and add some trees. Some are speedtree from the Gaia assets; others are from the "Trees bundle" from IL Ranch.
    Everything looks fine, until I add Enviro through the Gaia extension panel. At that point, the speedtree look fine, but any other tree asset added from the trees bundle looks "lit"; popping up in the fog at a distance. When the bilboard is converted in mesh, the tree blend in the fog.

    This happen only if I add the trees from the terrain tools; if I add the tree by hand, placing the prefabs on the terrain, the issue does not happen. I assume because there is no LOD,. so they remain meshes, instead of swap to the bilboard.

    Also if you look close, you can see that Aquas water surface is affected too; so it is not just the trees. The issue get more and more noticeable, if you change weather, with something that use heavy fog (the worst is during the storm setting)

    Could you please give me some assistance here, with the troubleshooting?

    tree on terrain.JPG
     
    Last edited: Jul 8, 2018
  5. ChaosriftGames

    ChaosriftGames

    Joined:
    Aug 25, 2017
    Posts:
    51
    I am having very similar issues to this. I have a scene where windows are popping out and the river from "RAM River Auto Material" glows in thefog while the rest of the landscape looks beautifully fogged. I think I know the answer to the windows, switch the material tot he supplied "transparent" one. But for the River, I really would love a solution because the flowing river would look amazing with the fog.
     
  6. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    In Unity 2018.1.6, when using Hard Shadows / Soft Shadows with Enviro - Volumetric Light, has anybody experienced lights turning off/on when a player moves at a certain distance from the light object?
     
  7. Paratope

    Paratope

    Joined:
    Jun 27, 2017
    Posts:
    20
    No worries at all, you're a busy dude. Sounds great, I'm looking forward to the update. Would you mind sharing a few with me prior to the update?
     
  8. Unity-IBR

    Unity-IBR

    Joined:
    Feb 28, 2015
    Posts:
    22
    Excuse me, could you tell me what your problem was and how did you solve it? I still have the problem of the bloom. Thank you
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, does the light also shine through when you disable the directional volume lighting? If you have light leaks you maybe need to modify the meshes. Please send me a message if it is only the effect and I will try to reproduce on my side and find a fix.
     
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Please try the "Scattering Color" gradient in EnviroSky inspector -> "Edit Profile" -> "Sky" category.
     
  11. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    The bloom effect was happening on the sun even when the sun went below the horizon. On top of that it was flickering on and off and also had a black spot in the middle

    After doing a little research it would appear that’s experienced by several people who are using PPS V2. I read that later branches had fixed these issues so updated to the latest and voila! Issues with bloom have gone :)
     
    Unity-IBR likes this.
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, the billboard shader from unity terrain doesn't work well with the fog effect that is based on the cameradepth texture. It need some modification to add fog rendering. Please send me a private message or mail with your unity version and I will send you a modified shader for your project.

    Same for AQUAS you need to add a special function to support fog and volumetric lighting on transparent materials. There is a step by step guide included in Scripts -> AQUAS Integration folder. If you using newest AQUAS the guide could be outdated. Please send me a message if you need help then. :)
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Here is a step by step guide to add fog support to RAM shaders. ;)
     

    Attached Files:

  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Do you already tried to increase the shadow distance? Does it increase the range you can go before it turns off? I will have a look into that to render spot and point light volumetrics with enabled shadows to render in non shadow mode when out of shadow distance.
     
  15. DevilCult

    DevilCult

    Joined:
    Jun 24, 2017
    Posts:
    37
    When i switch to my second camera which is instiated from a prefab, i get 2 moon in the sky, i wonder if that has something to do with that fix u had for the cloud not moving..
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Create a new layer with the name "Moon" or something like that. Assign that in EnviroSky inspector -> "Rendering Setup". Now remove that layer in your camera that you instantiate in runtime.
     
  17. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    135
    Sorry if this has been asked before but I'm trying to track down why Enviro is hitting my FPS so hard. As a comparison I ran Enviro in my scene and Time Of Day - both are dynamic skybox solutions. With TOD I hit around 500 FPS and with Enviro I am under 200 FPS. When I profile I see a huge amount of time in gfx.waitforpresent and lots of spikes related to this, which I don't see with TOD, I am running vsync off so the gfx.waitforpresent should not be there.
    Not a lot of information to go on I know but does this sound familiar at all, what am I missing that could be causing this?
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Do you use the default enviro settings? To better compare with ToD you should set clouds to "Flat only" and disable volumetric lighting (EnviroSky inspector -> "Feature Controls"). If you want to optimize performance you should start with clouds and maybe check out the "custom" clouds quality option. ("EnviroSky" -> "Edit Profile" -> "Clouds" category).
     
  19. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    725
    jStinson likes this.
  20. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    135
    Yes it's pretty much default ... all the time is lost in the waitforpresent, which I'm probably going to need to deep profile to see what it is doing. I tried turning off volumetric lighting and that made very little difference. I'll try flat only clouds but I feel like something else is going on as the profiler graph is very spiky and I'm running a GTX 1080 .... so something is clearly wrong.
     
  21. Hypertectonic

    Hypertectonic

    Joined:
    Dec 16, 2016
    Posts:
    28
    Is Enviro 2.0.4 out? Asset store shows 2.0.3...
     
  22. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    83
    Hey there,

    Just wondering if this asset can be used with a regular 2d style sky. I don't need dynamic clouds or anything like that, and I'm actually completely fine with having completely static skyboxes especially considering that I'm trying to create a performance VR spec game, but I'd like to be able to transition between different sky boxes and realtime lighting etc when my player is in different parts of my scene.

    Cheers.
     
  23. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    "No Shadow" works fine and only when choosing "Hard Shadows" or "Soft Shadows" have distance visibility issues. At first I tried increasing the Shadow Distance under Unity's Edit->Settings->Quality to first 200 then to 2000 value. But it did not make any difference. Later on, I found out when "Default" was NOT chosen in the Light's "Culling Mask", the issue happens. :D
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Currently finishing up the new update, testing multiple unity version and so on. I will upload to store later/tomorrow.
     
    Hypertectonic and RendCycle like this.
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, sorry that isn't supported. You could use your own skybox with enviro, but you would need to create your own skybox shader to be able to transition between different skybox textures.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Okay thanks, I will have a look into this.
     
    RendCycle likes this.
  27. kweinhold

    kweinhold

    Joined:
    Oct 18, 2015
    Posts:
    10
    I'm using interior zones to remove fog and reduce outside audio level. Some houses have non-rectangular shapes (like L or T shaped). When I add more than one zone on the interior zone, there is a noticeable brief audio volume increase when traveling between zones. I've tried butting the zones right up next to each other and also even overlapping them a bit (which turned out to be worse). Am I doing something wrong or is this a bug? Latest version of Enviro (2.0.3)
     
  28. Velcrohead

    Velcrohead

    Joined:
    Apr 26, 2014
    Posts:
    72
    Does enviro work with VR again yet? (More importantly, VR on 2018?)

    Having to use a different asset which isn't up to the standards of Enviro and it's frustrating me :p
     
  29. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    How do you check if a Weather has changed? I need something like getting a bool value. Tried referencing the Enviro 1.8.1 documentation but couldn't get the code to work. Is there an easy way similar to how we use EnviroSky.instance.GetActiveWeatherID () to get the current weather's ID? I also tried using the built-in feature in the EnviroSky Inspector "OnWeatherChanged" actions but the water system I am supposed to connect it with doesn't somehow get the changes and does not apply them in its Update/FixedUpdate. Thus I'm planning to directly call Enviro under the water system's Update/FixedUpdate section instead.

    Here is what's available in the documentation:

    Code (CSharp):
    1. EnviroSky.instance.OnWeatherChanged += (EnviroWeatherPrefab type) => { place action code here... }
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Please try to use the "Entry_Exit" trigger type in interior zone component and create/scale triggers for your doors.
     
    kweinhold likes this.
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, update 2.0.4 will fix possible issues with singlepass rendering in Unity 2018 and newer Unity 2017 versions. I uploaded it to the store for review this weekend.
     
    sharkapps likes this.
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, the event sounds like the best option here. Plese try this:

    Code (CSharp):
    1.     void Start ()
    2.     {
    3.         EnviroSky.instance.OnWeatherChanged += (EnviroWeatherPreset type) =>
    4.         {
    5.             DoOnWeatherChange(type);
    6.  
    7.             Debug.Log("Weather changed to: " + type.Name);
    8.         };
    9.     }
    10.  
    11.     void DoOnWeatherChange (EnviroWeatherPreset type)
    12.     {
    13.         if(type.Name == "Light Rain")
    14.             {
    15.  
    16.                 //Do something
    17.             }
    18.     }
     
  33. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    442
    hi @Vondox
    I have a 'strange' question:
    how are the volumetric clouds managed?
    I ask this 'cause I'm creating a script to create a skybox from your sky, to improve the framerates, but seems that the clouds persist also if I disable the enviro gameobject..

    thank you very much!
     
  34. icyfrog66

    icyfrog66

    Joined:
    Aug 15, 2017
    Posts:
    8
    Hi, I'm having a weird issue where the moment I add Enviro Sky to my scene, the entire scene goes completely dark. This happens regardless of if there was a directional light on before I added the Enviro Sky or not. Does anyone know about the cause of this issue?
     
  35. kweinhold

    kweinhold

    Joined:
    Oct 18, 2015
    Posts:
    10
    Would I be able to use that to set up something at each window, so that if the window is open the sound is enabled and when player walks away from open window it diminishes again? Windows can be opened/closed so it would have to work with code I'd add.
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, clouds are rendered directly on camera -> EnviroSkyRendering component. Deactivate that one or deactivate clouds rendering in EnviroSky inspector should solve your issue.
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Do you already tried to reimport enviro?
     
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Sorry, that isn't implemented at the moment. Maybe in a later update. :)
     
  39. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    442
    thanks @Vondox
    and another question:
    did you know why if I use a RenderTexture to take a screenshot the clouds are like this?


    thanks
     
  40. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    8
    Hi,
    I just want to cycle night (I need to simulate time to move the stars at night) but I don't want day. Can I cycle through just night but not day?
     
  41. clickmatch

    clickmatch

    Joined:
    Dec 3, 2012
    Posts:
    58
    That effect is kind of interesting.. like a glitch in the Matrix. Maybe it should be a feature!
     
    ghiboz likes this.
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, that's the reprojection feature kicking in to save perfomance. You can deactivate it in custom clouds quality settings.
     
    ghiboz likes this.
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Sorry, that isn't really possible out of the box. Best option would be not progressing time and change the rotation code of the stars.
     
  44. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    143
    why always this warning appears?

    The referenced script on this Behaviour (Game Object 'EnviroSky') is missing!

    my bad xd

    *******fixed***********

    sorry
     
    Last edited: Jul 18, 2018
  45. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    60
    having trouble getting my nights darker. I have tried adjusting ambient light settings during run time but see no diffrence. Anyone know of some good video tutorials?
     
  46. tgaldi

    tgaldi

    Joined:
    Oct 28, 2015
    Posts:
    82
    Hi, I found that when both is set for Clouds Mode, there is a memory leak that only shows up in a built executable.

    I noticed it after adding https://github.com/Tayx94/graphy

    I'm running Unity 2018.2, Windows 10, Standalone x64 build.

    I have not built a simple test project to confirm this is not something to do with my use case, where I add a player object and camera during runtime using AssignAndStart().
     
    Last edited: Jul 19, 2018
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Hello, there will be a dark night profile in 2.0.4. If you use flat or trilight you should see a difference when you set darker colors on left side in ambient light gradient. For "skybox" ambient mode you need to set intensity in unity lighting settings for 2.0.3. In 2.0.4 it will be controllable from enviro lighting inspector.
     
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,979
    Thanks for your report. I will try to reproduce your issue tomorrow. :)
     
  49. RyanDunne

    RyanDunne

    Joined:
    Mar 30, 2017
    Posts:
    13
    Using VR prefab or setting Single Pass VR makes my scene black. Any information on this?
     
  50. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    907
    Hey there, sort of an offtopic question but, why are the Enviro project files not namespaced at all?
     
    Tayx likes this.
unityunity