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

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    You also can use Lux framework. It's free. Check out the dynamic weather sample scene to check how to setup your materials with dynamic weather feature in Lux. Then just unzip and add the enviro lux integration component and assign the lux weather script to sync your materials with current weather.
     
    TalkieTalkie likes this.
  2. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123

    Wow OK, it seems to have features combines unlike UBER/RTP.. plus it's free. :eek:

    Trying to figure out what to download from the Github link for LUX though (apparently that's where the new version is). I'll ask the developer in his thread (there is probably installation guide for that).


    Another question. I am seeing terrain generators like GAIA and MegaSplat (and some others) being mentioned. I saw the videos and they look impressive, but which terrain generator/editor is the one people recommend using with Enviro? (though tbh, I can always just create terrain in Vue and do a RAW import for Unity terrain.. probably will anyway).
     
  3. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    @niksha I use MapMagic because I think it's the best, but they all have their ups and downs. Ultimately the terrain generator doesn't really matter to be honest though. They all support whatever shaders/textures you want to use, or have ways to make them work. Enviro is more about light, fog, particle systems, and what not. The snow/puddles can be made to work with whatever you're using.
    TC2 is the fastest, Gaia is the easiest, MapMagic is the most capable, in my opinion.
     
    TalkieTalkie likes this.
  4. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Yes. RTP is for terrains, UBER for Meshes.


    It support heightmaps for materials yes. With the difference that RTP brings Tesselation features for the whole terrain with it. Unity offers you using heightmaps for materials. RTP gives you the feature to use tesselation for the whole terrain being able to increase pixel error values of the terrain saving ressources.

    Unity comes with the Heightmap feature for textures but you can't really configure much. UBER on the other hand gives you the options to play with lot of options regardining POM / Tesselation levels, values etc. So it depends on how important POM / Tesselation features are for you. If you can live with the Unity built-in feature you don't need UBER for POM / Tesselation stuff.
    But you gonna need it if you want to have Snow / Water effects on meshes using Enviro.

    You can also take a look the the "LUX" asset. It's free and it brings pretty similar features like UBER. LUX does not cover terrains I think

    MegaSplat is not a Terrain Creator. It's lets say the best competitor to RTP for Terrain Shaders etc.
    @malkere mentioned the best terrain assets out there. As a beginner I would recommend you to use GAIA. The community is really helpful, Adam the creator is updating the asset on regular basis for free and you have lot of good tutorials. If Multi-Terrain is important for you GAIA will get soon an update to support it. I own TC2 and GAIA and I can recommend you GAIA as a beginner. TC2 right now has more features like Multi Tile stuff , GPU support etc but it's not so easy. GAIA on the other hand is really user friendly and will get Multi Tile support pretty soon. I don't own MapMagic so I can't tell you anything about it.


    Hope this explains the situation a little bit better
    Cheers
    Ronny
     
    Last edited: Mar 24, 2017
    TalkieTalkie and Vondox like this.
  5. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Short video showing setup and playing with weather and time with enviro 1.7 :D
     
    TalkieTalkie likes this.
  6. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Looking forward to 1.7, is the performance hit on GPU mostly with Enviro?

    So I can just get MegaSplat and GAIA and both will work fine alongside LUX (for water/snow effects on meshes) and Enviro?
     
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Yea, the cloud quality have most impact on rendering time, but will be really fast in 1.7.

    There is no out of the box integration with MegaSplat at the moment, but it should be easy to create. If you have questions contact me :)
     
    TalkieTalkie likes this.
  8. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Just bought MegaSplat (though there is no integration with Enviro, I know I know :p) and GAIA.

    Let's see how I can throw in LUX for meshes in there and get Enviro working together (I hope I don't break something, I am using Adventure Creator). Will post updates and questions here.. as soon as I mess it all up.
     
    Vondox likes this.
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Check the lux sample scene for dynamic weather. Save the gameObject with the lux dynamic weather script as a prefab and add it to your scene. After that unzip and add the enviro lux integration component and assign the lux weather script. You should be good to go then.
     
    TalkieTalkie likes this.
  10. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    We really need accurate moon movements (in relation to sun). Is that something we could modify on our end, or would it have to wait for you?
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    You need to edit/rewrite code to change movement of the moon. I actually planned to improve moon rendering in 1.8 and will also take a look at the moon movement.
     
    TalkieTalkie likes this.
  12. Hi Vondox,

    I'm on a mission to find the best day/night/weather solution for my project. I have some really unusual requirements, so it is not easy. I've checked the demos and videos of your asset and it looks promising, so I have to ask.
    I will develop an outdoor environment and I will need the standard weather/day/night/stars/etc asset, but I will need to control the time. I mean with the Chronos asset (http://support.ludiq.io/topics/22-required-code-changes-migrations/) This means I will have to hook up all the subsystems' deltaTime into a Chronos clock and adjust accordingly. (It means I will need to be in control how slow/fast the date/time passing in your asset, how slow/fast/rewinded the clouds are, wind and rain and if it is possible even the thunders and lightnings). If you're familiar with Chronos, I will have to have a global clock for Enviro to be able to slow down/stop or even rewind time and I will need individual clocks for the subsystems.
    Since I do not have your asset yet, I should ask you: how impossible this mission is with Enviro? :D
    If it is impossible right now, is there any chance to make it easier in a relatively close future?
     
  13. wmpunk

    wmpunk

    Joined:
    Sep 5, 2015
    Posts:
    71
    Been fidiling with Envro for a couple days now, I'm Very Pleased with it!

    I am having a pretty big issue with it though. I can't seem to get it to work right with water shaders because it renders the fog behind (inside) the water. I've tried a couple different shaders and its the same thing. Do you have any ideas how I might be able to keep the fog from rendering inside the water? Well I'm on the topic of fog, it would be cool if you included a alternate fog setting for the new Post-EffectStack from unity, because currently it messes with Enviros fog.

    Side note: This also happens when I use other fog shaders like the "Dynamic Fog and mist" so I understand this is more of just a general Shader / Unity Issue, but If you could help point me in the right direction it would greatly be appreciated! :)
     
    Last edited: Mar 27, 2017
    malkere likes this.
  14. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    @LurkingNinjaDev I don't use Chronos, but I control everything by script. There's nothing in Enviro that is closed off to the user, but you certainly have to tell it to stop doing some of the things it wants to control.The time controls are a simple checkbox in the UI, so that doesn't need any coding. Everything else is basically just floats, so it shouldn't be hard to rewind. Controlling rain particles and lightning would be a little different.You'd probably have to store when lightning goes off for a few minutes to be able to replay it, etc. Certainly doable though. Sounds fun!
     
    Vondox likes this.
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MegaSplat works on Meshes or Terrains; and you can even pack most of your scene into the texture arrays to save draw calls, or paint over the regularly textured objects with splat data to make each instance look unique..
     
    antoripa, TalkieTalkie and Vondox like this.
  16. Vondox

    Vondox

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

    sounds like a cool mission :D It isn't impossible but would need some edits of course.
    For example: You most likely want to move the clouds wind animation outside of the shader to be better controlable.
    You also maybe want to update weather on your own and save all weather changes with enviro time in hours, to switch to the correct weather when rewinding time.
    The particle effects can be accessed in runtime with one line of code to sync particle speed with chronos timescale.
    Matching the clouds wind animation with enviro time is something I wanted to add in future(after 1.7!) as optional feature.
    So i would not call this impossible, but it isn't possible out of the box right now. If you still want to give it a try, I would help with integrating of course.

    Hi wmpunk,

    this is a normal limitation of all image effects that depends on camera depth. I currently only know of that PlayWay Water can write depth information and is working correctly with image effect based fog.

    If your player can't enter the water you could do some very simple trick to hinder fog beeing rendered underwater. Just add a plane with standard shader under your water just deep enough to be not seen. But in many cases this approach will not work in a game environment :/

    You of course could change the EnviroFog.cs and uncomment [ImageEffectOpaque] to disable fog on your transparent materials. (That's what Unity does in their depth based image effects).
    In 1.6 this will harm your clouds too, but that's not the case in 1.7!

    About posteffect stack from unity:
    I think it's actually a "bug" that this effect overrides fog color and density even with fog disabled in stack config :/

    Edit: Just saw an update for Unity's PostEffect Stack was released fixing that issue :)
     
    Last edited: Mar 27, 2017
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    I have some good news!

    Big thanks to Jason! He gave me a voucher code for MegaSplat to create the enviro integration. I will include a simple first version for water and snow effects beeing synced in 1.7, which i want to send to store later today. I will dig deeper and add more features(like seasons) later.

    I also had a chat with Chris from Ultimate Survival and I am happy to announce that they plan to add integration for enviro in near future.
     
  18. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Whoa, I read the "mesh" part and kept thinking about it, but thanks for confirming it. So MegaSplat is enough for all my needs then. Thanks. :)


    Yessss.. btw, is it possible to make water flow downhill? In MegaSplat you can paint water, which is awesome, but is it possible to generate such temp mini streams randomly in Enviro during rains? Because that would be really awesome.
     
    Vondox and evilangel89 like this.
  19. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    @Vondox See I preach your asset all over the place :p Enviro deserves the best! Good luck man and thank you!
     
    Vondox likes this.
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Yea, the puddles you paint will be fill when it is raining and drying out over time dynamicly.

    Thanks for your support :)
     
    evilangel89 and TalkieTalkie like this.
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Maybe this is better covered in the MagaSplat thread, but there are two ways to achieve this with MegaSplat:

    1. The examples contain a runtime painting component that shows how to efficiently modify things at runtime. You can put this on a ball, set it to paint puddles, and roll it down a hill.

    2. I plan to add a max wetness/max puddles sliders soon. When these are added, you can pre-paint your streams and wet areas, then animate the sliders to reveal the streams as the snow melts.
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420

    Thanks for clearing this, I have misunderstood what niksha exactly want to achieve :D
     
    TalkieTalkie likes this.
  23. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Yeah that's exactly what I meant. Paint streams next to a river and during rain, watch the stream flow from start till the end. Can add so many details with that, especially on meshes.


    This is amazing, exactly why I picked MegaSplat over RTP. The details you can add in any environment will be crazy. I just finished merging Mega with GAIA (though I wish there was a "Auto Setup" or some quicker way to merge both together :p) and will be going through examples next. Can't wait. :)
     
  24. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Actually Jason and Adam are working on an integration. Is it going to be one click ? I don't know, but the workflow already given by Jason is pretty much killer.
     
  25. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    That would be very nice, because I spent like an hour just trying to get it to work (while watching video tutorial), now I can do it in a few minutes but I still haven't gotten to adding custom textures instead of using default ones supplied with MegaSplat for terrain. Would've been faster if both assets detected each other and just gave you slots to add textures in, so we could go back to designing ASAP.
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I added rain drops to MegaSplat tonight for fun:



    So I think that's all the weathering type effects added at this point (snow, puddles, etc).
     
    Vondox, malkere, evilangel89 and 2 others like this.
  27. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Okay I'm buying megasplat...
     
  28. Okay, so I had two finalists to choose from: the UniStorm and the Enviro.
    And after careful consideration I chose Enviro for now. :) Mainly because of the friendly answer, regardless that I wasn't a customer yet, that half sentence (yepp, the "I would help with the integration" :D ), and last but not least because of your (and @jbooth 's) post about the integration with Megasplat (I just bought that too).

    So I can start to set up the environment to build my sand castle with the help of these brilliant building blocks.

    I'm sure I'll be back with my annoying questions...
     
    Vondox likes this.
  29. wmpunk

    wmpunk

    Joined:
    Sep 5, 2015
    Posts:
    71
    Oh well I'll have to figure something out for the water. Playwater is on my future list (Still bummed about Ceto..) hopefully i't can make small pond waters as well.

    Ooooh those ripples looks nice! I was just about to ask about that in your thread. Between Enviro, MapMap and Megasplat all my environment needs are met perfectly! ( Well except water..)

    Anyway back to Enviro. I literally spent hours testing all the demos for dynamic sky/weather systems on the asset store and I am 100% happy that I chose Enviro. You just cannot make something that looks bad with it. You might make a setting that might not be great, but It won't look bad, and that's only if you try. All the other systems to me where the exact opposite, not saying they aren't good.. but seemed to have way to much going on and would only look good if you found the exact perfect setting else it looked like poop. To me Enviro is the simplest to use and the best looking, thanks for releasing such a great Asset!
     
    Vondox likes this.
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    That's great :)

    I have send 1.7 to store yesterday. If you want to start right now contact me with e-mail or add me on skype: (vondox@live.de) I would send you a download for 1.7 then.

    Thanks for your kind words! I also will have a look at different water assets in the next days.
     
    Last edited: Mar 28, 2017
  31. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    pixelsteam likes this.
  33. Sov3R3igN

    Sov3R3igN

    Joined:
    May 24, 2016
    Posts:
    22
    Vodox, It's been a while friend. Quick question any chance of letting me know what vegetation packs you used for the demo? I would like to have an season system setup but obviously I will need vegetation for all season and i am looking to acquire one.
     
  34. Vondox

    Vondox

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

    I think i have used SpeedTree vegetation for demo. Some of them including autumn and winter versions.

    Greetings!
     
  35. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Not to offend but I don't think Playwater offers value for money. So if you are on a tight budget, I wouldn't go with Playwater ( or playway whatever the heck it's called xD ) I would heartily recommend Aquas or Realistic Water 2.0 . You might want to check out hydroform too but I haven't seen how well it performs.
     
    Last edited: Mar 29, 2017
  36. Sov3R3igN

    Sov3R3igN

    Joined:
    May 24, 2016
    Posts:
    22
    Aquas will not allow ocean wave generation right? or does it?
     
  37. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Truthfully I haven't tried. I use Aquas for lakes mostly. Playway and stuff like Suimono are good at waves. If you're looking at oceans and wave generation there is an open source implementation out there.

    This is what I've been looking at lately
    https://www.assetstore.unity3d.com/en/#!/content/76960
     
  38. Sov3R3igN

    Sov3R3igN

    Joined:
    May 24, 2016
    Posts:
    22

    Yup, I checked it out as well. I wonder if it allows colorization, So you can change colors of the water similar in aquas where you can control colors depanding on the depth of the water.
     
  39. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Last time I checked it couldn't but the developer did say he had a working implementation that he intended to ship to the store a couple of weeks back.
     
  40. wmpunk

    wmpunk

    Joined:
    Sep 5, 2015
    Posts:
    71
    Actually I already own Aquas! I need a nice Ocean shader now though. :)

    Actually this was the trick I needed! I managed to make just a basic shader that only writes to the deph buffer and put it on another plane below my main water plane and toggle it off when the player enters the water.

    Before:


    After:


    I'm also I'm getting Aquas integrated with Enviro. Pretty pleased with the results so far. :cool:


    If any one is in need I'll gladly share the script.

    Edit:
    Just decided to go ahead and post it.
    The component can:
    - Auto Initialize at start if in transform structure of player and option checked
    - Auto toggle between AQUAS and Enviro fog.
    - Toggle GameObjects off and on when specified underwater or above.
    - Use a gradient for underwater fog.
    - Blend in ambient light to the underwater fog.
    - Adjust ambient fog light blend with curve.
    - Adjust Fog density with curve.
    - Use gradient for caustics.
    - Blend in gradient caustic color with base caustic color.
    - Adjust caustic depth and intensity with curve.
    Obviously the the curves and ambient light are synced to Envrio.
     

    Attached Files:

    Last edited: Mar 30, 2017
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Really nice, glad that the trick worked for you!

    Edit:
    Have tested you script and its working great :) I would like to add it to 1.7.1. Thanks for this awesome share!
     
    Last edited: Mar 30, 2017
    dogmachris likes this.
  42. Sov3R3igN

    Sov3R3igN

    Joined:
    May 24, 2016
    Posts:
    22
    He said you can. Only issue that i have is that ocean waves look very unrealistic. I seen SUIMONO or something like that is a different system, However it might be a bit resource heavy. I don't know.
     
  43. wmpunk

    wmpunk

    Joined:
    Sep 5, 2015
    Posts:
    71
    Glad it can be of use! Your fully welcome to do with it what you please.

    Well I'm here I though i'd share 2 features that I think might be cool to incorporate.
    -Moon shafts effect adjustable by fog intensity and moon cycle.
    -Separate sun/moon light intensity for cloud coverage.
    My idea how this works is to raycast from the sun/moon to the cloud layer in the direction of the player. Sample a few pixels around the uvpoint hit and add the average of the alphas. Then use the value to blend between non covered and covered intensity's. So when a cloud covers the sun/moon the ambient light might darken and when the cloud passes the sun/moon the light would increase back.
     
    malkere and Vondox like this.
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    That's great, thanks :)

    Definitely wanted to add moonshafts in 1.8 with new moon rendering. I may do some tests about your second feature suggestion later. But maybe i should improve cloud shadows first. I thought about adding smooth screenspace cloud shadows in future.
     
  45. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    That second suggestion is actually pretty cool and adds a lot of realism to the game :) Would be excellent for games with stealth mechanics to have that incorporated .
     
  46. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Yeah Cloud Shadows first please. Right now I have them disabled cause they look weird.

    Ability to control how light/dark the shadows appear would be nice too.

    EDIT: Also, ability to turn them on/off at certain time of day or during certain seasons too. Like, I don't want any shadow at night or maybe want a bit during full moon.. or none during a storm, etc.
     
    Last edited: Mar 31, 2017
    malkere and Kolyasisan like this.
  47. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Agree. We need better cloud shadows with blur like in Time Of Day plugin. Simulating PCSS is much faster than actually using it.
     
  48. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    @Vondox

    Can you tell us more about the Ambient Mode selections? (the documentation doesn't have any detail on this)

    From what I've seen, "Skybox" is the prettiest and most realistic but has like 10 FPS hit, "Flat" seems to give highest FPS.. but then there is "Trilight" which I thought was the middle ground but is giving me few more FPS than Flat. What exactly is Trilight ambient mode? How does it differ from "Skybox" (which I assume is like Max where it takes color from sky to create ambient light).

    What do you recommend tweaking to keep performance hit low when using Enviro? I managed to squeeze out like 10 FPS just by settings Quality of Clouds to 15 (Cloud Quality at One Layer and Cloud Shadows Off), lower than 15 just looks terrible, unless there is a way to still make clouds look nice at 10, cause I tried all settings.


    Another thing, whenever I play the game (in editor or exporter), the whole game starts with fog completely covering the scene and then slowly fading away. Is there anyway to avoid this problem? (I must have tweaked some fog setting, I don't fully understand them yet).
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    The ambient modes are just the options unity give us for ambient lighting. I would use "Flat" or "Trilight" mode to have control over ambient light based on time of day. Here is little more info:
    https://docs.unity3d.com/ScriptReference/Rendering.AmbientMode.html

    I will write you a private message with download details for 1.7 this will boost your performance especially when rendering in FullHD+. You need to remove your EnviroSky prefab with the new one, a lot of things changed.

    I also started working on 1.7.1 featuring automatic setup a camera for rendering transparent effects like weather particle and better sky fogging with option to block the sundisk or not. This way you can create great sunrise effects.

    Also have added a section for fog and lighting in new documentation. Will release soon when update is reviewed.

    Edit:
    To fix start fog in 1.6.1 change the fog settings in Unity Lighting tab -> Fog -> Density. Just use a lower density here.
     
    Last edited: Apr 1, 2017
    malkere, Kolyasisan and TalkieTalkie like this.
  50. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    It's basically ambient lighting that your meshes recieve. It plays a very big role in PBR shading. Ambient Mode lets you choose how your scene should be lit with Ambient Lighting.

    Skybox mode basically renders the skybox and throws it in the lighting pipeline. It's the most correct one, but Enviro is a realtime skybox solution, so the rendering and throwing parts are going to occur every single frame. Because of that rendering and a high bandwidth of a Skybox texture it slows you down a lot. The other methods are absent of this bottleneck.

    Trilight mode defines your ambient lighting in 3 points (below, middle, above). Your meshes will be lit based on normals and it can be pretty realistic (defining black or gray on below will make your meshes "reflect" ground's dark color, etc). I suggest you to use this one.

    Flat is just what it says, flat. You get absolutely no control over direction of an ambient light and it will be consistent across all the scene. It's purely an artistic choice and it's just as fast as Trilight mode.
     
    Last edited: Apr 1, 2017
    TalkieTalkie and Vondox like this.