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

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    619
    HI all, anyone has used enviro with microsplat? I have a lighting issue the terrain is dark....:confused:
    thx
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    This actually will be set by enviro when using flat or trilight ambient mode. (Check lighting category of your profile.) But sure you could use them too and tweak the colors in enviro.

    Only when using "skybox" ambient lighting mode unity will sample the skybox to do the ambient lighting.
     
  3. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Ambient light in Unity settings are using "skybox". So what I'm getting is being set by enviro? Another really big issue I'm getting appears to be a bug. At night, sometimes the sky goes completely black. When I pause the game sometimes the sky comes back, but as soon as I unpause it goes black again. These are all default settings from your demo.
     
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    What Unity version do you using? Just tested real quick with base microsplat sample scene in Unity 5.6.5 and can't reproduce the issue.

    upload_2018-2-6_22-16-5.png

    If you like you can send me your invoice number in private chat for latest enviro version 2.0.2. Maybe it will solve your issue.
     
    eaque likes this.
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Unity V 2017.2 Deffered rendering, gamma color

    Sky goes completely black with certain weather with flat clouds enabled.
    blacksky.png


    Then if I pause it comes back.

    blackskyback.png
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hm, is that maybe really cloudy? When you pause the game the cloud stop rendering and yes you are right sometimes they will vanish in paused mode and come back when you hit play again. Looks like it looses the temporary render texture when going in pause mode.

    Please try following: Try to reduce the flat cloud coverage in that weather preset. You can quickly jump to the currently playing weather preset in EnviroSky Inspector -> Weather Controls -> Edit Current Weather Preset. Now try to reduce the "Flat Clouds Coverage" and you should see sky again.

    upload_2018-2-6_22-47-8.png
    upload_2018-2-6_22-46-31.png
     
  7. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    619
    I use 5.6.4...I will send you my invoice tomorrow to check the latest version!:p
    thanks!
     
  8. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928

    So you're saying that the clouds are supposed to be black...? I've never seen black clouds in real life before. :) I tried bringing the min color of the clouds up but its just a flat color, I don't see any shading or variation in the cloud textures when I do that.
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hehe yea cloud should not be completly black of corse! :D You may need to tweak the settings especially in gamma color space. Here a screenshot of clouds at 2:00 in gamma color space, no post processing:

    upload_2018-2-6_23-56-31.png

    upload_2018-2-6_23-56-43.png

    Once I enable my post processing I have to retweak the values to get good results, oherwise clouds are to dark again:

    upload_2018-2-6_23-58-22.png

    upload_2018-2-6_23-58-44.png

    So at the end you have to tweak those settings to match your post processing and used color space.
     
  10. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    130
    I just had that short quick start textfile in there. Reimported the whole package and now everythings there ! Will work through that (with my non progamming skills). Will be worth it :)

    Otherwise I´m happy with your product now ! These are the first few test:








    Although I encounter one strange phenomenon:

    On first unity player build gamestart, the light is off and sometimes (!) something big is reflecting in the water that actually isn´t there. For the light, I can´t tell if ambient or shadow is to low, but it´s not supposed to be that dark. After a level reload ingame, everything is fine. That reflecting object stays most of the times. I should mention I always start at the same time with the same weather. I´m quite buffeled.

    See here: https://imgur.com/a/nLLgA
    and here: https://imgur.com/a/9XRHK

    Maybe this is a know issue, but I have not idea of what to search for to beginn with :)

    Thanks !
     
    Aubrey-Falconer likes this.
  11. Ocean42

    Ocean42

    Joined:
    Nov 12, 2014
    Posts:
    3
    Hi,
    The Cloud shadow seems to be everywhere even if i have no visible volumetric clouds.

    When i enable cloud shadows in Cloud lighting settings it always seems that the whole scene around the player camera gets dark instead of the places where volumetric clouds are visible. Any idea how to solve that problem?

    Is it possible to only get shadows by the volumetric clouds?

    Thanks in advance!
    Ocean
     
    Last edited: Feb 7, 2018
  12. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    hey,

    I am a bit confused, is the mobile edition included in the enviro "desktop" package ?
     
  13. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    619
    Not sure but i guess it's not you can update Enviro to the mobile version for 1doll as far as i remember....
     
  14. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    619
    btw, i updated Microsplat and the issue has gone! :)
     
    Vondox likes this.
  15. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    350
    When building for PC/Mac/Linux with Enviro 2.0.1 (Unity 2017.3.0p1) I get the following error:

    Shader error in 'Enviro/CurlNoise': undeclared identifier 'curl_noise' at line 52 (on d3d11)

    Compiling Vertex program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
     
    Last edited: Feb 7, 2018
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    You can delete that Enviro/CurlNoise shader. (Ressource -> Shader folder). That one is not needed anymore and only in your project because you updated without deleting old folder first. ;)
     
    LukeDawn likes this.
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Those screenshots looking great!
    About your issues maybe test to raise scale/deactivate the enviro global reflections. (Edit Profile -> Lighting Category). But about your lighting issue I currently don't know what is going wrong there. Maybe we can meet in skype and have a screenshare to check that in detail. Feel free to add me Hendrik Haupt (vondox@live.de).
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hello,

    cloud shadows will be improved in the next updates. 2.0.2 already includes a experimental cloud shadows solution using the directional light cookie feature.

    Unfortunaly it looks like that directional light cookie have some strange issue right now. (Not related to enviro, I can reproduce these with using a light cookie texture from unity standard assets.)

    For example: Once I add a light cookie texture to directional light it breaks the shadow recieving of unity terrain grass. :/

    However I will keep it in 2.0.2 as it still is usable if you for example render your grass with vegetation studio. I may send a bug report to unity.later.

    So for now please deactivate cloud shadows. I will work on a solution in next updates. With light cookies or as an image effect.

    Kind Regards,
    Hendrik
     
    LukeDawn likes this.
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    These are two different packages. If you already bought enviro desktop you can get the mobile version for one additional dollar like eaque already mentioned. :) Also make sure to contact me with your invoice number to get latest version! That one has a lot more features and is currently in beta testing.
     
    eaque and blitzvb like this.
  20. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    130
    Thanks a bunch ! I will contact you at latest over the weekend. My scene is still quite simple and I would like to have that solved before it gets big :) So, you´ll hear from me. (by your name, can I assume you are German, Hendrik ?)

    edit: Will test the tip with the reflection scaling and report.
    edit2: reported a bug that was caused by my very own stupidity. Delete the content the before beeing embarassed :rolleyes:
     
    Last edited: Feb 7, 2018
  21. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Okay, sure we can have a look then. Yes, I am german. :)
     
    eaque and blitzvb like this.
  22. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    442
    great job!
    but just a question, this is a code that will be in the next release or I can tweak it outside enviro?
     
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    That code can be used with current or next versions. Just a sample script to evaluate color gradients based on enviro sun position/time of day.

    Here is another usefull smple, but using AnimationCurve to evaluate some floats. For example to dynamicly drive post processing settings.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class EnviroCurve : MonoBehaviour {
    6.  
    7.     [Header("Input")]
    8.     public AnimationCurve someCurve;
    9.     [Header("Output")]
    10.     public float someFloat;
    11.  
    12.     void Update ()
    13.     {
    14.         if (EnviroSky.instance == null)
    15.             return;
    16.  
    17.         someFloat = someCurve.Evaluate(EnviroSky.instance.GameTime.solarTime);
    18.  
    19.     }
    20. }
    21.  
     
  24. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    338
    Hi @Vondox

    Thanks for making the asset, I bought it a while ago but only just got around to using it.
    I was getting increasingly frustrated trying to set up the lighting for my day night cycle
    then I remembered Enviro does lighting! perhaps that might solve my problems

    So I imported Enviro and Tah Darr!! lighting is pretty much sorted Thankyou.

    I have a request for your advice:

    Let me set the scene

    2km by 2km terrain European type landscape grass trees rivers Roads hills mountains Castles etc.
    Enviro, Vegetation Studio, Microsplat, all High quality PBR 2k textures mostly
    Single player relatively slow RPG speed game for PC platform.

    How would do the lighting?
    roughly off the top of your head?
    What would you bake?
    What would your settings look like?
    To get a good balance between looking good and performance.

    I know its a subjective question, I'm just asking for your opinion.

    if there are asset you would buy let me know,
    I'm seriously considering Next-Gen Soft-Shadows its getting really good reviews
    I got Volumetric Fog & Mist when it was cheap in the sales also very good reviews.

    Cheers

    Roy
     
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hello Roy,

    once you want to have dynamic time of day you have to use the realtime gi for the directional light (sun/moon) and keep it set to "Realtime". So just enable the "Realtime GI" in unity lighting settings and set the "indirect resolution" to something suitable. For a outdoor terrain scene like your try setting it to 0.1 - 0.5.

    Make sure to mark your object and terrain as "static" and click on "Generate Lighting". After that you can play with the "Indirect Multiplier" of the enviro directional light. That's pretty much all for light baking with enviro using dynamic time of day.

    For ambient lighting you can choose between three modes (EnviroSky Inspector -> Edit Profile -> Lighting category). Flat and Trilight are cheaper modes, that you can tweak with the gradients in lighting category. Skybox is the visually most accurate, but slower. Enviro will call by default every10-15 ingame minutes a resample to update the ambient lighting. Oh next update will include a new option to render the downside of the skybox black especially for this mode.

    For other static lights in your scene you may want set them to "Mixed" or "Baked" and use Baked Gi with enlighten and bake your lightmaps. Also maybe consider setting up light probes to lit your dynamic objects like the player cheaply from those light sources.

    This was just a quick overview out of my head. :D Maybe take a look in all that docs about unity gi and lighting out there in web. I am sure there are also a few videos. :)

    Oh both assets you mentioned are a good ones. Buy Next-Gen Soft-Shadows is great and will improve your game graphics for a low price. Get it! :D
    I haven't used Volumetric Fog & Mist yet, but wanted to add an integration for enviro in future. I am sure you can use that right now, maybe need some syncing for time of day?!

    I hope that I helped you a bit!
     
  26. Ocean42

    Ocean42

    Joined:
    Nov 12, 2014
    Posts:
    3
    @Vondox
    Is it possible to use Enviro with large worlds where player relocation because of floating point precision is requrired?
    When i relocate the player the cloud position changes accordingly. Is it possible to tell enviro the "virtual" position? Or can i just move enviro accordingly?

    Thx for your help!
     
  27. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    338
    It helps alot! thank you, from my experience there are multiple ways to do everything in Unity and the manuals detail them all.
    The problem is some ways are completely wrong they might seem innocuous like a little tick box but they can have a devastating impact.
    They don't tell you that in the manual, you've got to become an expert or like me ask an expert. thanks again.

    Roy
     
  28. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    @Vondox would you mind making integration with uNature? I'd like to be able to have weather change the grass and tree movement and give it some snow/frost. I'm also using Megasplat so I'm not sure if and what shaders need to be changed although uNature may require it's own to be used since it's a GPU tree and grass system.

    Also have you tried any more experiments with Unity 5.6.5f1 single pass mode for the Vive?
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Here is a quick workaround for your issue:

    Please open the EnviroRaymarchClouds.shader and search for this line:

    Code (CSharp):
    1. float3 EyePosition = _WorldSpaceCameraPos;
    change to:

    Code (CSharp):
    1. float3 EyePosition = float3(0.0,_WorldSpaceCameraPos.y, 0.0);
    But if you have a virtual position it may would be better to send that position to the shader and use it as EyePosition.
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Thanks, I will consider a uNature integration in future. :)

    About singlepass in 5.6.5: Sorry, I haven't tried to workaround that yet. Enviro 2.0.2 will only support singlepass vr in unity 2017+ versions for now. I will get in contact with Unity why rendering an image effect wth the low-level graphics library in [ImageEffectOpaque] queue breaks transparent rendering when using singlepass mode.
    Maybe they can backport a fix, as it is working good in all Unity 2017 releases.
     
  31. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    434
    I'm testing Enviro with Vulkan in a 2017.3.0f3 project running on Windows 10 with an Nvidia 1080 and all latest drivers installed. The project builds successfully, but none of the volumetric lighting effects are visible. Has anyone tried Vulkan, and possibly devised a fix? (edit: volume clouds are also not working)

    I see a post from TalkieTalkie in May of last year, but nothing more recent on the Vulkan front: https://forum.unity.com/threads/rel...nd-weather-system.317986/page-11#post-3061121
     
    Last edited: Feb 9, 2018
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    There is a bug in current enviro 2.0.1 that will possible remove volume lighting in builds. I just tested vulkan in 2017.3 and all working great in 2.0.2. Please send me your invoice and I send you download to give it a try.

    Oh btw. you have to add the EnviroVolumeLight shader to the "Always Included Shaders" list in Unity Graphics settings.
     
  33. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    434
    Fantastic! Invoice # sent. I will let you know how 2.0.2 works for me.
     
  34. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    116
    What is the ETA for 2.0.2 in official channel ? It seems to have quite a lot of fixes :)
     
  35. RayWolf

    RayWolf

    Joined:
    Mar 24, 2012
    Posts:
    87
    Yep, I have got the same bug here, no volume light in the build but in the editor. I already did the "Always Included Shaders" - thingy. I use 2.0.1
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Please send me your invioce number to get latest beta version.

    Or open the EnviroFogRendering shader and search for this line:

    Code (CSharp):
    1. #pragma shader_feature ENVIROVOLUMELIGHT
    change to:

    Code (CSharp):
    1. #pragma multi_compile ENVIROVOLUMELIGHT
     
  37. daibutsu

    daibutsu

    Joined:
    Nov 28, 2017
    Posts:
    18
    Hey guys, thanks for this plugin.
    I have a question. In my project i have 3 cameras that are connected to parent object. Would like to ask how i should set up Enviro to work with them?

    Thanks
     
  38. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    373
    Hello I have a prblem with transparent refraction(standard in unity) shader and your shader. There is no visible fog on transparent refrection shader. is there any fix for that?
     
  39. Frank-1999-98K

    Frank-1999-98K

    Joined:
    Jun 30, 2015
    Posts:
    13
    Hi, I've seen your Asset on the store and it looks amazing but before actually buying it, i'd have a couple of questions:
    1) CanI fly through the volumetric clouds? if so, do I need to disable the flat clouds to do so?
    2) Can the bottom of the clouds not be flat?
    3) Can I put multiple layers of clouds?
    4) Is it rendered only on one camera or can i have multiple cameras in the scene that can see the clouds?
    Thank you in advance.
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Sorry, I need some more information about your camera setup. In general you need to use the camera that is rendering your objects/terrain. For example in FPS games with two camera setup you want to assign the world camera not the weapon camera that is renderred after.
     
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    You have to modify the shader to show fog and volume lighting correctly using the EnviroFogcore.cginc and TransparentFog function.

    There is a step by step pdf guide to modify the AQUAS shaders incuded. (Scripts -> AQUAS Integration)
    Maybe that will help you, but I can have a look to modiy that refraction shader in the next days and send to you.
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hello,

    1) Currently not possible, You will see a artifact when in clouds, and clouds get overriden from fog when above clouds. The second issue is quite easy to fix, but the inside need some more work to look great too. :)
    But all planned for a future update. Right now you could use Fog Volume 3 to render your clouds, there is a integration component included to synchronize weather and time of day with fog volume.
    2) I will add that options in a future update too.
    3) Only one layer of volumetric clouds. but you can mix them with flat and cirrus type clouds.
    4) There is a component to render to multiple cameras at same time included.

    Kind Regards,
    Hendrik
     
  43. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    995
    Unity is currently doing an awesome Hover Racer tutorial on their youtube channel. I had to find out how it looks with Enviro and Vegetation Studio :D

    Enviro day & night cycle is set to 1 minute, weather is set to update dynamically.

     
    Marcos-Elias, KRGraphics and Vondox like this.
  44. Tecknosim

    Tecknosim

    Joined:
    Feb 15, 2018
    Posts:
    9
    How do I set the startWeatherPreset to Cloudy2 through EnviroSky script?
    Basically what I want to do is set the weather preset to Cloudy 2 from start of the game.
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    You can set the start weather in "Weather Controls" section in EnviroSky inspector.

    upload_2018-2-15_17-19-52.png
     
  46. Enaver02

    Enaver02

    Joined:
    Dec 18, 2017
    Posts:
    15
    Hello,

    Im currently using Enviro along with CTS and overall is working great, I love the asset.

    However, when I add tessellation to CTS I get extremely dodgy shadows from Enviro on certain parts. It seems really inconsistent as well.

    Here is an image :

    https://imgur.com/a/t4C5F
     
  47. Andrei_S

    Andrei_S

    Joined:
    Oct 31, 2012
    Posts:
    11
    Hey Vondox, really great asset! Congratulations.

    In our game we would like to add some events near the sunrise/sunset times. Is there any way to know which time the sunrise/sunset will occur? (because it changes during from season to season) My first idea was to estimate it using sun angle or solarTime. But I would like to know from you if there is any specific way.
     
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hello, please check the "Direct Light" shadow bias settings. (EnviroSky object - Direct Light object) Not sure what setting was working best, but if I remember right you need to tweak the shadow bias for cts.
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,973
    Hello, thanks!
    I would use the EnviroSky.instance.GameTime.solarTime float for now, At around 0.5 it should be sunrise/sunset. But I may add something to easily get the times in one of the next update too.
     
    Andrei_S likes this.
  50. Poxican

    Poxican

    Joined:
    Oct 17, 2012
    Posts:
    37
    Hi Vondox,

    Beautiful plugin. I bought it this morning and had incredible results literally within minutes, I'm really impressed :D

    How can I set the wind/cloud movement direction dynamically? I've investigated the various components and profiles, checked the documentation and searched the forum thread, but I can't find how to do it. I assume it's pretty easy and I'm just overlooking something!
     
unityunity