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

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    For some reason, my sun is at its highest position at 5:00, and has just finished setting at noon. That is because of latitude and longitude, but does that make any sense?

    Also, does Enviro simulate night lengths and day lengths based on time of year (with equinox and solstices)?
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    You need to change the UTC timeoffset to match your long and lat. The day and night length will change over year, but the time progress in realtime minutes setting currently don't.
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Didn't heard any complains about bad performance. You have a lot of settings to tweak it too and should be able to run enviro even on lower end machines with matching config.
     
    mattis89 likes this.
  4. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    For me personally it is very good.
    I have removed some own particle Clouds and own procedural skybox, added Enviro instead, the FPS stayed the same and it looked way better. It gave me also a huge step ahead in lighting.
     
    LaurieAnnis likes this.
  5. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi on build with Aquas integration I get some errors
    Code (CSharp):
    1. null reference on line 58;
    2. enviroWaterDepth.SetActive (false);
    3.  
    So I changed to;
    Code (CSharp):
    1. if(enviroWaterDepth == null)
    2.                     CreateWaterFixObject (waterObject);
    3.              
    4.                 if(enviroWaterDepth != null)
    5.                     enviroWaterDepth.SetActive (false);
    but now theres a new error about the shader;
    Code (CSharp):
    1. at EnviroAquasIntegration.CreateWaterFixObject (UnityEngine.GameObject aquas) [0x0008c] in E:\Unity Projects\Survival_Game\Assets\Enviro - Dynamic Enviroment\Scripts\AQUAS Integration\EnviroAquasIntegration.cs:146
    Which refers to this line as the lines have changed since I added more code;
    Code (CSharp):
    1. Material mat = new Material (Shader.Find ("Enviro/Depth"));
    Thanks alot Jim

    edi!
    FIXED! added shader to the enviro resources shader folder
     
    Last edited: Sep 27, 2017
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hehe, you were faster. Sorry for that dumb mistake on my side. :D
     
  7. renski

    renski

    Joined:
    Sep 27, 2013
    Posts:
    14
    Hi

    I bought the package and need multicamera support as weel for a vehicle sim. I have a 3 monitor setup and multiple cameras as mirrors.

    Is this solution/script production ready ? Can you share the script or update the asset please ?

    I am also having the terrain trees not responding to the light.

    tress.jpg
     
    Last edited: Sep 28, 2017
  8. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    I am looking for a recommendation on what textures/materials, trees,vegetation I can pick up to setup seasons. This is a FPS survival game we are building for our weekly LAN parties. We are very new limited knowledge and funds. Project is for personal use not for sale. We are not trying for voxel, procedural, open world, or things along those lines. We want a pre-made height map (sure we would love to dig and mine but we are not that new and know we do not know enough to go that route).

    This is NOT a multi-player project. Though we would like to get 5-10 WORKING projects completed to learn enough to make our own MMO or 4-8 player PVP/PVE game. We are avoiding the pre made packs that promise this. When we start that project it will be planned as multiplayer from the start not something we try to add later (watched, read, enough of those horror stories to know better)

    We are using uNature (GPU grass and interactable trees), Enviro, Aquas, Gaia, Gena, and a few others for making our world that we can choose from/mix and match. The plan is for Temperature to play a Medium burden in the survival, and we want good visual clues about what season your in. Leaves that change, snow, ice/freezing water (no clue yet on how to pull this part off), flowers that brown out or in bloom.

    We prefer more realistic textures not cartoonish. So if people would suggest some packs or ideas would help a lot. So far the best ones we have found are from Yughues which we like. Sorry this got so long.
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Sure, I will send you the script for multi camera support. I haven't found any issues, but some testing in other projects would be nice.

    What shader your trees using? The default Unity one? These are not recommended, the Unity tree billboard shader is messed up and does not write to depth buffer. So they won't work depth based image effects like enviro fog. I would recommend using a third party tree system like AltTrees for example.

    Hm the clouds in your screenshot looking off. Do you have deactivated fog? Here are a few more tipps for better clouds:
    Please check these parameters in your profile -> clouds category:

    upload_2017-9-28_12-10-52.png upload_2017-9-28_12-16-14.png
     
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Last edited: Sep 28, 2017
    Bartolomeus755 likes this.
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    For trees I currently would use SpeedTree. Many of these ship with seasonal versions. But they are not the cheapest ones. For example this pack.

    Maybe also take a look on the assets from NatureManufacture.
     
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Comparison with volume lighting enabled/disabled:

    Volume Lighting ON:
    screen_1920x1080_2017-09-28_13-07-12.png
    And OFF:
    screen_1920x1080_2017-09-28_13-06-59.png
     
    Bartolomeus755 and Firlefanz73 like this.
  13. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    That Enviro 2.0 Beta Screens Look very good :)

    A question please:

    I can Switch to Editor mode in my game.

    If I Switch to Editor how can I:

    In runtime (script):
    Stop / Freeze the time (it is not so good to edit at night)
    Stop / Freeze the weather (no rain etc)

    And let go again if Edit Mode is finished?

    So
    Force daytime and force good weather and turn that off again?
    No Need to save current state before turning off, you must end and reload the Scene for Game or Editor switching.

    Thanks a lot! :)
     
  14. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    hi Vondox
    i want to know if possible change tree(terrain) depending the season?
    thanks
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Sorry, that isn't possible out of the box at the moment. I think best would be a shader based solution. That way we could have a smooth transition between seasons.
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Maybe something like this:

    Code (CSharp):
    1.    
    2.     private float time = 0f;
    3.     private EnviroWeatherPreset weather;
    4.  
    5.     void StartEditMode ()
    6.     {
    7.         //Save time and weather
    8.         time = EnviroSky.instance.GetUniversalTimeOfDay ();
    9.         weather = EnviroSky.instance.Weather.currentActiveWeatherPreset;
    10.  
    11.         //Stop time progress
    12.         EnviroSky.instance.GameTime.ProgressTime = EnviroTime.TimeProgressMode.None;
    13.         //Set Time to 12:00
    14.         EnviroSky.instance.SetInternalTimeOfDay (12f);
    15.         //Set to Clear Sky
    16.         EnviroSky.instance.SetWeatherOverwrite (0);
    17.     }
    18.  
    19.     void StopEditMode ()
    20.     {
    21.         //Set time
    22.         EnviroSky.instance.SetInternalTimeOfDay (time);
    23.         //Set time progress back to simulated
    24.         EnviroSky.instance.GameTime.ProgressTime = EnviroTime.TimeProgressMode.Simulated;
    25.         // Change active weather
    26.         if(weather != null)
    27.             EnviroSky.instance.SetWeatherOverwrite (weather);
    28.     }
     
  17. renski

    renski

    Joined:
    Sep 27, 2013
    Posts:
    14
    Hi. Thanx for your fast reply.

    Yes, I am using the tree billboard shader. Will check altTrees for sure and send you my email in a pm with the invoice number.

    BTW fantastic weather results...
     
  18. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hi and thanks for the hint.

    The time stop seems to work, but it starts raining after a while.

    I debbuged and found a Problem here:

    Code (CSharp):
    1.     public void SetWeatherOverwrite (int weatherId)
    2.     {
    3.         if (weatherId < 0 || weatherId > Weather.WeatherPrefabs.Count)
    4.             return;
    5.  
    6.         if (Weather.WeatherPrefabs[weatherId] != Weather.currentActiveWeatherPrefab)
    Weather.WeatherPrefabs.Count is 0. The above runs into a error.
    Later starts raining again...

    Thanks :)
     
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm maybe try to deactivate auto weather change.

    Code (CSharp):
    1. EnviroSky.instance.Weather.UpdateWeather=false;
    When is the weather list empty? When you want to switch back to game mode? Try to run this in a coroutine with yield return 0; So it get called in next frame and lists should be set.
     
    Firlefanz73 likes this.
  20. DesQuik

    DesQuik

    Joined:
    Jun 14, 2017
    Posts:
    2
    Hello. What is this? How can i fix it?
    It appears if the settings are above average.
    Occurs only if prefab is included in the scene.
    Thanks.
     

    Attached Files:

  21. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Do you have multiple reflection probes active in your scene? Please try to deactivate the enviro global reflections in lighting category. Also are you using linear or gamma colorspace?

    upload_2017-9-28_23-14-25.png
     
  22. DesQuik

    DesQuik

    Joined:
    Jun 14, 2017
    Posts:
    2
    Yes, i have multple reflection probes. Use gamma colorspace, but tried use linear. Tried deactivate global reflections, but
    problem still exists.

    UPD: Sorry, this is my guilt. I added one line to the script for the camera. Really, sorry man.
     
    Last edited: Sep 28, 2017
  23. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    What is done in the EnviroSkyRendering.OnPreRender function (in the EnviroSkyRendering script on my main camera)? That is slowing down my game a lot.
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Rendering Clouds and Sky. I think we already talked about that before.

    * Only activate singlepass in "Rendering Setup" when you really use singlepass VR.
    * Try to use a clouds resolution between 5 - 8 in clouds category. (higher value -> faster)
    * Make sure that clouds and sky layer not used by any of your scene objects.

    Maybe also try to remove all enviro related objects and components from your scene and do a fresh install.

    On my PC (i5 3570k, Radeon 285 3GB) the PreRender takes about 0.35 - 0.45ms. If I remember correctly you see a lot higher impact in your scene.
     
  25. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    I think the correct english Statement for this is "Works like a charm". Thanks!
     
    Vondox likes this.
  26. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Hi Vondox
    i want to know if is possible have a prediction for the next weather? (example tomorrow is sunny)
     
  27. Freshmeat911

    Freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    79
    Funny I thought of this a couple days ago and forgot about it so thank you lol
     
  28. Freshmeat911

    Freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    79
    Anyone have any good ideas for huge terrains ie multiple islands at least a couple kms each with ocean floor in between
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Currently not, but a good idea! I will add that feature to Enviro 2.0. :)
     
    dashasalo and claudius_I like this.
  30. Stefan86

    Stefan86

    Joined:
    Aug 31, 2017
    Posts:
    62
    hey .. I would like to change the sfx volume of enviro over my mainmenu knows someone the command for it?
     
  31. Vondox

    Vondox

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

    please add these two functions to your menu script:

    Code (CSharp):
    1.    
    2.     public void ChangeAmbientVolume (float value)
    3.     {
    4.         EnviroSky.instance.Audio.ambientSFXVolume = value;
    5.     }
    6.  
    7.     public void ChangeWeatherVolume (float value)
    8.     {
    9.         EnviroSky.instance.Audio.weatherSFXVolume = value;
    10.     }
    11.  
    Now add these functions to the "On Value Changed" events in your main menu sliders and it should work. :)
     
  32. Stefan86

    Stefan86

    Joined:
    Aug 31, 2017
    Posts:
    62
    thank you very much .. super fast answer ..
    I'm really glad to have bought enviro .. there is really good help .. thank you
     
    Vondox likes this.
  33. Firlefanz73

    Firlefanz73

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

    I know in the next Version there will be a Feature to have some Kind of Underground or Cave or Inhouse lighting Profile, right? Is the update near, let's say in the next two weeks?

    If not, is there already a possibility to lower the light at daytime (when I know my Player is Underground or in a dark cave), but without stopping or changing the time? And set the light back to "normal" when the cave is left?
    Or can I do that with own additional weather prefabs, add this and overwrite to this as Long as I am Underground?

    Thanks a lot!
     
    Last edited: Oct 1, 2017
  34. feelgoody

    feelgoody

    Joined:
    Oct 2, 2017
    Posts:
    1
    I have installed the asset over older version of the Eideren volumetric clouds and had some conflicts on the files.

    https://www.assetstore.unity3d.com/en/#!/content/25527

    Also i checked the cloud code and seems about same (also the planes setup is exact copy), is Eideren clouds licensed to be used in the asset (or you are also developing these clouds ?)
     
  35. Shodan0101

    Shodan0101

    Joined:
    Mar 18, 2013
    Posts:
    141
    Vondox, Thank you for the amazing asset! Loving it! Just a quick question will you add Volumetric Fog and Lights to v2.0? Meaning Volumetric lights for point, spot and directional lights?
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea, volumetric light and shadow effects for sun/moon, point and spot lights. I also have rewritten the fog and added support for transparent materials. There will be a few transparent shaders already included, but I added a new function to be used in your custom transparent shaders to support fog and volume lights in only a few lines of code.

    upload_2017-10-2_12-14-1.png

    At the end of your shader you need to call this function with following parameters: color,world position,screen uv and eyedepth.
     
    Shodan0101 likes this.
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Unfortunaly not really possible in current version. But I already have added those feature on my side.
    There are new public color parameter to override current light colors based on the mod color alpha value. For example full black with full alpha will completely override light to full black.

    I also created a new component for indoor modification. You can setup triggers with one click for your doors/entrances and activate different modifications. These will smoothly fade in and out when you entering or leaving your indoors.

    I am still working on that one the final version will have these options for now:

    • direct lighting color
    • ambient lighting colors + intensity
    • weather and ambient audio volume
    • distance and height fog intensity
    • weather effects emission rates

    Here a WIP screenshot of that component:

    upload_2017-10-2_15-22-16.png

    I am not sure but you most likely just want to use color modifications in your game logic to dynamicly change lighting conditions as you don't have fixed entries and exits for your caves?
     
    Firlefanz73 likes this.
  38. xmanoux

    xmanoux

    Joined:
    Jul 9, 2015
    Posts:
    19
    Hello, I just purchased the mobile edition, and I want to script weather calls, but don't see any
    EnviroSky.instance public attribute , all the doc seems to refer to that singleton, am I missing something ?
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    That is for the desktop version. Please check documentation for mobile version here:

    Mobile Documentation

    Next release of mobile version will be based on newest desktop version and include all the new features like profile systems, inspectors, two skybox shaders and same api of course. Not sure when I find time to finish, but I give my best to get this out soon.
     
    xmanoux likes this.
  40. xmanoux

    xmanoux

    Joined:
    Jul 9, 2015
    Posts:
    19
    Thank you for the mobile doc link. I've got another question (for mobile) , is there a way I can control the orientation and the force of the rain particles ? (it seems to rely on "WindZone" component, but I can't see a vector or a strengh here) . It's important for me because the wind is a directional force that is important in my gameplay, and I want to notify the player about from where the wind blows.
     
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    The weather effects are unity particle systems. I think you want to activate the "External Forces" module in rain particle systems. Please check the Prefabs - > WeatherPrefabs folder. The particle systems are added as childs to each weather prefab.
     
  42. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Any idea what could be causing this?



    This is only in Editor mode. Play mode is fine, but Enviro makes everything dark in Editor mode which makes level design awfully difficult.

    Edit: Also every texture in the Project view is dark, when importing Enviro. As if it's reflecting this.



    Note: The black textures should be much brighter. Looks fine in play mode, not editor mode.
     
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Uff, never seen this before. What Unity version and do you see that issue in a fresh project too?
     
  44. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Yes I do and I'm using 2017.1.1f1.

    I'm going to do just a fresh project again and see.

    Edit: Not right off the bat. I'm going to slowly add Gaia, etc other assets until it happens again and let you know. In a fresh project the demo scene is fine. I'm also using Linear lighting which seems to always affect it.

    Edit 2: It's gone for now, I'll let you know if it happens again. I had a black sky issue but just found out that was because the Player was not assigned (player is dynamically added to scene) but I just set the player OnStartLocalPlayer and it's good now. Temporarily for the scene Player is MainCamera.
     
    Last edited: Oct 2, 2017
    Vondox likes this.
  45. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    That's right. Like minecraft going underground. Should be at least darker when I am deep Underground.
    And a special case later will be a "cursed land" where the skybox and or the Clouds should have some other color maybe deep red. Not sure about that yet.
     
  46. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I have a question though about the scripting portion of it.

    I am currently using a script to activate/deactivate objects based on time of day/night.

    Code (CSharp):
    1. void Update () {
    2.         EnviroSky.instance.OnHourPassed += () =>
    3.         {
    4.             if (EnviroSky.instance.GameTime.Hours == activeHour)
    5.             {
    6.                 // Activate Object
    7.             } else if (EnviroSky.instance.currentHour == inactiveHour)
    8.             {
    9.                 //Deactivate Object
    10.             }
    11.  
    12.             Debug.Log("Hour: "+ EnviroSky.instance.GameTime.Hours);
    13.         };
    14.  
    15.     }
    This causes a temporary lag spike though when it hits the hour, and the debug log is called 2484 times.

    How would I call this once, on hour passed?
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Only add that event callback once in start or OnEnable and not in update. ;)
     
  48. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Ah! Okay thanks! :)
     
  49. Freshmeat911

    Freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    79
    Does anyone know if it's possible to make lightning at least have a chance to set a "wild" fire?
     
  50. Shodan0101

    Shodan0101

    Joined:
    Mar 18, 2013
    Posts:
    141
    Awesome Thx Vondox! Looking forward to v2.0