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

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    hi @Vondox
    I've a question. Is there a complete manual available that explains all the options?
    If not, I have a question.
    In the lighting category and in the ambient part of it, there are 3 ambient color.
    That color, affect the lighting just when you set "Trilight" in the ambient Mode or both with Skybox mode?
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, if you set ambient mode to "flat" it will take the "Ambient Sky Color" gradient. For "Trilight" all three and for "Skybox" it will evaluate the ambient color directly from skybox, but you can modify the intensity/brightness with the "Ambient Intensity" curve.
     
    marcatore likes this.
  3. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Thank you.
    Another question about reflections.
    Why is there some much difference from the "global reflection custom rendering" ON and OFF?
    If you have a smoothness material with an high smoothness value, the visual difference is low.
    If you have low value smoothness material, the difference is quite relevant.
    I'll show you
    on the left smoothness 0.3, on the right 1.0
    Reflection Custom rendering ON


    Reflection Custom rendering OFF

    in this kind of super simple scene, this difference has not so much impact but on a complex scene with many materials, with custom rendering you have to recalibrate all the low value smoothness materials (often, excluded super clean metals this means the whole scene materials).
    Cause I like the option of the reflection custom rendering , is it possible to make it matches as soon as possible with the standard reflection?
    What should be the solution?
     
  4. schakalskopf

    schakalskopf

    Joined:
    Sep 15, 2018
    Posts:
    4
    Hallo everybody,

    first: envirosky is very cool!

    But i need a little help with a strange problem.
    I use the asset „Volumetric 3D Lasers“* and with fog or/and volume clouds enabled the laser effect is most invisible/transparent/"behind cloud/fog" if there nothing behind the laser (like terrain or meshes)
    i have this problem with all laser prefab types (normal, gamma and mobile)

    have somebody an idea what I do wrong or how can I make a workaround? or can only the creator of the laser asset can help me?

    Which other information are needed?
    -“Enviro/VolumeLight” shader is added
    - unity version -> 2018.3.14f1
    -envirosky version -> 2.1.5


    I have attached 3 screenshots-pairs to show the problem

    Thanks for your time

    * https://assetstore.unity.com/packages/vfx/particles/spells/volumetric-3d-lasers-104580


    ps: by the way, in the current sample scene the player controller is under the terrain and fall down on play :)
     

    Attached Files:

    Last edited: Sep 22, 2019
  5. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, enviro currently does not apply specular convolution to the final cubemap for reflections. (Some kind of blur.) I am on it to implement that for next update.
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, never used this asset, but could be related that those lasers are rendering in opaque queue but not writing to depth buffer. Can you please check if you can change the render queue of those materials to "Transparent"?
     
  7. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    So, if I've well understood, your custom reflection will match to the "standard" one. Right?
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yeah, they should when that one is implemented.
     
  9. schakalskopf

    schakalskopf

    Joined:
    Sep 15, 2018
    Posts:
    4
    Thank you very much, it solved it directly. i should really learn more about material and shader technics :)

    Have a nice day
     

    Attached Files:

    Vondox likes this.
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    I have sent you a wip package with reflection convolution, but still needs some tweaking of the values to get 100% match with default reflection probes.
     
  11. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Thank you very much. I've tried it and it seems quite similar.
    Meanwhile you're exploring the exact values to match it 100% I'll use this.
     
  12. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Another question, this time on gloabl reflections updates settings.

    the two update options (on game time and on position) could be used in combination? Or not? If yes, is there something to pay attention to avoid problems, loss on performance and so on?
    The "Treshhold" settings is related to game time changing? Position changing? In the above image, that 0.025 is related to...?
    One minor thing, I'ìm not an English language guy but I've checked online about the "Treshhold" word and it seems there is a typo error cause it seems it should be "Treshold".
     
    Last edited: Sep 23, 2019
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, you can enable both settings at same time. The "Treshold" setting is for updating the probe for every ... game time hours. For performance you should not set this setting too low. Set it so you won't see big jumps in reflection color changes that come from dynamic time of day.
    Thanks for your report. I will fix the typo and improve the information on this settings in next update.
     
    marcatore likes this.
  14. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Thank you for explanations.
    Another question about the option "Update on Position". Is it updating the probe when it moves? Is it manageable the rate of updating when just "Update on Position" is enabled? something like "during the movement, update every 2 seconds (or any other value)"?

    I have another question, this more general.
    We use VegStudio Pro and it has an option for the camera that enable to render only billboard for a specific camera.
    https://www.awesometech.no/index.php/cameras-pro/
    In the settings explanation it speaks about this
    I know that reflection probe is not a "pure" camera but as it behaves like a camera, do you think it's possible to render the vegetation on the reflection probe?
    Do you think that this is something that is more related with VegStudio Pro or something more with you?

    Thanks in advance.
     
  15. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    Hello, i have a little bug with my moon and i don't understand why it can do that ...
    Thanks for your help :oops: ( Im using unity beta 2019.3.0b4 )


    I checked the moon texture but it's the same than the last updated one ....

    Here is my settings in enviro sky :
    https://puu.sh/Elmdz/8f742bdc75.png
     
  16. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    Oh i found the "solution" right after posting ... i set moon texture back again in the "moon texture" texture, and it started working again :confused: maybe some cache or something like that ? :oops:
     
  17. pixelR

    pixelR

    Joined:
    Sep 16, 2013
    Posts:
    58
    @Vondox Hello, I already own Enviro but I work on a mobile game now and I think it'd be an overkill for it. Would Enviro Lite work with the URP, giving me a skybox with sun and moon, using only 1 draw call?
     
    Last edited: Sep 26, 2019
  18. facundogalella

    facundogalella

    Joined:
    Mar 5, 2016
    Posts:
    63
    Hi! I have two errors running a project in v 2019.2.3. The game works fine in Unity but I can't create a build. Someone had this trouble?

    Sin título-1.jpg
     
  19. PsychoticLab

    PsychoticLab

    Joined:
    Aug 13, 2017
    Posts:
    9
    The docs say builds will fail if you dont add a shader to the player settings. On my phone so cant point u right to it. It's in the setup section of the doc
     
    facundogalella likes this.
  20. morgandavies613

    morgandavies613

    Joined:
    Jul 15, 2019
    Posts:
    3
    Hi I just purchased and downloaded enviro. The sky and day and night cycles all look and work great but it doesn't seem to be creating clouds. And I am getting a bunch of null reference error logs; such as:

    NullReferenceException: Object reference not set to an instance of an object
    EnviroSkyRendering.CreateMaterialsAndTextures () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSkyRendering.cs:470)
    EnviroSkyRendering.OnEnable () (at Assets/Enviro - Sky and Weather/Enviro
    Standard/Scripts/EnviroSkyRendering.cs:206)
    UnityEngine.GameObject:AddComponent()
    EnviroReflectionProbe:CreateRenderCamera() (at Assets/Enviro - Sky and Weather/Core/Scripts/EnviroReflectionProbe.cs:134)
    EnviroReflectionProbe:OnEnable() (at Assets/Enviro - Sky and Weather/Core/Scripts/EnviroReflectionProbe.cs:71)

    and

    NullReferenceException: Object reference not set to an instance of an object
    EnviroSkyRendering.CreateMaterialsAndTextures () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSkyRendering.cs:470)
    EnviroSkyRendering.OnEnable () (at Assets/Enviro - Sky and Weather/Enviro
    Standard/Scripts/EnviroSkyRendering.cs:206)
    UnityEngine.GameObject:AddComponent(Type)
    UnityEditorInternal.ComponentUtility:ReplaceComponentsIfDifferent(GameObject, GameObject, IsDesiredComponent) (at
    C:/buildslave/unity/build/Editor/Mono/ComponentUtility.cs:60)


    Any idea what is going wrong? There are more null reference error logs I could mention if that would help you figure out what is going on.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  21. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, the update treshold for on position changes i currently hardcoded, but already added this setting for next update. It also does not work time based, instead checking position changes and once we moved that far away it will initiate an reflection update.

    About that Vegetation Studio feature you may want ask Lennart if that one also works with reflection probes.
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, with some small edit (commenting the cirrus clouds in skybox producing 1 extra drawcall) you would be with two drawcalls. One for skybox and one if moon is visible. If you activate clouds it would add 1-2 drawcalls too.
    I can send you my modification if you want to give it a try.
     
    pixelR likes this.
  23. facundogalella

    facundogalella

    Joined:
    Mar 5, 2016
    Posts:
    63
    I added the shader in graphics settings now, the errors still here but the build was created as the main problem seems was with Terrain Tools package of Unity and not with Enviro.
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, I also tested a build in Unity 2019.2.5 and it is working fine for me. Does your buid works now without issues? Do you see this errors only while building? Do you get same errors, if you build a fresh scene? However please contact me in discord if you need further help with that.

    https://discord.gg/rXxwaCE
     
    facundogalella likes this.
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, thanks for your report! It's really a bug with one line that only activates in Unity 2017.2... That one should not needed anymore so it is save to remove it. (Please remove line 470 in EnviroSkyRendering component.)
    I also can send you an hotfix package if you want. That issue will be also fixed in next update.
     
  26. morgandavies613

    morgandavies613

    Joined:
    Jul 15, 2019
    Posts:
    3
    Removing the line worked perfectly thank you so much for the quick reply and I am so glad to have it fully functionally!! You have really developed something very beautiful and I am thrilled to use it in my game.
     
    Vondox likes this.
  27. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Thank you @Vondox for your support.
    Another question.
    The far clipping plane of the reflection probe is "connected" with the far clipping plane of the main camera?
     
  28. morgandavies613

    morgandavies613

    Joined:
    Jul 15, 2019
    Posts:
    3
    Hi @Vondox on more thing. I've updated my project to be in Unity 2019.2.6 and I've reimported enviro and set it up as directed but for some reason volume clouds are not appearing in my scene. When I go into the sample scene the volume clouds do appear but they look super pixelated not at all like how they do for others (I've watched videos and seen pictures of other people using enviro). In the sample scene there is a warning that reads:
    "The referenced script on this Behaviour (Game Object 'Post Processing') is missing!"

    (there are also warnings about the referenced script for the first person controller being missing)

    Any idea what is happening this time? Thanks again for your help last time and I love the product and appreciate the help you provide.
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, no that one should be only for the selected reflection probe.
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, sorry not sure whats going wrong without more information. Please contact me on discord and we can have a detailed look into this.

    https://discord.gg/rXxwaCE
     
  31. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    I've tried in a new project with just Enviro imported and this is mt test results.
    https://drive.google.com/uc?id=1XYcwWMvS7-yrv6Z4_8FuNKg_V1lcwHzk

    As you can see main camera far clipping plane and global reflection far clipping plane (and also the its box XYZ size values) seems connected.
     
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Oh you are right, sorry! It actually set the farclipping plane for the global one on start... Not sure why that is still in there. Will remove or add an option for that in next update. The size for the global one can be controlled in "Reflection" settings in Enviro. That can be usefull if you for example have a big ocean in your scene. However other reflection probes that you add won't be modified by enviro.
     
    marcatore likes this.
  33. Firlefanz73

    Firlefanz73

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

    I just tested my game on my Android device.

    I get a null exception then.

    I use this Code to create my enviro sky instance:

    Code (CSharp):
    1.         try
    2.         {
    3.             Instantiate(Resources.Load("Enviro Sky Manager", typeof(GameObject)));
    4.             if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) //#if UNITY_IPHONE  #if UNITY_ANDROID
    5.             {
    6.                 //Activate and assign/start lite version
    7.                 EnviroSkyMgr.instance.ActivateLWInstance();
    8.                 EnviroSkyMgr.instance.AssignAndStart(Camera.main.gameObject, Camera.main);
    9.             }
    10.             else
    11.             {
    12.                 //Activate and assign/start standard version
    13.                 EnviroSkyMgr.instance.ActivateHDInstance();
    14.                 EnviroSkyMgr.instance.AssignAndStart(Camera.main.gameObject, Camera.main);
    15.             }
    16.             EnviroSky.instance.GameTime.DayLengthInMinutes = 16f;
    17.             EnviroSky.instance.GameTime.NightLengthInMinutes = 16f;
    18.  
    19.         }
    20.         catch (System.Exception ex)
    21.         {
    22.             Debug.LogError("Error creating Enviro: " + ex.ToString());
    23.         }
    24.  
    Works well on PC. On Android I get the exception because EnviroSky.instance is null when Setting the DayTimeLength...

    upload_2019-9-30_9-3-13.png

    Any idea what's wrong? Thanks a lot!
     
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hi, you have to use the EnviroSkyMgr instance if you use both versions of enviro. So change these lines:

    EnviroSky.instance.GameTime.DayLengthInMinutes = 16f;
    EnviroSky.instance.GameTime.NightLengthInMinutes = 16f;

    to:

    EnviroSkyMgr.instance.Time.DayLengthInMinutes = 16f;
    EnviroSkyMgr.instance.Time.NightLengthInMinutes = 16f;
     
    Firlefanz73 likes this.
  35. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Thanks a lot :)
     
  36. DDDimanN79

    DDDimanN79

    Joined:
    May 30, 2014
    Posts:
    6
    Greetings, Vondox! Please explain why the AudioSources in Enviro Effects is dumping my Audio Mixer from output and how do I solve this problem?
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, you need to add an extra component to one of your gameobjects in your scene. Please add the EnviroAudioMixer support component, assign your mixer here and set the mixer group names for each type of enviro audio effects (Ambient,Weather and Thunder).
     
  38. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    145
    Hi @Vondox, any idea why this standard transparent shader is rendering on top of the Enviro fog?


     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, please switch to Enviro -> StandardAlphaBlended shader for that material.
     
  40. bran76765

    bran76765

    Joined:
    Jul 14, 2018
    Posts:
    26
    hey @Vondox I've got a weird problem.

    I've got volumetric clouds enabled as well as compatibility with mirror, and in the editor, the volumetric clouds will render. But as soon as I make it a real build with server and client, the client won't render the volumetric clouds. If the client is in the editor, it will render, but if it's in a build, it won't render. It also just seems to be with volumetric clouds-I tried storm and that seems to have rendered as well.

    I have checkboxes for volumetric clouds enabled so it isn't that, but idk what else it would be. Any ideas?
     
  41. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    145
    Thank you!
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, does it render fog correctly? Hard to tell without any more information. Maybe join our discord channel and we can have a detailed look at this.

    https://discord.gg/rXxwaCE
     
  43. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I am using latest version of enviro and unity 2019.2.7f2 and for some reason the projects sky is all black after a build. Not sure if its enviro but not sure what else it could be. I am still searching with no luck yet to a possible solution.

    UPDATE

    Reinstalled enviro and it solved the issue.
     
    Last edited: Oct 7, 2019
  44. Firlefanz73

    Firlefanz73

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

    one more Question:

    To set the actual day time I now use:
    Code (CSharp):
    1. EnviroSkyMgr.instance.Time.Hours = RaceCircuit[CurrentSeason.RaceIndex].HourOfDay;
    I am using the dynamically created Enviro instances HD and LW.

    It works for the very first time, but when stting it a second time, Nothing happens...

    Any idea why?

    Thanks!
     
  45. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Hey @Vondox ! Just wondering, what is the status of HDRP support at the moment? Can we expect a release with HDRP support until next year?

    We're considering switching from built-in to HDRP in the future but since Enviro is tied so deeply into our game's environment and weather mechanics (we use Enviro for volumetric clouds and for skybox in general and everything in our weather system is built on top of it), we are really depending on you now :D
     
    Hawk0077 likes this.
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, please try using this function:

    EnviroSkyMgr.instance.SetTimeOfDay(float tod);
     
    Firlefanz73 likes this.
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, I already start working on HDRP support. Please consider joining our discord as we start some beta testing soon.

    In general I plan to release hdrp support shortly after Unity 2019.3 is out of beta.
     
    Hawk0077 and Raul_T like this.
  48. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
  49. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    I hope to be on time before next update requesting to add an option for custom reflection near&far clipping plane.
    Thanks in advance
     
  50. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Another question about fog.
    I'd like to have a no-fog zone inside a car.
    What should I use for this?

    EDIT: I've found that using distance fog without height fog option did the job. If you have any other suggestion I'll happy to read it. :)
     
    Last edited: Oct 8, 2019