Search Unity

[RELEASED] Enviro - Sky and Weather (Dynamic Sky and Weather System)

Discussion in 'Assets and Asset Store' started by Vondox, Apr 11, 2015.

  1. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi Dave,

    Nice idea, will check that out soon!

    Currently working on rewriting and improving enviro fog and adding volumetric lighting/fog out of the box. I will show off in the next days!

    Greetings!
     
    one_one and TeagansDad like this.
  2. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi, Great plugin! I'm wondering if you're planning on adding a temperature system? That would be awesome if you can! :D
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi, thanks :)

    Yea a temperature system is planned for quite long time already and will be added in one of the next updates.

    First screenshot of volumetric lighting in enviro:
    upload_2017-9-6_4-17-56.png
     
  4. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    13
    Great asset, just purchased and I have a question about indoor areas.

    I've setup a few scenes and the outside looks great, but when I step "indoors", (think a dark cavern with torches on the walls), the ambient lighting from the outside environment lights up my indoor cave walls making the inside incredibly bright.

    I'm curious what is the recommended pattern here. My thoughts on solving the problem were two fold :
    1. Create an "indoor" weather setting and then as I walk inside change the weather setting
    2. Change the time to midnight which makes it dark enough that my indoor area looks dark
    3. Change some setting I don't know about

    Looking for guidance on the best path forward.

    Thanks.
     
    P_Jong likes this.
  5. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Finally. So no more SSMS Fog because Enviro comes with a Volumetric Fog solution out of the box?
    A dream comes true :)

    Would be cool to have similar simple not to complicated options like the ones of SSMS:
    ssms.JPG
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Happy to hear that you like enviro!
    Hm the best way would be to reduce the ambient intensity when entering your cave and set it back to default on exit.

    Please send me a mail and I could provide you with a modified envirosky script with a new ambient intensity mod float to easily change the intensity in runtime. I will add this to next update too of course.

    If you are interested I also could quickly write a component to have a trigger for entering and exiting your cave. Could be useful to be added to enviro for others users too and extend it.
     
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I am looking for some beta tester for enviro 2.0! Especially if you have access to a vr hmd, but everyone is welcome. ;)
    Please send me a private message if you are interested.
     
  8. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    13
    Thanks for the quick response!

    That script sounds like it would be great. Being able to change that at run time easily would help my issue.

    I was thinking of setting up a similar trigger and then placing it between my entrances and exits, so if you created a similar component that would be a great help as well!

    I'll send you an email now.
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Okay cool, I will prepare and send it to you later today.
     
  10. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    when you do update the documentation?
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I already started with the new documentation, but haven't finished yet.
    I will try to get a basic updated documentation online end of next week.

    Anyway the documentation for the integrations and utility components will be delayed, because I planned to rewrite and change most of them in near future and don't want to invest many hours to write something that will be outdated in only a few months.

    There is also the updated mobile version in queue, that should be finished soon too. The good thing is that both using the same inspector layout and most features are identical so it will be easier to keep both up-to-date.
     
  12. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    @Vondox

    Im in the process of integrating Enviro with my project, is there any documentation or if you can provide me a direction as to what are the absolute requirements to run Enviro as a linux headless server, for example can i completely omit inside EnviroSky.cs the Init() if my server is built using Linux Headless? any other functions that i can omit would be greatly appreciated and would save me a TON of time :)

    Thanks,
    -J
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Second I will send you a updated version with a fix for the headless mode. That is unfortunaly messed up in current asset store version. Then you just want to call EnviroSky.instance.StartAsServer(); And you should be good to go.
     
    jagatai33 likes this.
  14. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    hi
    Enviro is awesome but you need create more tutorials.
    fog inside a house. how i can fix that?
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Yea, I know!
    I will create more video tutorials for enviro 2.0.

    Fog iniside house is a bit problematic with current fog implementation. You can test to use the Fog Zone component to lower the fog when you entering your house. Download and import this component and add it to gameobject with a collider. This will trigger when you enter your house and change the fog intensity. Not a ideal solution but currently there is no other way.

    I will have a look to find better solution with depth based fog to remove fog with primitives someway. But currently not sure what would be the best way to do that.
     

    Attached Files:

  16. Kalle801

    Kalle801

    Joined:
    Mar 3, 2013
    Posts:
    80
    I get a black sky if i try to use this with "UnitZ unet".
     
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    How do you have assigned your camera and player?
    For multiplayer games I would recommend to use the EnviroSky.instance.AssignAndStart("Player", "Camera"); function to make sure that the correct local player get assigned.

    Edit: Do you already have checked the unet integration scripts for enviro?

    Edit2: Also maybe check your unity graphic settings and enable HDR when using deferred rendering.
     
    Last edited: Sep 9, 2017
  18. Kalle801

    Kalle801

    Joined:
    Mar 3, 2013
    Posts:
    80
    Does not work. If i try to remove all enviro stuff, the sky is still black.
     
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I have started a conservation for further support.
     
  20. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    13
    I've spent some more time with Enviro Sky and I wanted to get your recommendation on how to configure it for my use case. I've tried to figure it out on my own without success.

    My game levels all start from the same Scene in Unity. When the scene loads it does one of 2 things : Procedurally generate a new level from one of 6 level types, or Load a level from one of 6 level types.

    Each of the 6 level types has a different setting. Some levels are indoors only, so they don't need Enviro Sky. Others are Indoor/Outdoor.

    I've tried 2 different methods of making Enviro Sky :
    Option 1 : A different Enviro Sky Prefab for each level type that needs Enviro Sky. This didn't work because their appears to be some automatic creation/linking of the Enviro Camera and Enviro Effects game objects. So even if I disable/renable the prefabs I don't need for a level type, things end up all wrong. For level types that don't need Enviro Sky I get a black screen. I can hack the black screen away but it seems non optimal.

    Option 2 : A single Enviro Sky Prefab, then load a new weather profile for each level type that needs it. this didn't work because even when I load the weather profile it doesn't load the needed weather. I also couldn't find a way to modify other parameters I need tweaked for each level type, things like time of day, latitude, etc.

    So I'm loving the Asset. I've got really good setups to match each of my level types. I just need some guidance on how best to implement Enviro Sky for my particular project.

    Thanks for the quick response on my other question and thanks for the awesome high quality Asset!
     
  21. Vondox

    Vondox

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

    okay first option can't work. You can only have one EnviroSky prefab in your scene. So the second approach would be the right one.

    To disable enviro you have to do a small change in EnviroSky.cs script. Take a look on the last function named "RemoveEnviroCameraComponents" and make this public. Now you could call something like this:
    Code (CSharp):
    1. public void DisableEnviro ()
    2.     {
    3.         EnviroSky.instance.started = false;
    4.         EnviroSky.instance.RemoveEnviroCameraComponents ();
    5. // If you need a skybox set your camera clearflag to use skybox and assign your skybox material
    6.         RenderSettings.skybox = skyboxMat;
    7.         EnviroSky.instance.PlayerCamera.clearFlags = CameraClearFlags.Skybox;
    8.     }
    To re-enable enviro you could call EnviroSky.instance.AssignAndStart("YourPlayer","YourCamera"); If your player or camera haven't changed you can call this:
    Code (CSharp):
    1. EnviroSky.instance.AssignAndStart (EnviroSky.instance.Player, EnviroSky.instance.PlayerCamera);
    To change the time of day:
    Code (CSharp):
    1. EnviroSky.instance.SetTime(int year, int dayOfYear, int hour, int minute, int seconds)
    2. //or
    3. EnviroSky.instance.SetInternalTimeOfDay(float ToD)
    4.  
    And changing the lat/long:
    Code (CSharp):
    1. EnviroSky.instance.GameTime.Longitude = 10;
    2. EnviroSky.instance.GameTime.Latitude = 50;
    For changing weather:
    Code (CSharp):
    1.         //With transitions
    2.         EnviroSky.instance.ChangeWeather(int ID);
    3.         EnviroSky.instance.ChangeWeather("weatherName");
    4.         //or withoput any transitions:
    5.         EnviroSky.instance.SetWeatherOverwrite(int ID);
    6.         EnviroSky.instance.SetWeatherOverwrite(EnviroWeatherPreset preset);
    You also can create different enviro profiles for each level and load them in:
    Code (CSharp):
    1. EnviroSky.instance.ApplyProfile(EnviroProfile profile);
    I hope that helped you. Feel free to contact me if you run into any issues.
     
  22. Firlefanz73

    Firlefanz73

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

    I just realized your asset is on sale. And it really Looks good!

    I am working on a game with a voxel engine based on Uniblocks (Looks like minecraft but I added more faces to have 45° faces instead of only cubes, with "real" meshes for all other stuff).

    Would Enviro work out of the box with that, too? Is the Performance good? (What I have read it is).
    Could I use the lighting Settings from the included Scene for my game to have lighting and sky and weather in a short time like it is in the Video without biggger Performance decrease?

    Thanks a lot and have a nice sunday! :)
     
  23. Vondox

    Vondox

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

    I don't see a problem. Enviro controls the unity lighting based on time of day and weather. If your shader is working with real-time lighting / real-time gi it should work perfectly fine.

    I think that the performance is good and you should not see a big fps drop. You also can tweak the quality in runtime and add a graphics menu for example for older and slower target devices.
     
  24. PaulGK

    PaulGK

    Joined:
    Dec 1, 2016
    Posts:
    27
    Bah!! Really annoyed.
    This is a great asset but I only bought it yesterday and today it has gone on sale :(
     
  25. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    403
    How is it now with Enviro?
    Offers support for Gaia, but i use Terrain Composer 2.
    Is there any hope of integration Enviro + Terrain Composer 2?
    Or are there any contraindications to using Enviro and TC2?
     
  26. Firlefanz73

    Firlefanz73

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

    this is a great asset, I had it working in my game in no time.

    Now I must integrate some functions I Need:

    I want to Forward the time by an hour or two would also be okay. To test the skybox etc and to Forward the night while in develop / testing mode, or also for sleep fgorward current time until 6 in the morning.

    I tried this, but both did not work:

    EnviroSky.instance.SetInternalTimeOfDay(EnviroSky.instance.currentHour++);

    EnviroSky.instance.SetTime((int)EnviroSky.instance.currentYear, (int)EnviroSky.instance.currentDay, (int)EnviroSky.instance.currentHour, 0,0);

    How can I add an hour or two to the time?

    And in the night or bery early morning, it is Minimum too much blue and too much light for me, how do I remove a bit blue and have it a bit darker?

    Thanks a lot!

    PS found an error and fixed it in the above Code:

    else if (Input.GetKeyDown ("n")) {
    EnviroSky.instance.currentDay, (int)EnviroSky.instance.currentHour++, 0,0);
    }

    If I debug now, the currentHour is increased. But I see no difference in lighting, skybox or sun Position. What am I missing?
     
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Sure, you can use enviro with TC2. You just have to set it up the tradional way. In gaia you do this with one click that's the main difference.
     
  28. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hm, that is strange indeed. I am currently not home but may have a look in demo ui script in samples folder. There is some code to change the time of day.

    About sky colors:
    Click on edit profile -> sky category. Take a look a bit down there are two curves: "Sky Luminance" and "Sky Color Power". Here you want to finetune the values around time: 0.5.
     
    Firlefanz73 likes this.
  29. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Hi @Vondox I just tried the WebGL demo of enviro and love the work you've done with the clouds. However, I the movement of the stars throughout the evening seems a bit off and unrealistic. This is most easily seen if you turn the time-per-day to the lowest value and just watch one part of the night sky - near the end of the night the stars go from moving in an arc to moving horizontally as if the skybox is doing some sort of rotation flip (maybe when it passes through zero?). Any idea what is happening here?
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Yea you right! The demo is still on 1.8.1. This issue is fixed in current version night sky rotation is realistic now. ;)
     
  31. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Great! Before you throw up another demo could you add a keyboard shortcut to toggle mouse look on/off? It's really difficult to focus on the sky and play with the parameters when mouse look is forced on. Thanks!

    (also do you have a timeline for updating the web demo?)
     
    Vondox likes this.
  32. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    hi, amazing asset, enjoying it.

    I have a problem with trees and fog.What is the best solution for this?is a unity bug?

    thanks

    Snap 2017-09-11 at 17.47.23.png
     
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Good idea. I already planned to update the demo scene and improve the controls. But like always a lot of work on list and the web demo hasn't top priority. :D
    But I will try to finish that in the next days!
     
    Last edited: Sep 11, 2017
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Yea that is a unity bug unfortunaly. The built-in distant tree shader is messed up and does not write to camera depth (It does worked in < 5.1 or 5.2 I think). That's why it can't work with image effect based fog.

    So you would need to swap to a 3rd party tree system or use speedtree instead:

    For example this one will do the job: https://www.assetstore.unity3d.com/en/#!/content/76657
     
    Last edited: Sep 11, 2017
  35. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    They are both empty, there are curves to choose but None is set. is that correct?

    I have installed the asset from the store into my solution. Then I dragged the prefab into my Scene and added Player and camera, just like the PDF told me to.

    When comparing to the demo Scene which I imported completly into a new solution, a lot of stuff is missing in my solution: there is no moon linked and sun liked etc. Is this correct or what do I have to do?

    My Scene:

    upload_2017-9-11_20-30-45.png
    upload_2017-9-11_20-31-56.png

    Thanks!
     

    Attached Files:

  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    This looks like the Import failed and the default settings wasn't correctly transferred.
    Anyone get this results after initial import can try this:

    Import enviro in a new empty project and copy the enviro folder from new project to your main project by hand. You also can contact me for a experimental package that may will import correctly in your project.
     
  37. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    This worked! Thanks a lot!
     
    Vondox likes this.
  38. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    Hey i have a Problem with eviro and aquas underwater effects i add the new aquas Support but underwater Looks strange

    Screenshot_126.png
     
  39. Vondox

    Vondox

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

    yea that looks akward. What unity version?
    A few things you may want to check:
    Is the aquas waterplane assigned at the aquas support component and all options activated? If yes the enviro fog should deactivated once you go underwater.
    Also maybe check the image effect order on your camera.
     
  40. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Bummer! I'm still on the fence about picking up Enviro only because our current solution is decent enough; once you get the web demo updated it should help me make a better decision =)
     
    KRGraphics likes this.
  41. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Same here. I've been using Skyboxes from Vue and while they look insanely phenomenal, I have to wait for days for a 4k sky... I've been watching the Enviro demos and I am very impressed with how easy it is to set up my weather. I am also using a custom shader and baked GI and most of my levels are outdoors. I am just ready to pull the trigger on this and get it.
     
  42. diegolopezbugna

    diegolopezbugna

    Joined:
    Jun 1, 2017
    Posts:
    4
    Hi, I'm planning on buying the asset, but I need to know if the following can be done. I have different scenes with different weather conditions, so I'll create different profiles for each. One is a forest zone where it should rain like 50% of time and the other is a desert where it should rain once a mounth. Can I set this probability? Thanks
     
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Yea you can create different zones with different weather configurations. The first one is pretty easy to configure out of the box.

    For your desert zone I would create an additional zone without any rain weather. So it won't rain randomly. Then you can write a simple script to let it rain when you want it to rain. To be sure that it really only rains once a month.
     
  44. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    I picked this up yesterday. It looks really good. I already had a good looking sky asset but it didn't have weather, and I also had a weather asset that had ugly skies and clouds. This asset looks like the best of both worlds.
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Thanks! Happy to hear that you like enviro. :)
     
  46. Firlefanz73

    Firlefanz73

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

    thanks for this asset, it's great!

    I have some Detail questions:

    How can I save / load the Enviro day and time to a serialized data file?

    There are multiple datetime variables, I just found no month. I was going like (DayTime is the DateTime field I want to save to):

    Globals.Playerdata.DayTime = new DateTime(EnviroSky.instance.GameTime.Years, EnviroSky.instance.GameTime. No Months, ...days hours minutes);

    I want to save DateTime for the time of day, and if it is important the month and day for Seasons, too?

    A second more General question, maybe somebody here knows: Since I have added Enviro to my Scene (HDR is off on camera and Enviro, Color is Gamma) , some other transparent Things like Grass and Glass do not render anymore when they are seen in front of the skybox. I guess it is something with the Rendering order? How can I enhance this? Can I set something on the skybox shader so it get's rendered before or after those? I have no experience with this Kind of Problems...


    Thanks :)


    PS: I found a zip with some Enviro Grass Replacement shaders. Can I use those instead of my own? When I set cutout to 0 my black Areas won't disappear, but when I set 0.01 everything is gone, how can I get it working with my transparent png?
     
    Last edited: Sep 15, 2017
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I am currently not home, but take a look in EnviroSky.cs there already is code to convert to DateTime. You can pass in the day of year and DateTime will calculate the month for you.

    For your second issue you need to change one line in EnviroFog.cs.
    Remove the "//" from the line"//[ImageEffectOpaque]".
    Reason: The atmospheric fog effect relies on depth buffer but transparent materials can't write to depth. By re-adding this line the fog will be drawn before any transparent materials.
     
    Firlefanz73 likes this.
  48. Yborshik

    Yborshik

    Joined:
    Apr 3, 2017
    Posts:
    4
    Hello,
    Thank you for your asset, but I have some problems. I am working with multicameras, but in your asset i can only add one camera.
    Can you give me advice how can I share camera effects on all cameras?
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hm okay, do you work on a splitscreen coop project? Out of the box enviro can only output sky on one camera at the time. Switching cameras is no problem with the ChangeFocus function. I also could provide you with a script to output to multiple cameras after weekend, as long as your players are close together.

    Otherwise it get quite complex and we need different layers for each player and quite a lot of rewritting.
     
  50. Yborshik

    Yborshik

    Joined:
    Apr 3, 2017
    Posts:
    4
    It would be great. Then i will wait your answer. Thank You very much!!!