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

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    Thanks! I looked in depth, but the error is also doing nothing.. just the enviro set and just the first time
     
  2. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    Any cool new enhancements soon?
     
    Salja likes this.
  3. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I am testing the latest Unity Beta 2018.3.0b7 and Enviro was basically playing nice with previous beta versions but now I am getting this error in the compiler constantly (as its an update):

    NullReferenceException
    EnviroSky.UpdateCameraComponents () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:1378)
    EnviroSky.Update () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:1488)

    Is there an easy quick fix for this?

    Many thanks
     
  4. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    seems my issue...
     
    Hawk0077 likes this.
  5. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    If you find a fix please let me know. I have added a directional light for now to keep editing. I understand though that it is a beta version and couldn't be fully supported until Unity iron out the kinks in 2018.3
     
  6. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    Hello! Is there a set-up video that matches the current version? I have looked at two set-up videos but neither seem to match the version I just installed (2.05).
     
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Thanks for your report. I will investigate that issue in new beta version tomorrow.
     
    Hawk0077 likes this.
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sorry, no newer videos for that online right now. But I will create a new setup video for 2.1 as there are some changes in setup.
     
  9. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I am not sure whats going on but I have Enviro installed in another project (fresh install not upgraded as previous project) and I am not sure of the behaviour but when I set it snowing that works fine until I move the character then the snow stops, possibly dependent on speed of movement. Just thought I would mention that but I understand 2018.3 may not be supported at this stage. Just thought I would mention it. Thanks again
     
  10. TheStrongSkye

    TheStrongSkye

    Joined:
    Oct 29, 2016
    Posts:
    23
    Hi again!
    I am making options menu in my game with clouds quality settings:
    Code (CSharp):
    1.         switch (SKY_cloudsQualityDropdown.value)
    2.         {
    3.             case 0:
    4.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    5.                 EnviroSky.instance.profile.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R1024;
    6.                 break;
    7.  
    8.             case 1:
    9.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    10.                 EnviroSky.instance.profile.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R2048;
    11.                 break;
    12.  
    13.             case 2:
    14.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    15.                 EnviroSky.instance.profile.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R4096;
    16.                 break;
    17.             case 3:
    18.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Volume;
    19.                 EnviroSky.instance.profile.cloudsSettings.cloudsQuality = EnviroCloudSettings.CloudQuality.Medium;
    20.                 break;
    21.  
    22.             case 4:
    23.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Volume;
    24.                 EnviroSky.instance.profile.cloudsSettings.cloudsQuality = EnviroCloudSettings.CloudQuality.High;
    25.                 break;
    26.  
    27.             case 5:
    28.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Both;
    29.                 EnviroSky.instance.profile.cloudsSettings.cloudsQuality = EnviroCloudSettings.CloudQuality.Ultra;
    30.                 EnviroSky.instance.profile.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R4096;
    31.                 break;
    32.         }
    Code is working very well but I want to save this settings to next scene - beacuse options menu is only in Menu scene
    After hitting play, all settings have been restored to default. Any Idea how to "save" this settings ?
    Regards!
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, I would save the sky quality setting in playerprefs. Then check if there is an entry when you start your game, read that and call your function with the saved value. When users changes the quality save again to playprefs of course.

    Oh you also most likely don't want to change the values from profile, instead change the runtime values.

    Something like this:

    Code (CSharp):
    1.  
    2.  
    3. public void SetSkyQuality(int quality)
    4. {
    5. switch (quality)
    6.         {
    7.          
    8.             case 0:
    9.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    10.                 EnviroSky.instance.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R1024;
    11.                 break;
    12.  
    13.             case 1:
    14.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    15.                 EnviroSky.instance.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R2048;
    16.                 break;
    17.  
    18.             case 2:
    19.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Flat;
    20.                 EnviroSky.instance.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R4096;
    21.                 break;
    22.             case 3:
    23.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Volume;
    24.                 EnviroSky.instance.cloudsSettings.cloudsQuality = EnviroCloudSettings.CloudQuality.Medium;
    25.                 break;
    26.  
    27.             case 4:
    28.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Volume;
    29.                 EnviroSky.instance.cloudsSettings.cloudsQuality = EnviroCloudSettings.CloudQuality.High;
    30.                 break;
    31.  
    32.             case 5:
    33.                 EnviroSky.instance.cloudsMode = EnviroSky.EnviroCloudsMode.Both;
    34.                 EnviroSky.instance.cloudsSettings.cloudsQuality = EnviroCloudSettings.CloudQuality.Ultra;
    35.                 EnviroSky.instance.cloudsSettings.flatCloudsResolution = EnviroCloudSettings.FlatCloudResolution.R4096;
    36.                 break;
    37.         }
    38.  
    39. //Save
    40. PlayerPrefs.SetInt("Sky_Quality", quality);
    41. }
    42.  
    43. //Load your setting and apply it
    44. public void LoadSkyQuality()
    45. {
    46. if (PlayerPrefs.HasKey("Sky_Quality"))
    47. {
    48.     int skyQuality = PlayerPrefs.GetInt("Sky_Quality");
    49.     SetSkyQuality(skyQuality);
    50. }
    51. }
    52.  
     
    Last edited: Oct 28, 2018
  12. TheStrongSkye

    TheStrongSkye

    Joined:
    Oct 29, 2016
    Posts:
    23
    Do you mean something like a load settings method ?
    I need to finish my options script - I have save button and it saves global variables to json but i still dont have my load method so maybe a good idea will be to call load method at start of a game. I never thought about it, i was saving options like that using prefabs. I will finish it in near future and i will try to save it this way. Thanks and Regards! :D
     
    Vondox likes this.
  13. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Hi first of all I want to say this is a great asset, AAA quality and really customizable everyone testing my game noticed the sky quality.
    Now I noticed an issue with weather loading so I called it with a coroutine and works great. But is there any tutorial on weather settings? I have this problem with particles not following the camera when moving.
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, thanks! Great to hear. :) The weather particle will follow the player transform that you assigned. Please check if it is the correct one, or assign your camera there too.
     
    VictorKs likes this.
  15. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    The problem is that when I move I get a temporary lag between camera movement and particle system it takes about 1 second before rain starts falling again, is this expected or is there a workaround like increasing particle system size?
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sounds like that you move your camera very fast. Default the particles are simulated in world space in a small circle around the player. Please first try to increase the particle system circle shape radius, also maybe make particle a bit faster. You also could set them to "Local Space" if you still outrun the particles.
     
    VictorKs likes this.
  17. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi Vondex, hope alls well. Did you manage to find a solution for the error mentioned above which was:.

    NullReferenceException
    EnviroSky.UpdateCameraComponents () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:1378)
    EnviroSky.Update () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:1488)

    Many thanks
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, please try latest beta version 2018.3.0.b8. It works nice for me. The error you mention is a bit strange, as this line of code should not be used in any newer version than 2017.3.0. Looks like a bug in Unity 2018.3.0b7...

    Please tell if you still gettings issues in latest beta, but for me it is working now.
     
    Hawk0077 likes this.
  19. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks Vondex, I will backup and post a response after updating.

    Although I do have enviro working fine in 3.0....7 on another project so I'll keep my fingers crossed.

    Thanks again
     
    Last edited: Oct 31, 2018
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Have you already tried to right-click and re-import the EnviroSky.cs?
     
    Hawk0077 likes this.
  21. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    I'm using the lat/lon to locate my Enviro object, but how can I align north on the map/terrain with north on Enviro? Right now the sun is not following the correct path and I believe it is due to alignment of the terrain.
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, please rotate the EnviroSky object in your scene to align with your terrain.
     
  23. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Finally got around to updating to 2.0.5. I moved the Profiles folder out of Enviro, then deleted the Enviro folder, then imported 2.0.5. But now there is a dark circular area around the camera -- it's the shadow distance (grows/shrinks with that setting), but I can't figure out how to fix it. Dark (no sunlight) inside that circle, normal lighting outside it. Any suggestions?

    thanks
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hm, please try to delete the EnviroSky object in your scene and replace with the new one.
     
  25. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I did do that, but did it again (and also deleted the Enviro Effects and Enviro Directional Light), then added EnviroSky prefab again, assigned camera and player to it....same thing, big dark circle.
     
  26. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I deleted and reimported everything and now it works fine. All I can think of is that something went wrong with the original project upgrade. Thanks for the nudge though. Cheers
     
    Vondox likes this.
  27. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I deleted and redownloaded 2.0.5 and installed it from the asset store, same thing -- even in your demo scene:
    Screen Shot 2018-10-31 at 2.27.14 PM.png
     
  28. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Argh, sorry -- it's because I forgot to assign the NGSS Directional Light component to the Enviro Directional Light after upgrading. That fixed it!
     
    Vondox likes this.
  29. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    I am trying to add an AudioMiaxerGroup to the "AudioSource" component of the "AudioSourceAmbient" gameObject, but the AudioMiaxerGroup field will automatically become null when the game starts.

    How do I set up AudioMiaxerGroup for ambient music?
     
  30. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    Yes that idea had ocurred to me, but what exactly is the EnviroSky game object? I see what looks like a camera and a light -- how do I know which part of the Enviro object to line up with north in my scene. I can eyeball it of course, but since the lat/lon and time are so accurate I would like to get the alignment close as well.
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hi, there is a additional component for that. Please add the EnviroAudioMixerSupport component to a random gameobject in your scene and assign your mixer and fill in your group names.
     
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    The EnviroSky object that you added to your scene on setup and where you change the settings. Tweak the y-rotation to match your terrain. If I remember correctly with "0" rotation north should z-axes+.
     
  33. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    I get it, thanks.
     
  34. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi, I'm wondering if you have a guide to make fog work with Lux Water, i tried with Ram_2018 but got to ApplyFog and it keeps throwing error on line with screenPos

    Cheers Jim
     
    Rowlan likes this.
  35. mlaibow

    mlaibow

    Joined:
    Feb 5, 2014
    Posts:
    40
    I have been using Enviro for a few weeks, I have it all set up the way that I want. In the editor, the gmae runs fine, if Enviro time is set to night time, I get it moonlit and if I set it to the day I get the sun.

    The problem I am having is when I build the game. If I remove Enviro, the game builds and runs properly. If I have Enviro in and it is set to nighttime, so that it is moonlit, the game builds and runs properly.
    If all I do is push the time of day to around 10 hours, or any time that the sun is out, the game plays fine in the editor, but when I hit build and then run it, I get this crazy rainbow colored aberration on most of the materials.
    See attached screenshot.

    I am using Unity 2018.2.14f1 and this is for VR on Windows using IL2CPP scripting backend.

    Any idea what could cause this? Again it only happens in the build, not in the editor, and only when Enviro is set to light it with the Sun. I don't think anything in the Enviro config is that different from the default.
    I have tried various combinations of baked and realtime lighting, turned on and off global reflections, so far nothing has fixed it. All settings behave like they should when I hit Play in Unity to test, but as soon as I hit build and run the build, i get the psychedelic colors on everything.

    Thanks. for reading this and I hope I can get it built soon.
     

    Attached Files:

  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, is this in gamma or linear colorspace? But I think I need a sample project with that issue to check it out myself as I haven't seen that before. Could you maybe please provide something like that?
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello Jim, quickly created a guide for LUX Water 1.05. Please tell if you run into issues or need help. :)
     

    Attached Files:

    Rowlan, sjm-tech and llJIMBOBll like this.
  38. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Awesome Man! TYVM :D
     
  39. mlaibow

    mlaibow

    Joined:
    Feb 5, 2014
    Posts:
    40
    It is Linear colorspace, but I have tried Gamma and the same thing happens.
    My project is massive, and it would be difficult to send, but I will do it, if there is no other way.

    I am pretty sure that the problem is with the global reflections. When I turn off global reflections in Enviro, the problem goes away. With it on, the color problem happens only on objects whose renderer is set to Blend Probes. When I turn off reflections on a mesh or skinned renderer component on an object, that particular object does not have the issue.

    So it seems that the Global Reflections probe in Enviro is pulling in some crazy colors and then blending it into the materials, but only on a build and not when ran in the editor, so maybe it is specifically what gets baked into the reflection probe?

    If any of this triggers any ideas, that would be great. I will keep trying things, but if I can't get it in a day or so, I will send you the project.

    Thanks.
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, thanks that was helpful and it is maybe already fixed in enviro 2.1 as I improved the reflection probe handling/baking. Please contact me with private message and I will send you a download link.
     
  41. mlaibow

    mlaibow

    Joined:
    Feb 5, 2014
    Posts:
    40
    And one more question...
    Is it possible to use Enviro just to render the skybox and weather and not the lighting? So no reflection probes, no direct lighting, no ambient lighting from Enviro settings. I would add all the lighting separately, but Enviro would create the dynamic skybox.
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sorry, that isn't implemented out of the box. You would need to modify enviro for that yourself.
     
  43. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hi !
    I am using Enviro on a map where I put several sheres, with an inside shader and an equirectangular texture. The cam may enter the spheres, so 360 picture is visible all around. My concern is that the enviro effects (fog...) are visible even inside the spheres. I could disable the enviro effect entering the sphere, but it is "cut" and not pretty. Any idea? Maybe something to add to the shader ? Hope you can help !
     
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, could you please contact me in a private message and send me your shader?
     
  45. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Time Hour 22-24 is very dark, Almost nothing can be seen.I have tried to increase the values of "Direct Light Moon Itensity" and "Ambient Intensity", but the effect is not great. Any suggestions?
     
  46. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    193
    Two questions :D

    1) What do you recommend as far as baking in lighting? It would seem that if you have a scene where day changes into night, baked lighting would be a issue.

    2) How do you handle a dark room/cave in a open world scene with enviro? Normally, you adjust the ambient lighting in the scene so that a room or cave in an open world setting would be dark when you go inside. However, enviro overrides any ambient light settings for the scene.
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, sounds like that the moon isn't visible at that time and day. So raising the ambient lighting intensity is the right approach. What ambient mode do you use? If you use "Fla"t or "Trilight" you could laso tweak those colors. Oh and do you use post processing tonemapping? Maybe raise the brightness here a little bit too.
     
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    1) Use "Realtime GI" instead. Please check the Unity lighting settings.
    2) There is a component for that included named EnviroInterior. If you for example have a cave you could use the "Entry_Exit" trigger type and place them at your cave entry to activate/deactivate modification. But you also could simply activate and deactivate through code.

    upload_2018-11-3_19-41-5.png

    Please tell if you need help with setup.
     
    cloverme likes this.
  49. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    193
    Wow! That was super easy.... You've thought of everything. It took me less than a minute to add it. FYI: I've been using your asset for months and I've got to say, it is hands down my favorite unity asset. Well done and worth every penny,
     
    llJIMBOBll and Vondox like this.
  50. Gilshyran

    Gilshyran

    Joined:
    Dec 25, 2016
    Posts:
    1
    Hello,
    before buying the asset i want to know if it's easy to use it with Makinom (visual scripting as playmaker)
    I work with ORK framework and Makinom without coding.