Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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. SciDechse

    SciDechse

    Joined:
    Jun 19, 2018
    Posts:
    3
    Thank you for the quick reply! The empty satellite object for leaving the feature enabled was just the puzzle piece I was missing. Now my custom objects finally appear behind the clouds as they should.
     
    Vondox likes this.
  2. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    108
    Hello, just bought this recently, and integrating it into a project. Very nice! Looks super promising.

    I was wondering...

    The included "day" and "night" ambient sounds do not loop properly. (This could be easily fixed by editing the sounds to loop properly and saving them as OGG rather than MP3).

    But whatever the case, I'm trying to assign my fixed OGG sounds to the AudioSourceAmbient and AudioSourceAmbient2 SFX Holders, but they seem to be assigned at startup, through code or something.

    I can't for the life of me figure out how to replace the sounds with my own custom sounds.

    Is there a place to do it, in the inspector, or in code?

    Is there a tutorial video, or documentation somewhere that explains how to customise the Ambient sounds (and the weather sounds, too?)

    Cheers!
     
  3. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    108
    I would have expected to be able to open the AUDIO category, and see all the audio clips there, and drop whichever ones you want there to set Ambient Day, or Ambient Night, or Light Rain, etc.

    Where does one do that?

    THANKS! :)
     
  4. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    108
    I think I have found it... it looks like one edits the Audio Configs on each individual Weather Profile in the project view. :)
     
  5. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    108
    I've gone through and replaced the DAY and NIGHT ambient loops on all relevant profiles.

    It takes a while to do and is a bit of a pain.

    I'd suggest to the developer that you replace your default loops in your package with my OGG versions (link below), so they loop perfectly for everyone. [Note: MP3 files don't loop seamlessly because they insert a bit of silence at the start and end of files.]

    That way, future releases will provide a nicely looping day and night ambience for everyone by default. :)

    https://drive.google.com/open?id=1bsAhf4pQE-ZIwTnKLJDB99k6xVzKFAJP
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, thank your very much for you work and contribution! I will add yours in 2.1.0 already. :)
     
    runningbird and Mark_01 like this.
  7. JDCustard

    JDCustard

    Joined:
    Oct 14, 2016
    Posts:
    3
    Does it support HDRP?
     
  8. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    108
    Nice! :)
     
    SickaGames1 likes this.
  9. edwaitingforyou

    edwaitingforyou

    Joined:
    Aug 9, 2016
    Posts:
    5
    Hi, could anyone please tell me how to turn off volumetric light entirely? While building the game Enviro sky keeps adding a volumetric light component to direct light rewrites shadow map repeatedly.
     
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, sorry HDRP isn't supported right now. But there will be an update with SRP support in near future.
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, please try and disable the volume light component on the directional light to make sure that it does not start up.
     
  12. fergision_83

    fergision_83

    Joined:
    May 3, 2018
    Posts:
    3
    Hello, I am looking into your system as I am needing a changing weather system for the game I am working on. I have read that the snow/ rain is particle effects attached to the player which will save GPU. But my question, stupid or not when using Occlusion Culling with these effects would the system still run without much of a framerate drop when moving the player and of course rendering with Gaia terrain editor, would my frame take a bigger hit? Again, stupid? I'm sure of it but one is just wanting more info on. :) Thanks
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, enviro uses unity particle systems for weather effects like rain and snow. To get a dense effect without spending too much particle those effects will be only played around the player. Moving, Occlusion Culling or a big terrain should not be a problem. Performance wise the amount of particles and their settings will have most impact.
    But you can tweak those settings, use your own effects or some effects from asset store. There even is a global quality setting to change the particle amount in runtime, to be used in a graphics menu for example.
     
  14. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    This sounds ideal, but I do not see a component called "envirozone". There are many enviro components but none with that name.
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi, the script is called "Enviro Zone", but listed as "Weather Zone" in component menu. Hm may need to change that. :D
     
  16. fergision_83

    fergision_83

    Joined:
    May 3, 2018
    Posts:
    3


    Thank you for getting back to me about my question. I greatly appreciate it :)
     
  17. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    Weather Zone seems to do the job, but it is adding fog outside of the GO cube I created as well. Should the fog change on entry/exit as you mention above? Is this dependent on the collider on the cube or is it strictly volume-based? Thank you!
     
  18. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    Hows the update going?
     
    mons00n likes this.
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, sorry currently it will apply fog on your complete scene only. A new fog system that can handle this is already planned. But no ETA yet. :/
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi, will try to upload 2.1.0 this weekend. Only need to finetune the default weather presets now and update store information. Documentation already updated and all beta error reports fixed on my side. Unfortunaly I got some fever starting today. Really bad timing, I know. :D But I still should manage to release full version now and lite version will follow next week.
     
    Firlefanz73 likes this.
  21. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    OK, that may work for me as I need increased fog "everywhere" when the player is in a specific area of the scene. What is the GO for though in your example? Just a place for the script to reside? I assume I can just disable/enable the GO and get the fog changes attached. Where the GO is relative to the player has no impact.
     
  22. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    I'm running on a slightly older Enviro, but I noticed that the directional light (sun) rendering shadows at night causes a huge GPU problem. Backfacing through just about everything I assume. I'm going to just code it off/on during the night/day. Thought I should mention looking into it if it's not something that was already added.
     
  23. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    Just to follow up, I have everything working at this point. I looked at the script and found that it managed the triggering. It had not been working at first as I had not understood the scaling of the collider. It defaults to 100x and I had set my cube to the collider size I needed, so I ended up with a very large collider. I dropped the scale to unity for the collider and all is good now. BTW I am sick at the moment as well, so I mean it when I say "get well!".
     
  24. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    127
    I love the look of the transitions between weather and see how to alter their speed, but this brings to mind a feature request.

    I'd like very slow transitions between weather (e.g., 0.01 or lower), as they are the most realistic. It would be nice if a playerclient logging into a persistent game could be told the previous weather prefab and the new one, as well as a parameter that describes the progress of the transition so that the player will experience exactly the same weather effect as other players.

    Tony
     
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi, sorry not sure what's going wrong here. Enviro does not changes shadows in anyway. Maybe check your Unity lighting configuration.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, thanks for your feature request. I will add it to my list and have a look into that later.
     
  27. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Ya something about the sun being beneath my terrain (night time) but still having soft shadows turned on causes big spikes in my GPU, like +200% Turning the shadows of the sun's direction light to off eliminates the GPU usage. It doesn't seem to always happen though... a bit confused by it myself.
     
  28. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    You can add a large cube as a "blocker" for the sun shadow or reduce sun shadow intensity as it nears horizon.
     
  29. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    Enviro and Weather Maker? hmm....
     
  30. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    This is just a tip for sun shadows at horizon, nothing more... :)
     
    Vondox likes this.
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Ahh okay, that one is already fixed in newer enviro versions. There will be no "backlighting" of sun/moon if they are beneath the horizon anymore.
     
    mmaclaurin and malkere like this.
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Enviro 2.1.0 is online in asset store!

    Attention!

    If you update from an older enviro version you have to delete the old enviro folder first! But you can backup your profiles and weather presets and use them with 2.1.0 later.

    Also clean your scene from the old enviro objects and check the documentation for the new setup of 2.1.0.

    Contact me if you run into any issues while updating or if you find any bugs. :)
     
    mmaclaurin, gecko, jason07 and 3 others like this.
  33. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    I'm using the fog preset and have the fog start distance at 0, but the fog instead starts some distance away. I understand the exponential nature but right now it looks like a cone of fog a fixed distance from the player, instead I need some level of fog much closer. What else can I tweak to bring this start in closer? I tried a negative start distance and increasing the fog exponentlial values but these do not impact the near fog. Is this a Unity setting perhaps?
     
    Last edited: Mar 19, 2019
  34. ejrgames

    ejrgames

    Joined:
    Aug 22, 2016
    Posts:
    2
    Hi,
    After updating to 2.1 I've got this error:

    NullReferenceException: buffer is null
    UnityEngine.Camera.RemoveCommandBuffer (CameraEvent evt, UnityEngine.Rendering.CommandBuffer buffer) (at C:/buildslave/unity/build/Runtime/Export/Camera.bindings.cs:296)
    EnviroSkyRendering.OnDisable () (at Assets/External/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSkyRendering.cs:253)

    Ma camera is a SteamVR camera.

    UPDATE: I've managed to fix it. There was some old components still on the scene.
     
    Last edited: Mar 19, 2019
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi, could you please send me a sceenshot? Also please send me your profile and weather preset.
     
  36. zetingq

    zetingq

    Joined:
    Dec 8, 2016
    Posts:
    26
    Hello, Enviro - Sky and Weather updated from 2.0.5 to 2.1.0, the water went wrong, and now the water shader went wrong.
    The material of the River Auto Material, which needs to be blocked by fog, has been modified by the shader
    QQ截图20190320145551.png QQ截图20190320145617.png


    Now, I need fog to block the flame particles, but I don't know how to modify the shader of the particle material. The current flame is a standard particle material.
    What should I do in this situation?

    QQ截图20190320150750.png
    QQ截图20190320150002.png QQ截图20190320150507.png
     
  37. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Hello I have 2 questions first is, where I find color you pass somewhere to the distant and high fog. I see, that fog color (unity built in variable) changes, but the phase of the fog color change is little bit forward so you have nice yellowish fog on the mountains and fog I have to pass into the water is blue (because somehow it does not affect it, as it use reflection camera and all these rendering does not take effects into count). But hour before it was also yellow. So I would like to make these colors to match I can provide you screenshots if needed.

    P.S. well I spotted aquas integration sorry. Despite I have it almost rewritten the aquas lite it could work :) Eh no... it has somehow issue with this line: #include "Assets/Enviro - DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc" does not see it on that path. And as I see path is correct.



    the second question is, I would like to make sunrises at the same time (because of AI, which gets up with sunrise at 6 o'clock) how to best do that. I changed lattitude on -37 it works for spring, but during summer i get almost a polar night. It does not make much sense as we are on 57th lattitude and sun is always way higher on the horizont during winters. So i think I will have to make something which will move lattitudes over time and UTC, to match 6.00 as sunrise.
     
    Last edited: Mar 20, 2019
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello,

    oh yeah sorry for not adding this information you need to change the path in your modified shaders from:

    #include "Assets/Enviro - Dynamic Enviroment/Resources/Shaders/Core/EnviroFogCore.cginc"

    to:

    #include "Assets/Enviro - Sky and Weather/Core/Resources/Shaders/Core/EnviroFogCore.cginc"

    About your particle shader. There are some basic particle shaders included but they don't support emision. I will have a look to create a particle shader with fog support that also got emission later,
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello

    About fog on water: You need to change the path like I described the post above if you using enviro 2.1.0. What water shader do you using AQUAS Lite? Not sure if the AQUAS guide will work there without minor modifications.

    About your sunrise time:

    Check the Sky section of EnviroSky -> Edit Profile. There you got a option "Sun and Moon Position" set that one to "Simple". Maybe also reset Lat and Long to zero. The sun should rise at a bout 6:00 for whole year now.
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, looks like it is the volume lighting. So try to tweak the Scattering and Extincion Coef in EnviroSky -> Edit Profile -> Volume Lighting section for a globaly change. Or tweak the Volume lighting intensity for each weather preset.
     
  41. MrBeros

    MrBeros

    Joined:
    Aug 27, 2015
    Posts:
    27
    Hello @Vondox
    I´m irritated by Enviro Pro, i have the "fullversion" is that Enviro Pro? Because i dont have the SRP Setup in my Enviro Sky Manager.
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, like I already mentioned in this forum the "Pro" upgrade will be paid upgrade to support SRP. Currently planned around (10-20$).
    You only need the pro upgrade if you are planning to use enviro with LW or HD SRP.
     
  43. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Thank you it works. I also spotted probably 2 glitches, not sure if you are aware of them. I can provide videos if needed. 1.st once the sun rises directional light jumps from the moon to the sun. I understand it is probably because there is just one dir. light. So it could fix some fadeout moonlight before switch or 2 dir lights (one for moon one for sun). Also there was a glitch when dir. light intensity was below 0.01% unity shaders put point lights as main lights into shaders instead, so I fixed it moving curves slightly up when nothing shines. Just a note if you would one day decide for 2 lights and turn them off when no moon or sun on the sky. So would be good to keep checker to keep always one dir light active for such cases.

    Other glitch is that moons time by time jumps on the sky by let say 50% of the moon size. it seems like its position is lerped, but time by time it does some extra corrections. Not sure what causes this tried to find it in the code, but you probably know it better.

    Eh one more extra glitch. Foggy preset seems heavilly affected by lighting like you can see nothing one direction towards the sun and almost into infinity if you look other way. I have unity 2017 LTS so probably it can be caused also by this. Also setting cloud shadows higher than 0 causes glitches when screen blacks out for few frames, and water aquas shader gets purely black.
     
    Last edited: Mar 22, 2019
  44. Firlefanz73

    Firlefanz73

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

    I let the user decide in a config About the Quality.

    These both lines do not work anymore:

    EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    EnviroSky.instance.volumeLighting = true;

    How to set these?

    Here the complete Settings, is there anything more now that is important for Performance I can set?

    Code (CSharp):
    1.         if (Globals.Configdata.EnviroSimple)
    2.         {
    3.             EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    4.             EnviroSky.instance.LightShafts.sunLightShafts = false;
    5.             EnviroSky.instance.LightShafts.moonLightShafts = false;
    6.             EnviroSky.instance.fogSettings.useSimpleFog = true;
    7.             EnviroSky.instance.volumeLighting = false;
    8.             EnviroSky.instance.qualitySettings.GlobalParticleEmissionRates = 0.4f;
    9.             Globals.Configdata.MaxParticles = 6;
    10.         }
    11.         else
    12.         {
    13.             EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Both;
    14.             EnviroSky.instance.LightShafts.sunLightShafts = true;
    15.             EnviroSky.instance.LightShafts.moonLightShafts = true;
    16.             EnviroSky.instance.fogSettings.useSimpleFog = false;
    17.             EnviroSky.instance.volumeLighting = true;
    18.             EnviroSky.instance.qualitySettings.GlobalParticleEmissionRates = 0.8f;
    19.             Globals.Configdata.MaxParticles = 15;
    20.         }
    Thanks :)
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, thanks for your report!

    About the sun and moon light switch: Best option right now would be tweaking the two light intensity curves for a smoother transition. I also will have a look if I can improve that in code. A two directional light option would be visually best, but comes with a quite big performance impact in scenes with a lot of objects. I also will change the default settings to make sure that lights won't below 0.01 intensity. Thanks :)

    Unfortunaly I cannot reproduce the moon "jumping" on my side. Do you please could say a exact date and time where you see that issue?

    Strange, for I also get good fog on the other side. The side with sun in view is just brighter. But I can add an option to disable that effect and have same fog color all around.

    About cloud shadows:
    Never seen these black frames, and not sure why that should happen. But the issue with water shaders is known and there is no real fix from my side possible. Some shaders just don't play nice with directional light cookies. You can reproduce that with just a directional light with a standard cookie texture applied. As a workaround I already posted a solution here in forums where we use a second directional light that mimics the first one. With a layer setup you can make sure that second light only affects water and the main light the rest of scene.
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, these two have changed to:

    EnviroSkyMgr.instance.useVolumeClouds = true;
    EnviroSkyMgr.instance.useVolumeLighting = true;

    But there is no new important performance settings, maybe besides that you can use the lite version in same project and switch between those enviro versions. You also got a new clouds option with particle based clouds.
     
  47. Waterlane

    Waterlane

    Joined:
    Mar 13, 2015
    Posts:
    188
    Hi - really like being able to see the changes in the scene view - Big Help.

    I've a problem though. I've a simple sky setup and it displays fine in the game view but with streaks over it in the scene view (image attached). 'just let me know if you need any more info in particular

    (PS I mentioned before - but are you likely to support Aura 2)
    Cheers.
     

    Attached Files:

  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, I know about those streaks in scene view and will work on a fix in one of the next updates. They are related to height fog when viewed from "inside" of the height fog and like you mentioned it is only in scene view and not in final game.

    Btw. there will be a Aura 2 Integration in next update aswell! ;)
     
    Waterlane likes this.
  49. WeArePrism

    WeArePrism

    Joined:
    Jan 7, 2019
    Posts:
    2
    Hi - question about stars, etc at night

    We only see stars occasionally during the night cycle - and often only on the top half of the sky. How do we get the sky filled with bright stars the entire night? I assume that weather is blocking the stars, but unsure on how to turn down clouds to ensure a clear sky during the night. Thank you!
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, yes sounds like that you having clouds at night that block stars. So switching to "Clear Sky" weather would bring them back. By default enviro is using auto random weather changes. You can disable these in EnviroSky -> Edit Profile -> Weather category -> Update Weather. You also can change weather by code using EnviroSky.instance.ChangeWeather("Clear Sky"); for example.
     
    WeArePrism likes this.