Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. Pryzmeister

    Pryzmeister

    Joined:
    Jan 21, 2015
    Posts:
    26
    UPDATE : SOLVED
    For anyone else having this problem i solved it. I work on 2 machines, a dev machine with monitors then test my build on the machine with the oculus setup. Because when i tested the build on the dev machine and it didnt work, i did not even think to try it on the Oculus machine. So i guess single pass will not work correctly on a standard monitor, but does on the stereo setup.
     
  2. raijogamer0909

    raijogamer0909

    Joined:
    Apr 17, 2018
    Posts:
    5
    Hi i already Import the Enviro but i don't know how to fix it i encounter Red error like Assets/Enviro - Dynamic/Scripts/EnviroSkyRendering,Assets/Enviro - Dynamic/Scripts/EnviroVolumeLight i use GAIA 1.6.1 can you please Help me XD
     
    Last edited: May 8, 2018
  3. lokeuei

    lokeuei

    Joined:
    Mar 18, 2014
    Posts:
    4
    Anyone experience ghosting or trails between the models and the skybox? I dropped the EnviroSky VR prefab, wired up the player and maincamera to the SteamVR [Camera Rig] and when I run it, it leaves trails like the image and video below:



    I'm running Unity 2017.3.0f3.

    ** UPDATE **
    I resolved the problem by forcing the camera to DEFERRED rendering mode. The ghosting / smudge went away.
     

    Attached Files:

    Last edited: May 8, 2018
  4. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    513
    Any other ideas to try on this?

    Also having an issue with day/night ratio and total length of time in the day. I set
    EnviroSky.instance.GameTime.DayLengthInMinutes to 12, and
    EnviroSky.instance.GameTime.NightLengthInMinutes to 3.
    My interpretation of this is that days should last about 4 times as long as nights, and that it should take 15 minutes to go from midnight to midnight. However, it only takes 12 minutes to go from midnight to midnight. Am I not understanding how this is supposed to work?

    What would be the ramifications of switching Enviro's Update method to FixedUpdate instead? Having desync issues of a second/milliseconds causing jitter in shadows and such on clients. I'm thinking it's because of the time being updated in Update. FixedUpdate works better for networking.
     
    Last edited: May 8, 2018
  5. robbob44

    robbob44

    Joined:
    Apr 16, 2018
    Posts:
    22
    Sorry for the late reply, but that was on the first 2018 release (not beta). I'll be experimenting today if I still have an issue upgrading on a 2017.4.2f2 editor instead.

    *Edit* I can get the same issue on 2017.4.2f2. It appears that I am migrating from version 2.0.1 to 2.0.3 and something is getting handled differently preventing me from swapping the camera successfully like I can in 2.0.1.

    Even using the default prefab or using the old 2.0.1 prefab with a 2.0.3 script base (for the default asset I must enable assign at runtime) the camera swap is unsuccessful with the clouds no appearing on the second camera.
     
    Last edited: May 8, 2018
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Please try to deactivate or tweak the volumetric lighting settings like "Max Rayleigh", "Scattering Coef" and "Anistropy". That effect also will overlay the skybox.
     
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Please try to redownload Enviro through Unity 5.6.5 editor asset store. Looks like that you imported the 2017 version in Unity 5.6.5.
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hmm, it is working for me and I don't have any other reports. But one more idea: Do you have taken a look in your weather transitions settings already? (Edit Profile -> Weather category)

    Yeah the progress settings are a bit confusing. If the night and day would each take 12 ingame hours it would take 15 realtime minutes for each day. But as the day and night length will vary each day in year it isn't true anymore.

    With your settings the time at nights should be run 4 times faster than day. However I may will rewrite this in a update to be more consistant.

    Just tested updating in FixedUpate and doesn't run in any issues in my quick test. Just try if this will help with your syncing issues.
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Thanks for you fix with lightshafts script! I added this to next update. Besides this it is working good for me. Clouds and skybox show up after camera switch just fine. Could you maybe please send me a stripped down project with your issue to let me reproduce this on my side? I don't have any ideas right now what could break this on your side. :(
     
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Anyone interested in testing a new component that can be added to your water reflections script for reflecting volumetric clouds?

    upload_2018-5-8_15-18-52.png

    I have tested with AQUAS and Unity Water4. You only need to add one line of code to create the component when your water asset is creating the reflection camera. Would be great to hear if it is working with other water assets aswell.
     
    antoripa, Freznosis, Rowlan and 3 others like this.
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello, DynamicGI.UpdateEnvironment () will be only called in skybox ambient mode and only every few ingame minutes. So not on every frame to minimize the performance impact.
     
  12. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    513
    Here's our weather settings
    upload_2018-5-8_10-8-1.png

    We're on version 1.9.1 if it matters. Is it possible the rain value was broken in that version?
     
  13. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    75
    Hello,

    Great asset. I have a few suggestions for future updates (or maybe I'm just missing something).

    1) If weather transitions from rain or to rain at night, it looks weird. Sky becomes light grey instantly and then slowly lerps toward black. Would it be possible to make it stay black in those cases?

    2) Please add this condition into ChangeFocus method:
    Code (CSharp):
    1.        
    2. if (Camera != PlayerCamera) // Added check
    3.         {
    4.             RemoveEnviroCameraComponents(PlayerCamera);
    5.             PlayerCamera = Camera;
    6.             InitImageEffects();
    7.         }
    In my scenario, I use it when swapping characters. But Camera remains the same (using Ootii Camera Controller). RemoveEnviroCameraComponents removes Enviro components from camera and InitImageEffects tries to add them again. However there is delay in Unity, so at that moment components are still there. This resulting to failing every second attempt, leaving camera without Enviro components.

    3) Speaking of camera. Rotation of moon is a bit uneven and in my case Ootii Camera Controller makes it much worse, because it uses changing FOV for zooming, making moon even bigger. It rotates like second hand of watch.
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello, thanks for your feedback. Always appreciated!

    I will add the code part you mentioned in next update. But if you only want to change player it should be enough to just assign the player this way: EnviroSky.instance.Player = newPlayer;

    I also will have a look into 1.) and 3.) for next update.
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Should work in 1.9.1 too. We maybe need to have a look into code to get an idea what's going wrong here. Please contact me in private message when you have some time.
     
  16. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    395
    Hello I'm interested in testing reflections in R.A.M and aquas, How it works? Also I have a question Is there enviro working with unity 2018 already? and how are going things with fog and transparent shader problem, I mean that there is need of modifying every transparent shader to work with enviro fog?Any progress with unity 2018 pipeline to fix that?

    Is there any way for now for example using amplify shader or somethign liek that, to modify shader automatically, We are updating shader of aquas, r.a.m and other trasnaprents very often, and this is so annoying to every time copy and modify new shader to work with enviro. If is there any automatic way please let me know, I will but assets I need to do that, like amplify shader or something.
     
    Last edited: May 8, 2018
  17. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Hey vondox;

    Thanks for awesome asset.

    I'm using with Aquas and have a question about reflections.

    1. Why does Enviro integration script provide the option to "disable aquas reflections?"
    2. What are your recommendations in general for reflections when using Aquas and enviro together?

    I'd like to have high-quality reflections of the scene on the water surface. Had that with Aquas pre-Enviro so want to make sure I'm doing it right with Enviro and Aquas together.

    - Matt
     
  18. jobs

    jobs

    Joined:
    Jul 29, 2014
    Posts:
    6
    I not enable volumetric lighting in Feature Controls Compoent . The attachment is my profile.
    I find that when I disable EnvirSkyRendering compoent,I get a similar effect to scene view
     

    Attached Files:

  19. spso

    spso

    Joined:
    Oct 11, 2017
    Posts:
    13
    Hi @Vondox

    I have been playing around in Unity2018.1.0f2 and noticed some weird behavior in the profiler:
    The amount of Materials (Memory Tab) is growing quite quickly in a linear fashion.
    Switching to the details view I found thousands of Enviro/FlatCloudMap instances (See image attached). I have also noticed this behaviour in the 2017 version. If you`d like I can share the Profiler data with you.

    Cheers,
    Simon

    Edit: Found in 2018 and 2017.3.1p2

    Edit2: Found it: Line 1405 (
    if (flatCloudsMat == null)
    ) in EnviroSky.cs had been commented out. I`ve put it back in place and the problem seems solved.

    FlatCloudMap.PNG
     
    Last edited: May 9, 2018
    froslie likes this.
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello, first I need to rewrite enviro to even support the new hdrp. That's a lot of work and will take me some time. When it is working I can have a look into a better way to render fog and volumetric lighting with transparent materials with the new render pipeline features.

    Never used Amplify Shader Editor for now. But I maybe have a look into soon.
     
    Mark_01 likes this.
  21. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello Matt,

    1.) The integration script will deactivate the static reflection probe that may be used by default from aquas as enviro includes a reflection probe that will be updated to show dynamic time of day.

    2.) Please send me a private message or mail and I could send you package with the new clouds reflection component to reflect volume clouds on water. You also should go through the Aquas pdf guide that is included in Enviro Scripts -> Aquas Integration folder.
     
    mmaclaurin likes this.
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hm okay, if you cannot get some results you like in runtime with tweaking the sky settings we could disable the sky fog completly and it should look like in scene view. Please send me a private message I could provide you a package.
     
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Great find, thanks! Really not sure why I commented that line... Thanks for the info will be fixed in next update. :)
     
  24. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    395
    Would be great then there will be no need to every time edit shader
     
    Vondox likes this.
  25. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    75
    Hello,

    I have issue with lastHourUpdate. It's set at Start() as equal to internalHour. Let's say Enviro time is set to 8:00 in inspector. My game starts and calls Enviro's SetTime to set time I need. Let's say 2:00. But lastHourUpdate is already set to 8:00, meaning that OnHourPassed event will fire after 7 hours for the first time.
    I think make lastHourUpdate public should solve it. So it's possible to set it equal to initial time set through code. Or make some method like SetInitialTime.

    Also it would be handy to add equal to condition firing this event, so it can fires at XX:00. I have turn based game with 10 minutes jump between turns, so it matters in ma case :)

    Code (CSharp):
    1.         if (internalHour >= (lastHourUpdate + 1f)) {          
    2.             lastHourUpdate = internalHour;
    3.             NotifyHourPassed ();
    4.         }
     
    Last edited: May 9, 2018
  26. ZeonIr

    ZeonIr

    Joined:
    Feb 23, 2014
    Posts:
    12
    how wold i fix thes?

    make satellites behind clouds like moon?



    and how wold i get clouds more like thes


    coos is dark on top all the time when i wanna make darker on bottom
     
    Last edited: May 10, 2018
    MaximilianPs likes this.
  27. jobs

    jobs

    Joined:
    Jul 29, 2014
    Posts:
    6
    OK,Can you send it to my email lihaiyang9999@gmail.com. Thank you !
     
  28. robbob44

    robbob44

    Joined:
    Apr 16, 2018
    Posts:
    22
    In the process of cutting back the scene to give you a faulty project, it seems that my issue was caused by changing the localscale of the Camera. Some reason this had no effect in 2.0.1 but does in 2.0.3.
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello, the SetInitialTime functions sounds like a good idea! I will add this in next update. I also will consider a custom timed event as addition. Thanks for your feedback! :)
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello,

    Satellites:
    1. Create a new layer and assign it in EnviroSky inspector -> Rendering Setup -> Satellite layer.
    2. Goto: EnviroSky inspector -> Edit Profile -> Satellites category and click on "Add Satellite".
    3. If you don't want your satellite beeing moved by enviro just assign a empty gameobject prefab. This will enable the satellite rendering.
    4. Now assign the new layer you created on your stellites in your scene. That should be all.

    Clouds:
    Please try to set the "HG Phase" in EnviroSky inspector -> Edit Profile -> Clouds category near to zero. 0.01 for example. You also maybe want to tweak the Light Scattering Factor in your weather presets.
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hm okay, not sure what change could cause this... Is it a problem for you, or fixed now?
     
  32. ZeonIr

    ZeonIr

    Joined:
    Feb 23, 2014
    Posts:
    12
    i don all that Vondox that dont help

    i reinstall Enviro 2.0.3 many times im on unity 2017.2.2.4p
     
    Last edited: May 10, 2018
  33. Firlefanz73

    Firlefanz73

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

    I just installed Unity 2018.1.0f2. It works in Editor, but does not compile/build.

    I am not sure why, one of the warnings is this:

    Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs(1351,91): warning CS0618: `UnityEngine.Rendering.GraphicsDeviceType.Direct3D9' is obsolete: `Direct3D 9 is no longer supported in Unity 2017.2+'

    How to solve this? Thanks!

    PS: Seems I have lost my shaders for two Enviro materials: "RainRipple" and "SnowDust". I made a backup copy before, but could please sombody take a look what the shader is for those two materials, then if I get it working I do not Need to reinstall Unity 2017.4

    Thanks :)
     
    Last edited: May 10, 2018
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Oh, thanks for your report! I will upload a fix to UAS for that issue later. For now please search for these lines in EnviroSky script:

    Code (CSharp):
    1.             if (SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Direct3D9)
    2.                 EnviroSkyRender.volumeLighting = false;
    3.             else
    4.                 EnviroSkyRender.volumeLighting = volumeLighting;
    and simply change to:

    Code (CSharp):
    1.   EnviroSkyRender.volumeLighting = volumeLighting;
    I will add a compiler define here in update as proper fix.

    Edit: The two materials are not used anymore by enviro. But I think they used the Enviro/WeatherParticle shader.
     
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Could you please check if your maincamera is still rendering your satellite layer? Please try to remove that layer from your camera.
     
  36. mephistonight

    mephistonight

    Joined:
    Dec 14, 2016
    Posts:
    75
    Hi Vondox,

    Do you know what would be involved in this? So far I can't find any documentation for the HD SRP, especially on shaders. Have you been able to find any information out about how to write shaders for that pipeline?
     
  37. ZeonIr

    ZeonIr

    Joined:
    Feb 23, 2014
    Posts:
    12
    Hay the clouds flicker when i move camera

    thats how is >>>>>>>> Flickering when moving >>>>>>thes how is shod be

    is thes bug or what?
     
  38. robbob44

    robbob44

    Joined:
    Apr 16, 2018
    Posts:
    22
    Yes all good; I simply need to ensure the camera matains a local scale of 1, 1, 1 when it is parented/unparented.
     
  39. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    61
    Hi, Can Enviro work on Gear VR with single pass?
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hi, sorry only checked out the hd-srp sample project and took a look how things working now.
     
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Sorry, cannot reproduce your issue on my side. Do you have same issue in sample scene?

    So I need some more information:
    • Unity version?
    • Forward or deferred rendering?
    • Do you use any third party asset for your camera movement?
    • Any other image effects?
     
  42. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,403
    is it possible to change weather condition with a trigger and a volume area?
     
  43. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,782
  44. Firlefanz73

    Firlefanz73

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

    my world (using Enviro of Course) is around 4000x4000 meters large.
    Als long as I move slow, everything Looks great.

    But if I use portals which very fast move Player to a total different Location, everything start "ground flickering" or shadows maybe flickering very fast for a short while, then okay for a second, then again.

    Any idea why? Do I have to Change my light position, too if I use Portals to quick-travel?
    I am not sure if this is Enviro dependant or just main-light dependant...

    Thanks :)
     
  45. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,403
    Hello, Iam try to get it running with ummorpg. I setup a weatherZone but my player does not switch the zone for some reason. The player tag and camera tag are set up correctly. I run into the zone but its still staying on the default zone. Any ideas?
     
  46. raijogamer0909

    raijogamer0909

    Joined:
    Apr 17, 2018
    Posts:
    5
    Why Cloud to much cause in Performance i set it to low but same Performance
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Yea, I already written that sky renderer. But I also need to change the skybox shader and after that work on clouds, lighshafts, fog and so on. The sky is only one feature of enviro. ;)
     
    Mark_01, rz_0lento and filod like this.
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Oh hard to tell whats going wrong here. Strange that it only happens when you "teleport" your player. Does only shadows flicker? Maybe try to change the cameraand directional light "near plane" setting.
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Please check the unity physics settings and make sure that the layer from your envirozone and layer from envirosky are able to trigger.
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hello, what gpu do you have? I see a difference from medium to low quality on my GTX1070.
    In general if you want maximum fps, you maybe want choose the flat clouds ("Feature Controls" setting), or create a option menu and let your user decide. Volumetric Rendering is always quite expensive!
     
unityunity