Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,099
    Can you make enviro materials "enable instancing"?
     
  2. tork12

    tork12

    Joined:
    Dec 16, 2017
    Posts:
    39
    Thanks for the reply. I can't code at all = absolute zero ability, so have to rely on figuring out how to do it within Enviro settings interface. I will take a look at the profile weather settings and see what I can do.
     
  3. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    392

    Did you checked out also before night like evening when there is also some day light on scene. Sure I will check out on 2.02 ;)
     
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Sorry, I am currently not sure why it does that error on your side. Do you use multiple weather zones? If not you could just disable the creation that collider on default zone. (Check the EnviroZone script).

    For an real fix we have to take look what scale your envirosky object have and you may want try to change the collider scaling in envirozone script (directly in script for the default zone) It is hardcoded right now. That could fix the issue when it is related to scaling problem with the collider.

    To have fog on multiple cameras you could take a look into AddionalCamera component. Create a copy and deactivate the addional lighshafts creation. Also you may want to deactivate the clouds rendering in EnviroSkyRendering component when isAddionalCamera is true. Not tested but maybe working for you.

    For fog-color maybe maybe create your own gradient and evaluate the color by using EnviroSky.instanceGameTime.solarTime. But you also could use the fog gradient of weatherpresets of course.
     
  5. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    This kind of "chaining" of weather changes isn't supported at the moment. But sounds like a nice idea to be added in future. ;)

    For now you can try to tweak the weather transition speed setting in your profile -> weather category like malkere already mentioned.
     
    Teila likes this.
  6. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,099
    Hey again! How is enviros fog intergrated with aquas? I need it to cast fog on the water.

    Thanks
    M
     
    username132323232 likes this.
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Currently you have to follow a guide I written to modify the aquas shader to display fog and volume lighting:

    AQUAS with Enviro Guide
     
    mattis89 likes this.
  8. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,140
    Thank you for the info Vondox, additional camera is looking very useful! I hope you can help me with the last bits. I'm trying to get on

    main camera: clouds, fog, light shafts, etc.

    and on the additional camera: fog and light shafts only.

    I've almost got it working, the clouds on the additional camera are drawing over the main camera though, and the sky luminence is whitewashing everything. The additional camera being my "near" camera, the main being my "far" camera. Thanks!
     
    Last edited: Jan 31, 2018
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Okay. Take a look in EnviroSkyRendering script and search for this line:

    Code (CSharp):
    1.     if (EnviroSky.instance.cloudsMode == EnviroSky.EnviroCloudsMode.Volume || EnviroSky.instance.cloudsMode == EnviroSky.EnviroCloudsMode.Both) {
    and change it to this:

    Code (CSharp):
    1. if (EnviroSky.instance.cloudsMode == EnviroSky.EnviroCloudsMode.Volume || EnviroSky.instance.cloudsMode == EnviroSky.EnviroCloudsMode.Both && !isAddionalCamera) {
    Not tested but should stop rendering the volume clouds on your additional camera. But about the "whitewashing" I am currently not sure. :/
     
  10. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    114
    Hey, amazing asset! It gave a whole new life for my project. The latest versions with huge improvements in clouds are fantastic!

    I have three questions about this system:

    1 - How can I define the clouds to be flat by default, through code? I tried this:

    //0 = none, 1 = both, 2 = volume, 3 = flat
    EnviroSky.instance.cloudsMode = (EnviroSky.EnviroCloudsMode)3;

    Right after instancing EnviroSky in runtime, but it does not work (if called right after instantiating it). If I call it with a Invoke method (passing 1 or 2 seconds) it works, but it is not the perfect solution, since the volume clouds appears for a limited time. Or maybe... Will it work with a coroutine, waiting one frame?

    I use EnviroSky prefab instantiated at runtime to keep it completely unloaded for users with basic PCs or old GPUs (where I use a static skybox), and cloud settings will be an option for the user. Here with a GTX 1050TI volume clouds consume lots of FPS, with flat clouds it almost double (from 50 to 95, 100 in my dense urban areas).

    2 - How can we change the clouds moving speed?

    3 - All the raining sounds seems to be not seamless, could you check that, please? I have edited them, but on updates they will be replaced again... When they are playing we can listen to the end and the start of the sounds, it should be seamless to play smoothly.

    Thanks in advance!
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Hello, thanks! :)

    1.)
    Please try this to set to flat clouds:

    Code (CSharp):
    1. EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    Yea you have to delay one frame, as enviro will be setting up in the first frame. (Searching for weatherzones, instantiate all needed particle systems and so on.) I would use a coroutine:

    Code (CSharp):
    1.     void Start ()
    2.     {
    3.         StartCoroutine(SetThingsWithDelayAfterStart());
    4.     }
    5.  
    6.     IEnumerator SetThingsWithDelayAfterStart()
    7.     {
    8.         yield return null;
    9.         EnviroSky.instance.ChangeWeather("Cloudy 1");
    10.     }
    Next update will include a few performance improvements for volume clouds like temporal reprojection, a lower quality istance clouds option and saving rendering time by lowering the sample count when clouds are hidden by objects.

    2.)
    You can change the clouds moving speed in clouds category in your profile: "Weather Anim Speed Scale" (Do not drive this this in runtime!) and "Clouds Wind Strength Modificator" (That value can be changed dynamicly in runtime.)
    Code (CSharp):
    1. EnviroSky.instance.cloudsSettings.cloudsWindStrengthModificator = 0.05f;
    3.)
    Yes, I know that weather sounds are bad at the moment. I will have a look into that later. For now you are maybe want to use some other from asset store. I am sure there are way better sound effects avaiable!
     
  12. Tigremtz

    Tigremtz

    Joined:
    Oct 29, 2017
    Posts:
    2
    Hi did you get this fixed I am getting this error on Enviro Mobile too
     
  13. gamesbond67

    gamesbond67

    Joined:
    Nov 27, 2017
    Posts:
    2
    Hi,

    Just purchased enviro and did a couple of tutorials and I must say WOW! My only problem is that I can't seem to be able to show Godrays/Lightrays in my project. I see a disabled script called Enviro Light Shafts which I'm unable to enable. What am I missing?

    Thanks
    Pablo
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Sorry what error you talking about? Can't find the post right now. :D Contact me private and I could send you a beta package of new mobile version. Works good for me on ios with metal.
     
  15. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    114
    Nice, thank you very much for the answers! I'll do that in a coroutine then, it should work. About the sounds, I have edited them in Audacity, if you want I may email them back to you soon.
     
  16. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,140
    Thanks for the help Vondox. I've given up for now =[ The background camera renders wonderfully, but the foreground additional camera can't do volumetric lighting or really any sky rendering without writing over the background cameras render. If I turn the foreground volumetric lighting off however the background camera is very different than the foreground cover because of it's volumetric lighting, etc.

    I think I would need to combine both of the renders and their depth buffs into a single render before passing it to EnviroSkyRender but I don't know how to XD
     
  17. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    173
    Hello, @Vondox

    I'm experiencing a weird behaviour that I can not figure out. There are birds flying in one of my scenes but they disappear in the distance when the player looks at the horizon. If I disable the Enviro Sky Rendering script on the camera I can see the birds. It's like the birds are being rendered behind the skybox.

    Have you experienced anything like this before? I've looked around but I haven't been able to find anything.

    Thanks in advance
    Nathan
     
    Last edited: Feb 1, 2018
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Thanks, that would be really nice! :)
     
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Hm okay sorry, yea you may have to it that way.
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Hello, sorry haven't experienced that before. How do you render these birds?
     
  21. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,099
    Im using with Gaia... and I set up Enviro and Aquas with Gaia window...? This guide i cant open..
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    You also can take a look in Enviro -> Scripts -> AQUAS Integration folder. There is a copy of the guide as pdf aswell.
     
    mattis89 likes this.
  23. tork12

    tork12

    Joined:
    Dec 16, 2017
    Posts:
    39
    Everything in distance turns blue, mountains, props, etc. How to fix? (I can't code, so please give as step-by-step as possible) These are default settings after installation, I haven't adjusted anything at this point.
    Enviro-before.JPG Enviro-After.JPG
     
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,099
    Well.. it supposed to be like that... if you dont like it blueish you could change the fog color.. look around in the enviro gameobject.

    Have a nice weekend
     
  25. akkun024

    akkun024

    Joined:
    Jan 24, 2018
    Posts:
    2
    Hello,
    I put seagulls very low position with enviro. The seagulls are shown upper the clouds. I think clouds are too low position. Can I move them more higher?

     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    That is the distance fog. You can control color and intensity in each weather preset:

    upload_2018-2-2_18-6-46.png

    And/or control the intensity globaly in EnviroSky inspector:

    upload_2018-2-2_18-8-15.png
     
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Looks like that your birds not "writing" to depth but are in opaque render queue. What shader do these birds using? For a fix you should use a shader that will allow depth, or a shader that is rendered on transparent queue, so it will be rendered in front of clouds.
     
  28. akkun024

    akkun024

    Joined:
    Jan 24, 2018
    Posts:
    2
    The problem fixed! Thank you very much!
    It looks so nice!
     
    Vondox likes this.
  29. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    141
    Does someone know a water package working correctly with the fog ? Preferably unlimited ocean.
    In this picture I use Aquas light: https://i.imgur.com/LSFfAfl.jpg
    Thanks !
     
  30. tork12

    tork12

    Joined:
    Dec 16, 2017
    Posts:
    39
    Thanks! Knowing exactly where to look to make the changes is a great help, and I was able to change the look as needed
     
    Vondox likes this.
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Maybe check the AQUAS guide that is included with enviro. (Scripts -> AQUAS Integration folder). It is for the full version, but you may can get it working for lite version too.

    About ocean renderers: I only know that PlayWay/UWS will work with fog out of the box. If you have the money maybe give UWS a try. :)
     
    secondsight_ likes this.
  32. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    Any chance of adding a second moon?

    Let me know.
     
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Yea, please check the "Additional Satellite" category in EnviroSky Inspector -> Edit Profile. Click on "Add Satellite", assign your moon prefab and tweak the orbit/rotation sliders.

    Oh, could you please review your review for enviro you written a week ago? Sounds like it is related to another asset. Something with roads?! :D
     
  34. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    Thanks and Sorry about that- dunno how that happened- will fix.

    I dig the asset- will rate five stars!
     
    Vondox likes this.
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Hehe no problem, thanks for fixing! I'm glad to hear that! ;)
     
  36. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    141
    Thanks for pointing that out ! Would never had found that on my own.
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Feel free to contact me on my support mail if you need help with the shader modification. :)
     
  38. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    446
    hello again @Vondox
    it's possible reduce the sun light intensity like in the rain weather where the sky is cloudy?
    thanks in advance! :rolleyes:
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Light intensity can't be changed in weather presets at the moment. But you can darken the light color here:

    upload_2018-2-5_16-50-55.png

    Maybe that will help you to achieve the desired effect.
     
    Marcos-Elias likes this.
  40. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    173
    THis worked for me as well. Thanks for that!
     
    Vondox likes this.
  41. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    I bought this asset recently, and I am having some problems. The scripting documentation seems almost non existent as far as I can tell. I looked for about 3 hours trying to find something that should be very straight forward, sky color. I absolutely need the sky color on the top and horizon to be inputted into my dynamic GI system. I have been having some other issues with this as well. Though the flat clouds, sunshafts and fog are beautiful and perform well, the volumetric clouds are unusable for my current project because of performance. I am happy with the flat clouds, but they seem to have issues in the transitions from different cloud types. Is there any way to fix the strange and sudden buggy looking transitions in flat clouds?

    Hope to hear back soon, otherwise this package is currently unusable to me.

    Regards,

    Robert.
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Hello Robert,

    there currently is no method to sample the sky color from skybox implemented. But something that may could work is creating two gradients where you can easily get the color for current sun position/time of day. Something like this:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class EnviroSkyColor : MonoBehaviour {
    6.     [Header("Input")]
    7.     public Gradient topSkyColor;
    8.     public Gradient horizonSkyColor;
    9.  
    10.     [Header("Output")]
    11.     public Color topClr;
    12.     public Color horizonClr;
    13.  
    14.     void Update () {
    15.  
    16.         if (EnviroSky.instance == null)
    17.             return;
    18.  
    19.         topClr = topSkyColor.Evaluate(EnviroSky.instance.GameTime.solarTime);
    20.         horizonClr = horizonSkyColor.Evaluate(EnviroSky.instance.GameTime.solarTime);
    21.  
    22.     }
    23. }
    24.  
    (Left = night / middle = dusk/dawn / right = day)

    That may would a very fast solution. I also can have a look how unity samples the skybox ambient lighting later. That would be slower but more accurate. But currently not really sure how to do it. :D

    About volume clouds performance, there will be quite a big performance improvement in next update. I finally added temporal reprojection and two other performance tweaks. Only one small issue need to be adressed, once that is fixed I will send update to the asset store for review.

    What issue you are getting with flat clouds transition? Looks all good to me and I don't have any other reports. You may want to lower the transition speed in "Weather" category of your profile. With default settings they showing up very fast.

    Kind Regards,
    Hendrik
     
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Here is a updated one that will include the sky weather color modification. For example when it is raining.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class EnviroSkyColor : MonoBehaviour {
    6.     [Header("Input")]
    7.     public Gradient topSkyColor;
    8.     public Gradient horizonSkyColor;
    9.  
    10.     [Header("Output")]
    11.     public Color topClr;
    12.     public Color horizonClr;
    13.  
    14.     void Update () {
    15.  
    16.         if (EnviroSky.instance == null)
    17.             return;
    18.  
    19.         topClr = Color.Lerp(topSkyColor.Evaluate(EnviroSky.instance.GameTime.solarTime), EnviroSky.instance.currentWeatherSkyMod, EnviroSky.instance.currentWeatherSkyMod.a);
    20.         horizonClr = Color.Lerp(horizonSkyColor.Evaluate(EnviroSky.instance.GameTime.solarTime),EnviroSky.instance.currentWeatherSkyMod, EnviroSky.instance.currentWeatherSkyMod.a);
    21.  
    22.     }
    23. }
    .
     
  44. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    141
    So, I´ve bought the full version of Aquas, since the script above did not work out.
    Result: https://i.imgur.com/1rb7OGy.jpg
    What can I do to fix this ? It works with the default unity fog and height fog.
     
  45. mmvlad

    mmvlad

    Joined:
    Dec 31, 2014
    Posts:
    89
    Hi @Vondox
    awesome asset. I purchased your mobile version and was wondering if it has photon sync over network.
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    There is a pdf file in that AQUAS Integration folder. This is a step by step guide to add the fog rendering to aquas.
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    Thanks! Please send me your invoice number in a private message. Then I could send you beta version of the new mobile/light enirvo. That one has photon and unet network integration.
     
  48. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928

    Im a little confused. How is the gradient getting into that script..? Is there any way to access the actual current gradient? Seems strange that there wouldn't be, I mean it gets into the shader somehow..?
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,077
    There is no gradient for sky/horizon colors. The actually skybox output wil be calculated in shader and is based on Preetham and Hoffman atmosphere rendering.

    So my solution was that you create two gradients and setting the colors to match the sky/horizon and send those colors to your gi.system. This of cause requires some tweaking.
     
  50. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Turns out Unity Render Settings calculates this for me, not sure how they manage to output this to the cpu in an efficient way from a shader that is not theirs, but they must be doing some magic. Here is the solution I am using.

    Skylightcolor = RenderSettings.ambientSkyColor;
     
unityunity