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

    Evallis

    Joined:
    Nov 6, 2012
    Posts:
    20
    Ah that was it, my camera kept removing the satellite layer on start, thanks!
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    It actually should remove the layer from your main camera. Those object should be rendered from "Enviro Sat Camera" that will be created when you assign some additional satellites. That camera renders to a render texture that will be sampled in skybox. So maybe check the "Enviro Sat Camera" and the attached render texture if there is something wrong here.
     
  3. kambala

    kambala

    Joined:
    Aug 3, 2017
    Posts:
    4
    There are just "The field is assigned but its value is never used" warnings in the console.
    Player Define Symbols also defined "ENVIRO_LW;ENVIRO_HD;ENVIRO_LWRP"... the project is a new one.
    Unity version is 2019.2
     
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Do you really checked the iOS player settings?

    upload_2019-12-9_20-37-34.png

    Only thing I could think of why it might fail. Otherwise send me a private message or join enviro discord channel for better communication and find a solution together.
     
  5. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    I've sent you a PM.
     
  6. StarChick971

    StarChick971

    Joined:
    Nov 28, 2015
    Posts:
    118
    Hello, I accidentally activated FogVolume 3 third party because I wrongly thought it was compatible with Volumetric Fog and Mist from Kronnect. Now I am getting error as the documentation warns:
    upload_2019-12-12_13-35-15.png

    I can't fix it as the module are not re-compiled yet so I can't acces to the menu to deactivate FogVolume support as the Enviro manager give me this:
    upload_2019-12-12_13-35-46.png

    Please help me and whoever has encountered the same issue due to the integration mistake.
    Thank you.
     
  7. StarChick971

    StarChick971

    Joined:
    Nov 28, 2015
    Posts:
    118
    I found the fix myself after minutes thanks to a anwser above. It was simply needed to remove the ENVIRO_FV3_SUPPORT value from Scripting Define Symbols in the project settings to deactivate a third party component.
    upload_2019-12-12_14-17-18.png

    I hope this will help anyone facing the same issue.

    @Vondox: It would be great to add this to the troubleshooting chapter in the Enviro documentation.
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, yeah I will add this to documentation. Thanks for your feedback. :)
     
    StarChick971 likes this.
  9. GambitMonkey

    GambitMonkey

    Joined:
    Apr 5, 2016
    Posts:
    65
    @Vondox Want to start off by saying that I really enjoy your asset and think you have done an amazing job keeping up with Unity updates and are always super active here on the boards. So when we started to look for a day/night/weather system for our game there was no hesitation to go with Enviro.

    So to my conundrum. We are basically spinning up a global environment server process that when a world server spins up it goes to this server and requests current date/time/weather etc etc. This way all world servers are pretty much in sync as far as day and night cycles and weather/season statuses. I have been playing with different ways to do this and I know you have a start as server option on the EnviroSkyMgr, but is there a way to instantiate and setup an enviro instance all through code so that when the Environment Server starts it basically sets up Enviro behind the scenes?

    I hope I am not over thinking this as I have been prototyping a few different options over the last few days and think I am starting to get lost in the weeds.

    Doing this currently
    Code (CSharp):
    1. public override void OnStartServer()
    2.         {
    3.             //Create a EnviroSkyMgr Object so it can track environment information
    4.             if (EnviroSkyMgr.instance == null)
    5.             {  
    6.                 enviroGameObject = new GameObject("EnviroSkyMgr");
    7.                 enviroGameObject.transform.SetParent(this.transform);
    8.                 enviroGameObject.AddComponent<EnviroSkyMgr>();
    9.                 Debug.Log("[EnvironmentNetworkManager] EnviroSkyMgr GameObject Created");
    10.             }            
    11.             if (IsServer)
    12.             {
    13.  
    14.                 EnviroSkyMgr.instance.CreateEnviroHDInstance();
    15.                 Debug.Log("[EnvironmentNetworkManager] Enviro HD Instance Created");
    16.                 EnviroSkyMgr.instance.currentEnviroSkyVersion = EnviroSkyMgr.EnviroSkyVersion.HD;
    17.                 EnviroSkyMgr.instance.ActivateHDInstance();
    18.                 Debug.Log("[EnvironmentNetworkManager] Enviro HD Instance Activated");
    19.                 //TODO: Read Last Environment Time Save from DB
    20.                 //Set DateTime of EnvironmentServer
    21.                 EnviroSkyMgr.instance.SetTime(DateTime.Now);
    22.                 Debug.Log(String.Format("Enviro Time Set To: {0}",DateTime.Now.ToString()));
    23.                 EnviroSkyMgr.instance.SetAutoWeatherUpdates(true);
    24.                 Debug.Log("[EnvironmentNetworkManager] Enviro Auto Weather Updates Set");
    25.                
    26.                 EnviroSkyMgr.instance.StartAsServer();
    27.                 Debug.Log("[EnvironmentNetworkManager] Enviro Started in Server Mode");
    28.  
    29.  
    30.                 //EnviroSkyMgr.instance.OnSeasonChanged += (EnviroSeasons.Seasons season) =>
    31.                 //{
    32.                 //    //SendSeasonToClient(season);
    33.                 //};
    34.                 //EnviroSkyMgr.instance.OnZoneWeatherChanged += (EnviroWeatherPreset type, EnviroZone zone) =>
    35.                 //{
    36.                 //    //SendWeatherToClient(type, zone);
    37.                 //};
    38.             }                      
    39.             base.OnStartServer();
    40.         }
    Thanks in advance!
     
    Last edited: Dec 13, 2019
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, I would have done it pretty much the same. So looks good to me. Does something not work correctly, or do you just wanted to ask if this is the right way to do this?
     
  11. GambitMonkey

    GambitMonkey

    Joined:
    Apr 5, 2016
    Posts:
    65
    @Vondox Glad to know I am on the right track, but I am having an issue where the code runs just fine in the editor, but when I do a server build and run it Enviro seems to be throwing a NullReferenceException on this line of code.

    EnviroSkyMgr.instance.SetTime(year, dayOfYear, hour, minute, second);

    in this block of code. I have added some additional debug lines trying to figure out what is happening.

    Code (CSharp):
    1. if (IsServer)
    2.             {
    3.                 EnviroSkyMgr.instance.CreateEnviroHDInstance();
    4.                 Debug.Log("[EnvironmentNetworkManager] Enviro HD Instance Created");
    5.                 EnviroSkyMgr.instance.currentEnviroSkyVersion = EnviroSkyMgr.EnviroSkyVersion.HD;
    6.                 EnviroSkyMgr.instance.ActivateHDInstance();
    7.                 Debug.Log("[EnvironmentNetworkManager] Enviro HD Instance Activated");
    8.                 //TODO: Read Last Environment Time Save from DB
    9.                 //Set DateTime of EnvironmentServer
    10.                 if (EnviroSkyMgr.instance != null)
    11.                 {
    12.                     Debug.Log("[EnvironmentNetworkManager] Year: " + year.ToString() + " Day of Year: " + dayOfYear.ToString() + " Hour: " + hour.ToString() + " Minute: " + minute.ToString() + " Second: " + second.ToString());
    13.                     EnviroSkyMgr.instance.SetTime(year, dayOfYear, hour, minute, second);
    14.                     Debug.Log("[EnvironmentNetworkManager] Enviro Time Set To: " + EnviroSkyMgr.instance.GetTimeStringWithSeconds());
    15.                     EnviroSkyMgr.instance.SetAutoWeatherUpdates(true);
    16.                     Debug.Log("[EnvironmentNetworkManager] Enviro Auto Weather Updates Set");
    17.                     EnviroSkyMgr.instance.Time.ProgressTime = EnviroTime.TimeProgressMode.SystemTime;
    18.                     Debug.Log("[EnvironmentNetworkManager] Enviro TimeProgressMode Set To: SystemTime");
    19.                     EnviroSkyMgr.instance.StartAsServer();
    20.                     Debug.Log("[EnvironmentNetworkManager] Enviro Started in Server Mode");
    21.                 }
    22.                 else
    23.                 {
    24.                     Debug.Log("[EnvironmentNetworkManager] EnviroSkymgr.Instance is null");
    25.                 }
    26.  
    27.  
    28.                 //EnviroSkyMgr.instance.OnSeasonChanged += (EnviroSeasons.Seasons season) =>
    29.                 //{
    30.                 //    //SendSeasonToClient(season);
    31.                 //};
    32.                 //EnviroSkyMgr.instance.OnZoneWeatherChanged += (EnviroWeatherPreset type, EnviroZone zone) =>
    33.                 //{
    34.                 //    //SendWeatherToClient(type, zone);
    35.                 //};
    36.             }
    Running in Editor
    upload_2019-12-15_22-6-41.png

    Server Build
    upload_2019-12-15_22-11-9.png

    Do you have any idea what may be causing this behavior?

    Driving me crazy. I have looked at unity bugs that might be causing this and I can't find anything. I just bumped up to 2019.3.0f3 to see if maybe that would resolve it but same thing.

    Thanks for your help,
    Garry
     
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Okay sorry... I forgot about that the CreateEnviroHDInstance() only works in editor and is disabled in builds as it uses the UnityEditor.AssetDatabase.

    So we need some workaround here. Add a new function to instantiate the envirosky prefab. Something like this:

    Code (CSharp):
    1.    
    2.     public void CreateEnviroHDInstance(GameObject prefab)
    3.     {
    4.         if (prefab != null && EnviroSkyMgr.instance != null && EnviroSky.instance == null)
    5.         {
    6.             GameObject inst = (GameObject)Instantiate(prefab, Vector3.zero, Quaternion.identity);
    7.             inst.name = "EnviroSky Standard";
    8.             inst.transform.SetParent(EnviroSkyMgr.instance.transform);
    9.             EnviroSkyMgr.instance.enviroHDInstance = inst.GetComponent<EnviroSky>();
    10.             inst.SetActive(false);
    11.             EnviroSkyMgr.instance.currentEnviroSkyVersion = EnviroSkyMgr.EnviroSkyVersion.None;
    12.         }
    13.     }
    14.  
    You can find the prefab in Enviro Standard -> Prefabs folder. Or move it to resource folder and use LoadResource here for example.

    Another small thing here: You also need to add the EnviroEvents component on your EnviroSkyMgr gameobject.

    That should fix your issue. :)
     
  13. GambitMonkey

    GambitMonkey

    Joined:
    Apr 5, 2016
    Posts:
    65
    @Vondox Thank you for such a quick and great response. This resolved my issue and is working great. Here is final code in case this could help someone else.
    Code (CSharp):
    1. public override void OnStartServer()
    2.         {
    3.             //Create a EnviroSkyMgr Object so it can track environment information
    4.             if (EnviroSkyMgr.instance == null)
    5.             {
    6.                 enviroGameObject = new GameObject("EnviroSkyMgr");
    7.                 enviroGameObject.transform.SetParent(this.transform);
    8.                 enviroGameObject.AddComponent<EnviroSkyMgr>();
    9.                 enviroGameObject.AddComponent<EnviroEvents>();
    10.                 Debug.Log("[EnvironmentNetworkManager] EnviroSkyMgr GameObject Created");
    11.             }
    12.  
    13.             if (IsServer)
    14.             {
    15.                 //EnviroSkyMgr.instance.CreateEnviroHDInstance();
    16.                 CreateEnviroHDInstance(enviroSkyGameObject);
    17.                 Debug.Log("[EnvironmentNetworkManager] Enviro HD Instance Created");
    18.                 EnviroSkyMgr.instance.currentEnviroSkyVersion = EnviroSkyMgr.EnviroSkyVersion.HD;
    19.                 EnviroSkyMgr.instance.ActivateHDInstance();
    20.                 Debug.Log("[EnvironmentNetworkManager] Enviro HD Instance Activated");
    21.                 //TODO: Read Last Environment Time Save from DB
    22.                 //Set DateTime of EnvironmentServer
    23.                 EnviroSkyMgr.instance.SetTime(DateTime.Now);
    24.                 Debug.Log("[EnvironmentNetworkManager] Enviro Time Set To: " + EnviroSkyMgr.instance.GetTimeStringWithSeconds());
    25.                 EnviroSkyMgr.instance.SetAutoWeatherUpdates(true);
    26.                 Debug.Log("[EnvironmentNetworkManager] Enviro Auto Weather Updates Set");
    27.                 EnviroSkyMgr.instance.Time.ProgressTime = EnviroTime.TimeProgressMode.SystemTime;
    28.                 Debug.Log("[EnvironmentNetworkManager] Enviro TimeProgressMode Set To: SystemTime");
    29.                 EnviroSkyMgr.instance.StartAsServer();
    30.                 Debug.Log("[EnvironmentNetworkManager] Enviro Started in Server Mode");
    31.  
    32.                 //EnviroSkyMgr.instance.OnSeasonChanged += (EnviroSeasons.Seasons season) =>
    33.                 //{
    34.                 //    //SendSeasonToClient(season);
    35.                 //};
    36.                 //EnviroSkyMgr.instance.OnZoneWeatherChanged += (EnviroWeatherPreset type, EnviroZone zone) =>
    37.                 //{
    38.                 //    //SendWeatherToClient(type, zone);
    39.                 //};
    40.             }
    41.  
    42.             base.OnStartServer();
    43.         }
    44.  
    45.         private void CreateEnviroHDInstance(GameObject prefab)
    46.         {
    47.             if (prefab != null && EnviroSkyMgr.instance != null && EnviroSky.instance == null)
    48.             {
    49.                 GameObject inst = (GameObject)Instantiate(prefab, Vector3.zero, Quaternion.identity);
    50.                 inst.name = "EnviroSky Standard";
    51.                 inst.transform.SetParent(EnviroSkyMgr.instance.transform);
    52.                 EnviroSkyMgr.instance.enviroHDInstance = inst.GetComponent<EnviroSky>();
    53.                 inst.SetActive(false);
    54.                 EnviroSkyMgr.instance.currentEnviroSkyVersion = EnviroSkyMgr.EnviroSkyVersion.None;
    55.             }
    56.         }
     
    Vondox likes this.
  14. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hello,

    Im wondering if there's something that can be done if Im not quite happy with how the lighting looks when the sun is setting down and I look on the opposite direction. If I look at the direction of the sun, the lighting is really good but not if I turn 180.
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, pure lighting of your scene like terrain or do you talk about the sky and effects like light rays? Please send me some screenshots of your scene in private message to find our what we can do here. :)
     
  16. NatureSimsVR

    NatureSimsVR

    Joined:
    Jul 14, 2015
    Posts:
    27
    Hello,

    I just purchased Enviro a few weeks ago but I'm already loving it. I'm trying to do realistic nature scenes in VR and Enviro is my new favorite tool-set!

    One question: is there any way to manually control the distance blur effect? It's a really nice feature but the default settings are a little intense for my scene (see screenshot), and I couldn't see any easy way to tweak it.

    You play as a frog in this, so the scale and the distances are both irregular, so it would be great to be able to modify the intensity and/or start distance.

    Thanks in advance!
    Kai

    upload_2019-12-20_10-9-51.png
     

    Attached Files:

  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, please check your weather presets. :)

    upload_2019-12-20_16-26-9.png
     
  18. NatureSimsVR

    NatureSimsVR

    Joined:
    Jul 14, 2015
    Posts:
    27
    Just what I was looking for--thanks!!
     
  19. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    @Vondox : I think the skybox baking is broken. (as you can see on the bottom right of image), for some reason the right side of it - is like a solid blue.
    upload_2019-12-21_2-40-47.png
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, yeah I know about that bug. Just try to bake again and it should work on second try. At the moment not sure why it fails on first try sometimes...
     
    KRGraphics likes this.
  21. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Awesome, thank you so much! Worked lovely doing that.

    Was this bug mentioned anywhere, not sure if I missed that noted detail somewhere. If not I think it would be helpful to have a FAQ or something with that tid bit of info in it :) (Unless there is one and I couldn't find it lol).
     
  22. unity_dev3194

    unity_dev3194

    Joined:
    Apr 17, 2017
    Posts:
    79
    @Vondox Does Enviro (standard or lite) support Nintendo Switch?
     
  23. TheFlyHawk

    TheFlyHawk

    Joined:
    Mar 23, 2016
    Posts:
    58
    20191225133830.png
    Can the runtime modify the cloud quality?
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, in theory should be supported. But I can't test so can't fully tellyou if everything works correctly. Please tell me if you see any issues and Ican try to fix those.
     
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello. :)

    EnviroSky.instance.ApplyVolumeCloudsQualityPreset(value);

    "value" can be a preset file, an int or the name of the preset here as string.

    For example:

    EnviroSky.instance.ApplyVolumeCloudsQualityPreset(0); will apply the lowest quality

    or EnviroSky.instance.ApplyVolumeCloudsQualityPreset("5 Ultra"); will apply ultra quality
     
  26. julesd

    julesd

    Joined:
    Sep 30, 2016
    Posts:
    26
    Is there any info on why the Clouds show through the Unity 2D terrain detail grass (Billboard)? When I bring the camera down to the grass the clouds show first in camera. Looks weird.

    Geforce GTX 1050TI.
    Unity 2019.3.0f3.
    Using URP High with Enviro.
    Terrain Shader= 'LB Terrain' from Landscape Builder.
    Latest Crest Ocean.
     
  27. anseyder

    anseyder

    Joined:
    Feb 5, 2018
    Posts:
    20
    Hi, I just updated enviro skies, and set up a new scene as per the instructions document in a standard render pipeline. No matter what I do the clouds don't apppear in the sky, they show up in reflections and all the weather FX happen but the sky remains plain blue. Any suggestions on how to fix it? I've tried all the different cloud presets but nothing seems to work.
     
  28. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    First image is a reference from World Creator where it was rendered. Keep in mind that World Creator has higher quality render with Raymarching and Unity stuff won't look 1:1 :). I also failed to reproduce the colors with color grading in Built-in PP stack. Yes i use Built-in since in HDRP a lot of stuff don't work (Enviro etc.).

    Terrain was created with World Creator Standalone (PRO) and Quadspinner GAEA. Textures are from Gametextures.
    In Unity Microsplat as terrain shader and Enviro for light and atmosphere.
     

    Attached Files:

    • 0.jpg
      0.jpg
      File size:
      797 KB
      Views:
      441
    • 1.jpg
      1.jpg
      File size:
      295 KB
      Views:
      462
    • 2.png
      2.png
      File size:
      2.4 MB
      Views:
      469
    • 3.png
      3.png
      File size:
      2.3 MB
      Views:
      484
    • 4.png
      4.png
      File size:
      2.3 MB
      Views:
      465
    Vondox, Bartolomeus755 and Rowlan like this.
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, unfortunaly looks like that the billboard grass shader does not correctly write to depth texture in URP. Nothing I can do on Enviro side here. Please use the non-billboard grass for now and wait for a fix.
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, please check your camera. Is the EnviroSkyRendering component activated?
     
  31. anseyder

    anseyder

    Joined:
    Feb 5, 2018
    Posts:
    20
    that was it - thanks so much!
     
  32. julesd

    julesd

    Joined:
    Sep 30, 2016
    Posts:
    26
    Ok, Thanks.
     
  33. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Any News on the HDRP Enviro Sky? :D
     
  34. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    @Vondox

    Hello, I have just integrated Enviro Sky and Weather into my 2019.3 project. I am using Vegetation Studio Pro to spawn instanced indirect trees and grass meshes. Since enabling Enviro into my scene, all of the meshes which are instanced indirectly spawned cast but do NOT receive shadows when entering play mode. They do receive shadows in scene view.
     
  35. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Maybe I am missing something but how does Enviro knows where the sun and moon should appear, based on a terrain?

    Does it calculate the terrain size and position itself or do I have to manually move the sun and moon and modify their trajectory? I am asking because I create a 4K terrain and added enviro on it; the sun seems to go up at the correct time and go down at the correct time, in line with the horizon; but the moon seems off.
    There is a period when the moon goes down, when there is no light source nor sky objects; but then when the sun is about to rise, the moon appear, followed by the sun.

    I understand that the terrain has to be at 0.0.0 to be in line with the ground plane, and that the moon position change with seasons, but I am trying to match the current time of the day and night and it does not match. Is this a bug or do I have to change something? Thanks
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, I have contacted Lennart about that. Currently unsure why your objects don't recieve shadows.
    Do you already assigned the "Enviro Directional Light" in VS Pro Render settings?
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, hm no nothing more you need to do here. Could you please tell me your date and longitude/latitude? Those are the only settings that will be used to calculate the sun and moon position.
     
  38. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    @Vondox

    I reimported the whole package and that solved it. I had been clicking buttons to see what they do so most likely I did something odd. If I manage to do it again maybe I can figure out exactly what I did.
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hi, still wip and in testing. Please join enviro discord channel if you want to participate.
    https://discord.gg/5c6kfW6
     
  40. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Sure, date is 1/3/2020 and lat-lon are 0 for both; I didn't change them from the default values.

    I created a terrain, added enviro, set the player and camera and changed the day/night cycle to 2 minutes to test the transition and the effect on the terrain.
     
  41. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    First image is a reference from World Creator Standalone PRO :)

    In Unity Micro + Enviro + Aquas + Gametextures. Terrain made purely with World Creator Standalone PRO
     

    Attached Files:

    • 0.jpg
      0.jpg
      File size:
      813 KB
      Views:
      471
    • 1.png
      1.png
      File size:
      2.8 MB
      Views:
      477
    • 2.png
      2.png
      File size:
      2.9 MB
      Views:
      483
    • 3.png
      3.png
      File size:
      2.9 MB
      Views:
      490
    • 4.png
      4.png
      File size:
      2.8 MB
      Views:
      456
    Bartolomeus755 and Vondox like this.
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm, it looks all good to me. I can't reproduce that the moon will rise and the sun will follow here. Maybe try to setup some other location on earth by changing the lat/long and utc offset. You can compare the sun and moon rise and set times then with realworld ones oyu find on internet. They should match and are realistic. Otherwise contact me in private message and we can have a detailed look whats going wrong on your side.
     
  43. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Thanks; I was able to fix it by changing the sky panel options. Both sun and moon were set to realistic; I just changed the sun setting from realistic to simple, leaving the moon as realistic, and now when the cycle is performed, I get the moonlight gleaming until the moon is up, which means that the whole scene is dark but not pitch black at any point in time; and the sun and moon alternate nicely in the sky.
     
  44. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Is it possible to alter a single weather prefab directly in runtime for constant control over the weather, rather than switching between different prefabs? They're just ScriptableObjects, ya?
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hi, sure you can access the current active weather peset this way:

    EnviroSkyMgr.instance.Weather.currentActiveWeatherPreset
     
    malkere likes this.
  46. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hello, I have a question about saving and loading because I didnt find anything in the docs. Im using EasySave3 and made these scripts. Please note that I havent done anything for Weather because I have only 1 weather preset atm.

    Code (CSharp):
    1.     public static class EnviroSaveLoadUtility
    2.     {
    3.  
    4.         public static void SaveEnviroData(string filePath)
    5.         {
    6.             var currentScene = SceneManager.GetActiveScene().name;
    7.          
    8.             var enviroData = new EnviroDataSerialized()
    9.             {
    10.                 TimeOfDay = EnviroSky.instance.GetTimeOfDay(),
    11.                 CurrentDay = EnviroSky.instance.currentDay,
    12.                 CurrentYear = EnviroSky.instance.currentYear,
    13.                 CurrentWeathertId = EnviroSky.instance.GetActiveWeatherID()
    14.             };
    15.  
    16.             ES3.Save<EnviroDataSerialized>(currentScene, enviroData, filePath);
    17.          
    18.         }
    19.  
    20.         public static void LoadEnviroData(string filePath)
    21.         {
    22.             if (!ES3.FileExists(filePath)) return;
    23.  
    24.             var currentScene = SceneManager.GetActiveScene().name;
    25.  
    26.             if (!ES3.KeyExists(currentScene, filePath)) return;
    27.  
    28.             var enviroData = ES3.Load<EnviroDataSerialized>(currentScene, filePath);
    29.  
    30.             EnviroSky.instance.currentDay = enviroData.CurrentDay;
    31.             EnviroSky.instance.currentYear = enviroData.CurrentYear;
    32.             EnviroSky.instance.SetInternalTimeOfDay(enviroData.TimeOfDay);
    33.  
    34.         }
    35.      
    36.     }
    Is that the way we should do saving and loading?
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yeah, looks good to me. Does it work correctly?!
     
    skinwalker likes this.
  48. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Yes, I will keep using it in that case
     
  49. kbk652002

    kbk652002

    Joined:
    Aug 12, 2019
    Posts:
    1
    Hi, First of all Thanks for your great work! but Can i use this asset in lwrp? when i open enviro-sample in lwrp, I can't find cloud texture in scene. Have any plan support for lwrp? :)
     
  50. Firlefanz73

    Firlefanz73

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

    I am working on my Configuration for my PC and Android game, that loads enviro dynamically so only can use EnviroSkyMgr to set properties.

    I have HDR Setting:
    Code (CSharp):
    1.         Camera.main.allowHDR = Globals.ConfigData.UseHDR;
    2.         EnviroSky.instance.HDR = Globals.ConfigData.UseHDR;
    3.         EnviroSkyMgr.instance.Components.GlobalReflectionProbe.hdr = Globals.ConfigData.UseHDR;
    -> How do I set this with the EnviroSkyMgr?
    EnviroSky.instance.HDR = Globals.ConfigData.UseHDR;

    And I have a "simple" Setting which should be used by old Smartphones and old laptops for better Performance:
    -> How do I set this with the EnviroSkyMgr?
    EnviroSky.instance.ApplyVolumeCloudsQualityPreset(0);

    Are These useful for simple mode?

    Code (CSharp):
    1.  
    2.    if (Globals.Configdata.UseSimple)
    3.         {
    4.             EnviroSkyMgr.instance.useVolumeClouds = false;
    5.             EnviroSkyMgr.instance.useVolumeLighting = false;
    6.             EnviroSky.instance.LightShafts.sunLightShafts = false;
    7.             EnviroSky.instance.LightShafts.moonLightShafts = false;
    8.             EnviroSky.instance.fogSettings.useSimpleFog = true;
    9.             EnviroSky.instance.qualitySettings.GlobalParticleEmissionRates = 0.3f;

    If these are useful, I do not find the LightShafts and the qualitySetting in EnviroSkyMgr. Or can I get from EnviroSkyMgr to (Current)EnviroSky somehow and use everything from there?

    Thanks a lot and have a nice Sunday.