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

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oh, and how do get a dark night? Also, how do I change the time so I can check the night and day lighting? I tried sliding the time slider but I cannot do that.
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Please take a look and find that rain particle system in your scene. If it isn't a child from a cloned weather prefab at "Enviro Effects" -> "VFX" -> "...(Clone)" deactivate it.

    About splashes: The default collision settings for enviro rain particle systems are only set to collide with static collider on "default" layer.

    If you for example have water in your scene, you would need to add a collider at water height and assign a layer that only collides with the rain particle effects and not with player.
    Check unity physics layer settings to control that behavior.

    Tweak the Direct and Ambient light color gradients in EnviroSky - Lighting category. Change to nearly black at beginning and end.

    To change the time in runtime on editor you can use the sample UI or set time progress mode to "None" when you want to move the sliders. You can switch back to simulated after changes done of course.
     
    Last edited: May 7, 2017
  3. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Fine with colliding with static layer as I care more about the land than the water.

    I did use a clone so will have to remedy that later.

    My biggest issue now is that I cannot use the night/day since night is as light as day. So will have to freeze time for the presentation and not show off your pretty sunrises and sunsets. :(

    I am sure the loss of night has to do with something I did but it is not obvious how to fix it.
     
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Check the weatherColor mod on your weather. This will influence light color too. I have improved that a lot in 1.8, unfortunately it's limited in current version.
     
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I have it working somewhat. Fog interferes with water which is a problem. Do you know of any water asset that works well with Enviro?

    I am just going with your standard Enviro and only tweaked the distance fog a bit. After tomorrow, I will have more time to play with it. I am looking forward to your update!

    One thing I suggest...can you put the stars behind the clouds? Or at the very least, give us a way to fade them a bit?
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    PlayWay should work very well with fog out of the box, because of their depth rendering feature. For other solutions you may need a few tricks. You could try to add a plane under your water. In right depth you should not be able to notice this plane from distance, when your player is going underwater you could disable this plane.

    Wmpunk posted a script for Aquas Integration that can do this and a few more tricks on page 7.

    Hm if your cloud alpha is relative low stars may shine trough clouds unaturaly, but most of the time you shouldn't see stars through clouds. Strange.. Anyway this won't be an issue in 1.8 anymore.
     
    Last edited: May 7, 2017
  7. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Cool, I will see if I can find the script for Aquas. PlayWay looks nice but a bit out of my price range at the moment.
     
  8. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    @Vondox

    I haven't updated to Unity 5.6 (cause of some MegaSplat issue thanks to Unity breaking things.. they will fix it in next update). yet but I'm curious, will Enviro work without any issues in a Vulkan only project? I want to dump anything DirectX and stick to Vulkan when I switch to 5.6 only.

    From what I can see, 5.6 is breaking a lot of things in some assets (that is why still using 5.5.3p1).
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sorry, I haven't tried that at the moment. Will do some tests later :)
     
    TalkieTalkie likes this.
  10. bnogalc

    bnogalc

    Joined:
    Apr 27, 2017
    Posts:
    9
    One question.
    I want to implement a desert environment, with sand moving and covering the objects. I think it could be possible if i customize the snow system to look like sand, make it don't melt and turn blizzards to brown. Is this possible?
    I didn't find any asset in the store that offers a custom system for the desert, maybe i am horrible searching... it could be hard to extend the system to have something like that?

    Thx in advance.
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Yea that is possible! You can create your own weather types like sand storms with enviro. You can use a unity particle system for moving sand for example. Swap out snow textures for sand textures and set the "snow" amount in your weather prefabs for your weather types. Sand will not disappear until it changes to a weather type with less "snow" amount.
     
  12. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Looks great, Vondox! Thank you for all your help. I am making the build to show off tonight now. I will be sure to mention your asset. We are still having Aquas issues since I have no idea how to use the script that was attached here in the forums, but that is fine. I will play with it later and show off the improved terrain and water at a later date to our group.
     
    Vondox likes this.
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Okay cool, thanks :)

    If you need help with aquas contact me, I also will take a look on this later and may create an integration component for aquas.

    Good Luck with your presentation :)
     
    dogmachris and Teila like this.
  14. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thank you! That would be awesome!
     
  15. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)

    This is the error i get everytime i press play, fresh new project only enviro in. Unity 5.5.3.
    I make a new scene drag enviro gamma prefab and assign the camera to player and camera slots
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    To stop error child your camera under another gameobject. But this error should not break something. I will add a proper fix for 1.8 :)
     
  17. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Great thnx, any eta for 1.8 ? Also the clouds only eta ?

    Edit : Sound effects (birds) seem to play on their own in the editor , how to fix this ?
    If possible to get rid of all sound effects at all.

    Could you also make it so the "Enviro Effects" gameobject is child of "EnviroSky - Gamma" automatically ?
     
  18. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Hello,

    I am very new to game development and Unity, and i started on a project about one month ago.
    I am using PlayWay water and Enviro Sky assets.
    I do have a problem with transparent rendering using PlayWay and Enviro in combination.
    The problem occures when advanced fog is enabled for the Enviro asset. The distant fog makes kind of an opaque stripe on the horizon (Waterplane), wich is visible in the underwater ime and it renders above particle systems (smoke). I have allready tryed to sort rendring layers and even to change the z buffer behavior on the shaders, but nothing of that helped so far.
    I solved the problem with the Particle Sytem yesterday using an additional camera which just renders the Particle System and is set to 'don´t clear'. But i think that this workaround does cost some performance.

    I do need the advanced Fog feature aswell as the underwater feature in my project, so i would need some help solving this problem.

    Best regards
    Funkeys
     
  19. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    @Vondox, your Enviro was a huge hit at our Unity User Group meeting. They especially loved the sunrays, which appeared soon after I opened the build and received a lot of oohs and aahs. :) They also loved the clouds and were asking me more about them, although I, of course, told them that you just made them pretty because I am the artsy one, not the programmer. lol

    I am really looking forward to the fix for Aquas water and then I can say I definitely found our weather/time of day system.

    One funny thing, I was telling them about the weather presets and how the weather would change and at that very moment, the clouds cleared and the stars came out. That elicited a huge cheer.

    Thanks so much! I will post some pictures later. As I was leaving the meeting I had an accident and badly hurt my ankle, so out of commission for a bit while I deal with the pain, but will get some screenshots soon.
     
    Vondox likes this.
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Update 1.8 will be delayed a few days But I should finish your cloud only solution tomorrow and send you link in private message.

    The annoying ambient sounds playing in editor issue will be fixed in 1.8. For now set the volume of both ambient audio sources on "SFXHolder" - Prefab in your project(not scene!) to zero. To never play ambient sounds you can set all ambient sfx to "None" in your weather prefabs, or set volume to zero in EnviroSky - Audio category.

    I will check about parenting "Enviro Effect" gameObject, think should be no problem.
     
  21. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Edit : thnx for reply , here is another problem

    When the player position is getting larger , the sun is getting distorted and bigger.
    upload_2017-5-10_16-20-56.png
     
    Last edited: May 10, 2017
    Vondox likes this.
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi Funkeys,

    Your problems with your particle's is related to no depth information for transparent shaders and the fog effect need correct depth to work. If your solution is working for you, I would keep it.
    You also can execute fog before any transparent objects by removing the "//" from this line in EnviroFog.cs:
    Code (CSharp):
    1. //[ImageEffectOpaque]
    But your water for example will loose fog too!

    Have you tried to disable enviro fog when underwater? For Aquas for example is this recommended.
     
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Thanks for reporting This will only occure on y-axes, rght? I will check this out and fix in 1.8.
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Happy to hear that your presentation was a success and enviro recieved some fame ;)
    Of course, I will add a simpler Aquas Integration, but probably this will delay to next week.

    Ouch, get well soon, I am looking forward for your screenshots :D
     
    dogmachris and Teila like this.
  25. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Hello Vondox,
    thank you for your fast reply :)!
    I did try this already, but my project is playing on the ocean and I very much like how your fogy weather is looking on the ocean. It´s exactly the feeling i want to create! So this is no option for me.

    I have tryed this in the Inspector and it works fine undewater. But i fear it leeds to awfull transtions, because the uderwater script of playway is kicking in, as soon as the cam tuches the waterplane.
    The problem now is, that i have no idea how to smooth out this transition a bit.

    Is it probably possible to change the hight (Y axis) of the fog a bit, when the cam comes near the waterplane? And would it be helpfull in this circumstance?

    And another question is, why is it not possible to zero out the position of the enviro component in the scene?
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sorry I can't test with PlayWay at the moment, I have no license :D

    You can try to raise the height in EnviroSky - Fog category, but you may have already tried that.

    But maybe this is fixed in 1.8 with the changes on sky fog, so maybe just wait and test again when update is released. If you still have issues, we search for another solution.

    The EnviroSky prefab will move with your player, that is normal.
     
  27. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    well on the Y axis the sun gets bigger/smaller , on the x and z it gets distorted upload_2017-5-11_3-14-6.png

    when i go on even larger numbers the clouds start to turn grey like if i had foggy weather.

    upload_2017-5-11_3-11-45.png

    EDIT: in the first image that sparkle in the center is the sun
     
    Last edited: May 11, 2017
  28. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Okay have found the issue and will be fixed in 1.8. :) Thanks again for reporting!
     
  29. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I'm seeing a strange issue with Enviro fog and terrain and trees. I'm using tree creator trees on a Unity terrain, with Megasplat.See screenshot:

    1) There's no fog (or much less dense fog) above the terrain, which makes the trees up on the ridge look odd.
    2) On the right, trees in the foreground, with the terrain further back (it's a curved river valley) have denser fog, which looks really odd also.

    Can I tweak things to fix this?

    thanks
    Dave
     

    Attached Files:

    • fog.png
      fog.png
      File size:
      292.2 KB
      Views:
      855
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hmm that looks really strange. Please check your camera and try to change the order of Enviro Fog component.
     
  31. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I've got Beautify and Aquas Camera scripts on the Main Camera, but disabling them doesn't change the fog issue. Nor does then moving the Enviro Fog component upward in the Camera (so it's above Enviro Light Shafts). Then I put the terrain and Enviro into a new scene -- same thing, see screenshot. Any other ideas?
     

    Attached Files:

  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hmm, are you sure that you have assigned correct camera and player? "Enviro Rendering" should not be deactivated.
    What Unity Version you on? Does the trees use the default unity shaders? Have you unity fog disabled?
     
  33. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I'm using Unity 5.5.3. Unity fog is disabled. Standard Unity tree-creator shaders. I guess I disabled Enviro Rendering when I disabled the First Person Controller, switching over to the Main Camera (and copying the Enviro components over to it) to see if I had the same problem with it. It's enabled now, but same problem. Camera and player are assigned to the EnviroSky-Gamma inspector.

    The problem on the right is very dependent on camera distance--see this video where I move forward and back:
     
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Demo scene is working fine? If not try to reimport enviro. I will do a test with MegaSplat and tree creator trees later on my side. Maybe I can reproduce your issue.
     
  35. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    i put our terrain into the Enviro-Gamma demo scene -- yup, same thing.
     
  36. facundogalella

    facundogalella

    Joined:
    Mar 5, 2016
    Posts:
    59
    Hello, I'm using the Mobile edition and looks great! I just want turn off the day and night ambient sounds and I can't do it yet. I tried modifying the SFX holder prefab and a lot of things
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    I checked this out and have to say, you currently can't use tree creator trees with fog image effects in general. I have tested and tried to change the internal shader, but not let us draw depth with terrain billboards.

    You now only can try following:
    * Open EnviroFog.cs and remove the "//" from this line:
    Code (CSharp):
    1. [ImageEffectOpaque]
    This will render fog before all transparent objects and not affecting them.
    * You may also want to activate Unity fog and set your camera to "Forward" rendering.
    * Use other Tree's:D
     
  38. Vondox

    Vondox

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

    you have to change the volume of the ambient audio source in enviro folder.

    Take a look on the screenshots:
    upload_2017-5-13_4-11-22.png upload_2017-5-13_4-12-35.png
     
  39. facundogalella

    facundogalella

    Joined:
    Mar 5, 2016
    Posts:
    59
  40. m85a

    m85a

    Joined:
    Oct 4, 2016
    Posts:
    7
    Hi, I can get an earlier version of Enviro - Dynamic Environment for Unity 5.3.
     
  41. Coalex

    Coalex

    Joined:
    Dec 7, 2016
    Posts:
    11
    Hi There,
    Just wondering if realistic sun and moon positions are still on their way in the new update?
    Really love the asset and this would be super helpful for what I'm working on.
    Cheers.
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi Coalex,

    of course, you will have an option to use simple or realistic sun and moon position calculations in 1.8.

    Greetings!
     
  43. Coalex

    Coalex

    Joined:
    Dec 7, 2016
    Posts:
    11
    Thats great news, thank you.
    Also is there a way to speed up or reverse cloud animations?
     
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sure take a look on the wind settings sliders in clouds category:

    upload_2017-5-19_15-44-26.png
     
    Last edited: May 19, 2017
  45. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Got a few questions as I try to set this up in our game:

    1) I really need an accurate night sky/starfield. I see how I can swap in my own star cubemap, but it looks like that cubemap is tiled across the sky, using the Stars Noisemap -- is that correct? I have an all-sky cubemap that needs to be aligned and rotate correctly in the day/night and seasonal cycle,. but when I assign it to the EnviroSky material, it isn't mapped correctly across the skydome--some obvious seams etc. Is there a way to use it with Enviro?

    2) On Weather Update Interval: the units are minutes, right? I've set that to 1, for testing, but weather changes a lot less frequently than every minute.

    3) I see that each weather effect has a Color value, but at runtime, those colors aren't applied to the color on the Direct Light -- it's always the same color (233,205,177). Which makes the lighting look oddly bright during cloudy and rainy periods. How do I get the Direct Light to use the color of each weather?

    4) I want so switch to another set of rain particle effects. I added those as child objects of the parent Rain 1, Rain 2, and Storm prefabs, ten assigned them to those Effect Particle Systems slot in the Enviro Weather Prefab inspector. However, at runtime, the new rain particles all play during all kinds of weather. If I switch back to the original prefabs, only the current/correct rain particle plays. I've examined the instantiated prefabs at runtime but cannot see any difference between the originals and my new rain prefabs. How do I ensure that only the current/correct rain prefab emits?

    thanks
    Dave
     
    Teila likes this.
  46. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    +1
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420

    Hi Dave,

    1) I have changed a few things in skybox shader in update 1.8 and it may will work for you now. I am also pretty much finished and wanted to upload 1.8 tomorrow. If you like you can contact me with your invoice to get a preview of 1.8 and I help with integrating your own night sky.

    2) The weather update interval is in game time hours.

    3) You have to tweak the alpha of the weatherColor mod. In 1.8 you will have more control over light, fog, and sky colors based on weather.

    4) Hmm I am not sure what is going wrong and need more information. For example a screenshot of your weather prefab component, hierachy and particle effect.

    Greetings,
    Hendrik
     
  48. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Thanks for the answers. I'll PM you.

    For #4, I realized that my new rain particle effects have children effects nested inside, and those are what's playing at runtime. Is there a way to have the parent particle's status apply to them -- or I guess I can just expand the array on EnviroWeatherPrefab and add them, right? I'll do that.
     
    Vondox likes this.
  49. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Eh, one more question: The rain particles don't seem to follow the player, so when it's raining, the player runs in and out of the smallish rainy area. Is that how it's supposed to work?
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Ähhm nope :D

    Please check if you have any weather prefabs in your scene when not in play mode and deactivate them.
    All weather prefabs will be instantiated under "Enviro Effects" object and this will move with the player.

    If "Enviro Effects" object doesn't follow your player you should check if you really have assigned correct "Player" and "PlayerCamera".