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
    Hello, there are currently no custom actions for this visual scripting asset included out of the box. But if you could send me an example action, I could easily help you to create those one you need.
     
  2. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    I use the Skybox mode. I think the problem may lie in my terrain, and the terrain light barely changes when the ambient light is high.
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Then you also could try to tweak the left half of "Sky Luminence" curve in sky settings.
     
  4. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    No use, it seems that my terrain can only accept Directional Light.

    I think this is a problem with my terrain, thank you for your reply.
     
  5. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    if i understand it right, its not possibile to use a Static Time and Baked light with Enviro? i have some scenes there the settings dont update and the weather is not changeing, so i thought to bake enviro would be a huge Performance win for VR.

    sry my english is not so good
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, you can use Baked GI when not changing the time of day or change to totally different weather where you need to modify the lighting. :)
     
    Noa3 likes this.
  7. Crembo

    Crembo

    Joined:
    Jun 2, 2014
    Posts:
    16
    Having trouble finding if this was mentioned in the thread: How do I make the fog apply to particles?
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, there are some particle shaders included with enviro that support fog. Please tell me if you need something special or any other shader modified. :)
     
    llJIMBOBll likes this.
  9. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Hello

    I want buy Enviro but first need to know:

    Work it tha at Reflection Probe / at Cars etc the Clouds are mirrored or not ?

    And is there a way that at Clouds the horizon can be make it smaller that the clouds not gets so early invisible if far away / near ground ?


    And is there a way that the clouds can move and not only change their form ? like in real the move if wind etc not stay at same place and only change their form :(


    Saw nothing in the videos about that .



    Or you know any other asset that can to what i need ?


    Regards
     
  10. iunami

    iunami

    Joined:
    Aug 23, 2018
    Posts:
    8
    hi, I'm trying to mix the fog preset with the heavy rain. Any pointers bc I can't seem to get it working ?

    Thanks for your response :)
     
  11. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    206
    Hello, I added the Enviro prefab to my scene and followed the pdf steps. Day-night cycle seems to work, but weather never changes. I tried different presets and nothing, I always see clear sky. What can I be doing wrong?
     
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello!

    sorry, volume clouds currently not beeing reflected by reflection probes, only flat and cirrus type clouds are reflected at the moment.

    Sorry, not sure what you mean here. :D

    Clouds will move over time and not stay in same place. There is a extra slider to control the movement speed and it all is bound to the wind intensity/direction.
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, please try to copy the "Heavy Rain" preset and set a new name for it.

    upload_2018-11-7_14-55-15.png

    Then assign that one in a EnviroZone component.

    upload_2018-11-7_14-56-25.png

    Now press play to start your game and change to the new weather preset. You can change the parameters like fog density now to create your own preset. :)
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, does the sample scene works well? Please double check if you assigned correct camera and maybe take a look if EnviroSkyRendering component got added to your main camera.
     
  15. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Enviro has Vegetation Studio (Pro) integration, right? But how do you do it? I have folders for integration with other assets, but can't find anything info how how to add VS(P) integration...
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, current online version have no out of the box integration for Vegetation Studio. But next update will have. I start working on it in the next days and upload new a new beta version for the testers. :)
     
  17. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    ah, okay, great!
     
  18. iunami

    iunami

    Joined:
    Aug 23, 2018
    Posts:
    8
    Thank you! :)

    Also using this with VSPro. Love it
     
  19. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197


    I meant here for horizon that they are visible like here also when terrain goes flat without mountains.


    https://i.gyazo.com/3776b9966db267bdbd27ea609b144d42.png

    because i saw somewhere thats in own project not look like at this screen they are invsible much earlier.



    also how can use enviro Snow etc particles at whole scene are there way change size because if terrain / s are very big can enviro rain / snow etc everywhere or only at an exact zone ?



    Regards
     
    P_Jong likes this.
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    You can configure that for each weather preset. The weather particle effects will follow the assigned player transform and only will show efffect around your player to save particles. Those are using unity particle systems and can be tweaked or swapped out by your own.
     
    P_Jong likes this.
  21. A2GStudios

    A2GStudios

    Joined:
    Nov 21, 2016
    Posts:
    52
    I am using Atavism but I own the Enviro Asset as well. When I imported my scene earlier this is the error I received, any idea how to fix it, or what is causing it. Thanks
     

    Attached Files:

    P_Jong likes this.
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi, please try to update and re-import enviro from store.
     
  23. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    58
    @Crembo really good shot. I love the light shafts and overall look you achieved in that shot.
     
    Crembo likes this.
  24. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    58
    I've tried adding a single satellite. But I can't seem to get it to be located In the sky. It's appearing below the terrain. If I make adjustments it will move in and out along a plane, from a central point, but not vertically up into the sky. I know I must be doing something wrong.

    Does anyone have a good tutorial on adding a satellite? In the meantime I'll keep adjusting settings.
     
  25. Amvient

    Amvient

    Joined:
    Feb 5, 2016
    Posts:
    24
    I know this maybe a silly question, but does Enviro works with Lighting Box 2?

    I have both assets and wanted to know if someone had used both.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, I will have a look into that later and maybe include another setting in next update.
     
    P_Jong likes this.
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, should work well, but you may want to drive some of the post processing parameters based on time of day to get best results for day and night time.
     
  28. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I've set up the Enviro - MicroSplat integration script in my scene, but it's got a significant performance impact -- about 5ms. I figured it was because I have a lot of Microsplat terrains (some unity terrains, some mesh terrains), and sure enough, the CPU usage from that script dropped as I disabled some of them. But this makes the integration unusable to me. Is there any way to optimize it more? (It would certainly be fine with me to reduce the frequency of the checks.)

    thanks
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi, hm we only could limit the MicroSplatTerrain.SynAll(), calls not to update every frame. For example like this:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4.  
    5. [AddComponentMenu("Enviro/Integration/MicroSplat Integration")]
    6. public class EnviroMicroSplatIntegration : MonoBehaviour {
    7.  
    8.     [Header("Update intervall in seconds")]
    9.     public float updateInterval = 0.5f;
    10.  
    11.     [Header("Wetness")]
    12.     public bool UpdateWetness = true;
    13.     [Range(0f, 1f)]
    14.     public float maxWetness = 1f;
    15.     [Header("Rain Ripples")]
    16.     public bool UpdateRainRipples = true;
    17.     [Header("Puddle Settings")]
    18.     public bool UpdatePuddles = true;
    19.     [Range(0f,1f)]
    20.     public float maxPuddle = 1f;
    21.     [Header("Stream Settings")]
    22.     public bool UpdateStreams = true;
    23.     [Header("Snow Settings")]
    24.     public bool UpdateSnow = true;
    25.  
    26.     void Start()
    27.     {
    28.         InvokeRepeating("SyncMicroSplat", 0, updateInterval);
    29.     }
    30.  
    31.  
    32.     void SyncMicroSplat ()
    33.     {
    34.         if (UpdateSnow)
    35.         {
    36.             Shader.SetGlobalFloat("_Global_SnowLevel", EnviroSky.instance.Weather.curSnowStrength);
    37.         }
    38.  
    39.         if (UpdateWetness)
    40.         {
    41.             Shader.SetGlobalVector("_Global_WetnessParams", new Vector2(EnviroSky.instance.Weather.curWetness, maxWetness));
    42.         }
    43.  
    44.         if (UpdatePuddles)
    45.         {
    46.             Shader.SetGlobalVector("_Global_PuddleParams", new Vector2(EnviroSky.instance.Weather.curWetness, maxPuddle));
    47.         }
    48.  
    49.         if (UpdateRainRipples)
    50.         {
    51.             Shader.SetGlobalFloat("_Global_RainIntensity", EnviroSky.instance.Weather.curWetness);
    52.         }
    53.  
    54.         if (UpdateStreams)
    55.         {
    56.             Shader.SetGlobalFloat("_Global_StreamMax", EnviroSky.instance.Weather.curWetness);
    57.         }
    58.  
    59.         //Sync all MicroSplat Values
    60.         MicroSplatTerrain.SyncAll();
    61.     }
    62. }
    63.  
     
    mmaclaurin likes this.
  30. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    thanks, that makes a big difference! In fact, I don't see it at all in the profiler now -- I set it to 1 second and so thought I'd see a spike that often, but no spikes that I can see. Why wouldn't it still spike? (Not that I'm complaining....)
     
  31. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    58
    I'm getting the following compiler errors in Unity 2018.3.0b9 with these two shaders.
    "Shader error in 'Enviro/Particles/Additive': undeclared identifier 'sampler_CameraDepthTexture' at line 68 (on gles3)

    Shader error in 'Enviro/Particles/Lightning': undeclared identifier 'sampler_CameraDepthTexture' at line 68 (on gles3)"

    But no problems with the EnviroParticlesAlphaBlend like @jStinson reported back in August with Unity 2018.2.1f1.
     
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi, thanks for your report. I will fix these in next update. For now you could try to open the shader and replace:

    Code (CSharp):
    1.  
    2. //search for:
    3. sampler2D_float _CameraDepthTexture;
    4.  
    5. //and replace with:
    6. UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
     
    P_Jong likes this.
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    If you are using the global system, which it looks like you are in this code, then SyncAll doesn't need to be called at all.
     
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Ah okay thanks, I will check that out and change in next update. :)
     
    mmaclaurin, P_Jong and gecko like this.
  35. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I'm still getting 5ms again, even with the update interval set to 1....confused why that fixed it before but now it's bad again. Could I get that updated script when it's ready?

    Also: In the Unity Lighting Settings inspector, I assume I should assign the Enviro Directional Light to the Sun Source, right? And then should Environmental Lighting: Source be set to Color? I thought it should be Skybox, but it keeps getting changed back to Color if I change it to Skybox....
     
  36. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    103
    What about HD and LW Pipeline support? Is in the radar? Thanks
     
  37. myownbot

    myownbot

    Joined:
    Mar 30, 2017
    Posts:
    29
    Spikes or drops in batches

    Hello all,

    I observe spikes (or drops) in the number of batches whose frequency is reciprocally proportional to the day/night length. The shorter the simulated daytime, the higher the rate. Something around 1 spike/drop per second if the length is set to 5 minutes.

    Here is the screen shot of a simple scene with nothing inside but a plane, a cam and the Enviro sky (great asset 2bqh). You can see the spikes in the profiler window. The number of batches is 6 for the most time, then there is a spike to 186.

    In another scene (no screenshot), I saw the drop of batches at the same rate and in the same way dependent on the "lenght of day/night". This drop cause all grass to redraw once a second... Going up with the day/night length makes the jitters quite rare. However, I really like this possibility of a short day followed by a short night.

    Any help will be highly appreciated. I can deliver more details if needed.

    P.S. I will post a screen capture videoclip this evening. The plants disappear just for one frame. The faster the cycle, the higher the drop rate. Disabling the main day cycle script fixes the problem. However, this cannot be the solution.
     

    Attached Files:

    Last edited: Nov 15, 2018
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi, could you please test what Jason suggested. Delete the MicroSplatTerrain.SyncAll() line and check if all working and if spikes are gone.

    About ambient lighting: You have to setup through EnviroSky Inspector -> Edit Profile -> Lighting category. If I remember correctly you don't really need to set "Sun Source" there, as it is used mainly for the default unity procedural skybox. But you can of course. :D
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, I am currently working on suppot for LW and HD SRP and will be soon added to the enviro beta version. Planned a release for late december.
     
    Teila likes this.
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, looks like it is related to the reflection probe. You can test and disable reflection probe updates in EnviroSky Inspector -> Edit Profile -> Lighting category. In 2.0.5 there are also regulary renders the moon phase that should add a batch, but this will change in 2.1.
     
  41. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    103
    Great, good news, when you say Enviro BETA, is it because Enviro 2 or something similar is coming?
     
  42. gww2

    gww2

    Joined:
    Jan 13, 2017
    Posts:
    21
    We're having some performance issues with EnviroSky on machines with integrated graphics. We've gone through and set all the quality settings we could find to low or lowest and still are getting maybe 20-30 fps with nothing else on. Any thoughts or direction about how to address this?
     
  43. myownbot

    myownbot

    Joined:
    Mar 30, 2017
    Posts:
    29
    Hello,
    I can confirm that the spikes were due to the reflection probe indeed. Not that much of the concern though. It was not what made the vegetation disapear for one frame. The reason for this and the drops in batches was moon rendering which takes place every 6 minutes (0.1 hour) of simulated time. Well, I use the Advanced Terrain Grass asset where the vegetation is kind of scripted. Might be tricky to fix.

    I guess, I can't afford the moon-less sky :)
     
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I always do some testing before I release a major update. Everyone can join by telling me in private message here. :)
    However the SRP support will be a upgrade for about 10$ later.
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, I think the new 2.1 update with support for both version (lite and standard) in one project would be a good solution. Please contact me for details and download link.
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hello, please try to create and set a special layer for the moon and make sure that no other assets using this. (EnviroSky inspector -> Rendering Setup)

    Or contact me for testing latest enviro beta which does not need those moon camera anymore.
     
  47. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Any upcoming updates? If so, any new features/enhancements?
     
  48. myownbot

    myownbot

    Joined:
    Mar 30, 2017
    Posts:
    29
    Well, rendering the moon on a separated layer did not help.

    I found a small bug in EnviroSky.cs script he-he ))
    Without those two brackets, the IF statement was TRUE once in a while despite MoonRendering OFF.

    Thank you for your generous offer of beta-testing. I guess I can wait till the next release (without the Moon)
     

    Attached Files:

    Vondox and transat like this.
  49. myownbot

    myownbot

    Joined:
    Mar 30, 2017
    Posts:
    29
    Did you ever consider to add star flickering to the night sky? This would be AWESOME!
     
  50. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    The ambient light comes on very briefly if starts raining at night. Some faulty transition somewhere? I'm using 2018.3b10