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

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    You work fast...

    upload_2017-11-28_21-5-29.png

    So here is the static cubemap that I am using for my game levels. With enviro, what I can do is render a cubemap with just the sun in it (the sun spot is FP16) and expose it in such a way that I can light my entire level with just this cubemap with no light whatsoever. And then I can add enviro on top, such as match the sun position and add cloud layers. With the stock skybox shaders, you can't get the full HDR range without some tricks... so I am glad I will be able to do this
     
    P_Jong likes this.
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Is anyone getting flickering clouds when you set the cloud mode to Both? I am testing out flat clouds and they are flickering like mad.
     
  3. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    upload_2017-11-28_23-57-38.png

    A mix of the HDR cube map and Enviro... perfect for overcast scenes. And the lightning is a nice touch too...
     
    P_Jong likes this.
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    @Vondox You sir have created a KICK ass asset! And it works with UFE with NO modification :D... look out for a VERY FAVOURABLE review.
     
    Last edited: Nov 29, 2017
    P_Jong and Vondox like this.
  5. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Great. Thanks!
     
  6. thijslinssen

    thijslinssen

    Joined:
    Mar 11, 2015
    Posts:
    6
    Edit: FIXED

    First want to say Eniro looks great! Just bought it yesterday and already like it a lot.
    Now for my question, i want to make some more profiles->weather (types) and I saw your video and read the instuction but when i want to edit the clouds and more in runtime it does not seem to save the changes.
    (link to your tutorial)

    And outside runtime i don't see the clouds so i don't see what i change ;)
    Any idea what the problem is?


    Edit:
    A found it... I want really slow transfers form one weather type to the other. So it took a reaaaaaally long time before the changes began to show up ;)
     
    Last edited: Nov 29, 2017
  7. Firlefanz73

    Firlefanz73

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

    I think the interior skybox Color does not work?

    upload_2017-11-29_21-8-7.png

    I have it turned on, Color set to extreme dark green (as in light modification).
    But it is still visible in the distance, while the rest is dark.
    And when I manipulate the time it gets light and dark...

    By the way: What was again the value to completly turn off ambient and weather Audio in the interior?

    Thanks a lot :)
     
  8. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Hi,

    How do I get clouds to appear when I set my own weather settings. They dont appear for me no matter what I enter
     
  9. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    I'm having trouble with Enviro when loading scenes additively. I can set the EnviroSky prefab to persist using DontDestroyOnLoad, but when I set the same on the "Enviro Effects" game object, it persists after the new scene is loaded, but then EnviroSky deletes it and fails to create a new one.

    For now, I'm putting Enviro in every new scene and have it "overwrite" the previous one, but I'd prefer to keep it in my base scene and just change the profile as needed. How can I do this?
     
  10. Deleted User

    Deleted User

    Guest

    Hi, I've recently encountered a bug (seemingly) where the sky is pink after building for Mac.



    ^Above is a simple scene I made to test this. As seen, in the editor the Envirosky is working perfectly.



    ^However, as seen above, upon building the project and running it on Mac, the Envirosky is pink instead. The sounds in the Enviro zone are still playing and I did not make any modifications whatsoever to anything.

    Is this a bug or are there some graphics settings I got wrong?
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Ah okay, I think it is the skyfog! I will add another option to handle that too. Sorry :/
    You want to set them to -1 to turn off sounds.
     
    Firlefanz73 likes this.
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Do you alredy have added your own weatherpreset to the enviro zone component and changed the weather to your new preset?
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Thank for your report! I will investigate and improve that in next update. :)
     
  14. Vondox

    Vondox

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

    yea looks like a bug. There were issues with volume clouds on some macs with metal. I also added a notification on store page and currently investigating/created a unity bug report as no errors are shown.
    I need a few more information to check whats going wrong on your side. Do you use OpenGLor Metal api? Do you have volume clouds activated? Do you already added the Enviro/VolumeLight shader to the always included shader list unity graphic settings?
     
  15. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    762
    HI,
    I have 2 white flashes that appear after the moon disapeared from horizon few seconds later...My time is 1mn for day and night....Didin't notice it before...Is it from a setting ?looks like an intensity that goes up and down real quick..
    Thanks
     
  16. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    If an update would be possible without having to set up Enviro completly again by exchanging some file(s) please let me know.

    Thanks a lot! :)
     
  17. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Seems like the new shadows option is using a traditional shadowmapping. I don't really like how it behaves. First, it's way too big and fast, the whole place turns dark for some time and then quickly back to normal. They are tied to clouds themselves and can't really be tweaked without tweaking clouds themselves. But more importantly they are running on Shadowmapping rather than directional light's cookie.

    These are the reasons why I think having cloud shadows on Directional Light's cookie will be better:
    -Easily configurable
    -Cast shadows beyond shadow distance (important)
    -Cheaper

    I would really like to have cloud shadows rendered through cookies. I don't think it'll be too much of a hassle to plug Weather Map there and apply offsets to directional light so that shadows won't move with the player.
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Do you see those flashes only in sky or is it the scene lighting?
     
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Yea, already noted in update notes, that current cloud shadow implemtation is bad and will be dropped for a better solution.

    I also thought about light cookies as a good solution, but need to fix a few issue I ran into when trying to implement shadows that way. I don't wanted to delay the 2.0.1 update anymore and stopped working on that front for now. So better cloud shadows will be added to 2.1. :)
     
    Kolyasisan likes this.
  20. keifyb

    keifyb

    Joined:
    Feb 12, 2016
    Posts:
    62
    where has the fixed altitude button gone for the clouds, i can't seem to find it.
     
  21. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    How do you get rid of all of the ambient audio? Following the instructions I only find a section for Thunder audio, not the rest of the stuff that comes along for the ride.
     
  22. froslie

    froslie

    Joined:
    Apr 20, 2015
    Posts:
    18
    After using Enviro for the past week with little issue, I am suddenly unable to see the rain particles. Everything seems to working correctly (changing presets at runtime...), but the rain is no longer visible.

    I am integrating with Gaia and CTS.

    Any suggestions, or advice is greatly appreciated!
     
  23. Deleted User

    Deleted User

    Guest

    Hi Vondox,

    I'm using OpenGL on my Mac, so it shouldn't be a problem with metal. I'm using the direct light and not the volume light. I tested out what you said with the volume clouds by changing the clouds to flat and yes, the sky is normal-coloured. So I guess the problem is with the volume clouds.

    Yes, I did include the enviro shaders under the always included settings and the volume clouds are still pink. However, the lighting and fog etc. are still rendering find.

    Thanks for your help!
     
  24. mgrugl

    mgrugl

    Joined:
    Mar 1, 2017
    Posts:
    23
    Hi, I am getting the following errors upon importing Enviro in Unity 2017.2

    Shader error in 'Enviro/Particles/WeatherParticles': failed to open source file: '../../Resources/Shaders/Core/EnviroFogCore.cginc' at line 26 (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

    Shader error in 'Enviro/Puddles_HQ': failed to open source file: '../../Resources/Shaders/Core/EnviroFogCore.cginc' at line 35 (on d3d11)
    Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    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

    Is there a way to resolve them? I might mention that I have Gaia, LightingBox and CTS in the project.
     
  25. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    Awesome work. Bought this from sale and totally enjoying using Enviro with latest MicroSplat-modules :).
     
    Vondox likes this.
  26. Shinao

    Shinao

    Joined:
    Mar 7, 2014
    Posts:
    36
    Is there some way to set the fog center point ? I thought the 'focused player' would be that but it does not seems to change anything at all, the fog center is always the camera.
     
  27. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    762
    To me they appear behind the horizon so i would say it seems local ...
     
  28. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    Greetings... I have multiple scenes in my project, each one either has unique Enviro settings or no Enviro settings (such as transit levels). All work fine on their own, but if I am in an enviro scene and transit to a scene without enviro.. enviro carries across the settings in EnviroEffects in a DontDestroyOnLoad scene component which then errors out in the transition scene.

    Is there an easy way to kill the DontDestroyOnLoad function so that each scene picks up only the settings for that scene, or none if Enviro is not used in that scene?

    M
     
  29. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    This is a known issue, we're waiting on a fix; hopefully in the next update.
     
    MaliceA4Thought likes this.
  30. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406

    Ahh sorry my fault for not reading back far enough.

    I HATE upgrading assets, it usually breaks something important, but in this case, not an option :)

    Hopefully theres an upgrade path document produced to go with it:)

    M
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Sorry, currently not implemented for volume clouds. But I can add that option back in next update.
     
    keifyb likes this.
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    The ambient sounds are in each weather preset. Go though all of them and just set them to "none".
     
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hm please check if you have assigned the correct player. Mybe also check the position of the Enviro Effects object in runtime. It should be at your player position.
     
    Last edited: Dec 2, 2017
    froslie likes this.
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Please reimport enviro and make sure that all files in "Ressources" folder are correctly imported. There is a folder "Shaders" -> "Core". Your error sounds like that EnviroFogCore.cginc file is missing in your project.
     
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Fog is an image effect and always uses the camera as "central point". Maybe we can change that, but haven't tested for now. It would need some modifications in shader.
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Do you already updated to 2.0.1? That version has an option for DontDestroyOnLoad in "Rendering Setup". If you disable that you should be fine. Just update Enviro by importing over your current installation. Profiles can be updated. Once you assign a older version profile you get a new button to update profile to recent version and won't loose your settings.
     
  37. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    phew. OK done and all seems fine.

    TY again :)

    M
     
    Vondox likes this.
  38. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    @Vondox
    I just updated to 2.0.1, and I found two issues. Quite easy to work around, thankfully :)

    If I set Weather Update Interval to 0, the clouds have trouble updating. I plan on controlling weather manually, but I just set it to a high value for now.

    The galaxy cube map seems to be a bit low res, or at least it appears that way. Is there some way to tweak this?
     
  39. Firlefanz73

    Firlefanz73

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

    how can I set the day and night length in minutes dynamically with the script?
    I plan a Option for "frightmode" with a Long night.

    And is there already a way to turn the skybox off at daytime when in an interior / Underground?

    Thanks a lot :)
     
  40. Drown

    Drown

    Joined:
    Feb 5, 2017
    Posts:
    11
    Hey!

    When I import Enviro 2.0.1 into an otherwise blank 2017.2.0f3 project I get the following error spammed in console :

    Assertion failed: Assertion failed on expression: 'scriptParameterClass != NULL'

    It happens even if Enviro is not used in the scene (just imported) and unfortunately has quite an impact on editor performance.

    Best regards
    Alex
     
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    You can disable auto weather updates in "Weather Controls" section on EnviroSky Inspector. Just disable "Update Weather".

    Here is a link for a free high resolution milky way cubemap. https://www.assetstore.unity3d.com/en/#!/content/94001

    Just swap the default one with the highres one in "Edit Profile" -> "Sky" category.
     
    Corvwyn likes this.
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    You can control the day and night length in your script with these lines:

    Code (CSharp):
    1. EnviroSky.instance.GameTime.DayLengthInMinutes = 1f;
    2. EnviroSky.instance.GameTime.NightLengthInMinutes = 1f;
    Haven't checked but you may could set your camera to "solid color" clear flag when underground.
     
    Firlefanz73 likes this.
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Sorry, hat error looks like it is a unity bug.

    https://issuetracker.unity3d.com/is...ntaining-onterrainchanged-api?page=2#comments
     
  44. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi, I'm replacing my evironment module with enviro. It's really nice that enviro supports other assets, like megasplat, AQUAS and so on. The weather effects (especially the snow particles) doesn't looks good, but they can be replaced. What I'am missing is the current temperature, that was available in the old environment solution. Is this small feature maybe in sight? If not, then I would implement it myself.
     
  45. CptKen

    CptKen

    Joined:
    May 30, 2017
    Posts:
    216
    Hi,

    I'm trying to use the Fog Volume integration. I'm aware that it is WIP but I'm getting 4 compile errors as soon as I unzip the package. The integration is trying to access variables that don't exist within EnviroSky.

    If it's because it's still WIP then thats fine. Was just wondering. I assumed it was WIP because it needs improvement rather than doesn't work at all.

    Cheers (p.s. Enviro is amazing thanks for making it)
     
  46. Thorskin

    Thorskin

    Joined:
    Oct 10, 2016
    Posts:
    13
    Hello, I just bought enviro and I have two bugs and a question.

    First bug, in your main script :

    Code (CSharp):
    1.    public void CreateEffects ()
    2.    {
    3.        GameObject old = GameObject.Find ("Enviro Effects");
    4.  
    5.        if (old != null)
    6.            DestroyImmediate (old);
    7.  
    8.        EffectsHolder = new GameObject ();
    9.        EffectsHolder.name = "Enviro Effects";
    10.  
    11.                 if (Application.isPlaying)
    12.                   DontDestroyOnLoad(EffectsHolder);


    What is the point of this ? You set DontDestroyOnLoad but you create a new instance when reloading the scene.
    The only interest of using DontDestroyOnLoad is to keep the same instance when reloading.

    And GameObject.Find does not work because the object you search for is no longer in the active scene.
    The result is having two instances of the effects.
    I removed the last two lines, it seems to be working fine.

    Second bug :

    I have this error when using SetWeatherOverwrite :

    MissingReferenceException: The object of type 'AudioSource' has been destroyed but you are still trying to access it.

    Your script should either check if it is null or you should not destroy the object.

    EnviroSky.UpdateAudioSource (.EnviroWeatherPreset i) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:2179)

    EnviroSky.UpdateWeather () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:2397)

    EnviroSky.Update () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:1327)

    I am loading a new scene at the same time so maybe the bug is caused by a heavy load on processor and you have an update while changing weather ?
    ( loading is additive and enviro is in my manager scene )


    And the question :
    I have enviro in my manager scene.
    I have separate scenes for exteriors and interiors
    What is the best way to stop enviro when loading interior scene ? ( lighting, weather and sounds )
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Do you already updated to 2.0.1? Should be already fixed. Maybe try to delete the archive and reimport from latest version.
     
  48. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    I also had to turn off EnviroSkyRendering. Now it works perfect.
    You do not have to add a sky box Color for me for interior. ;)
    Thanks!
     
    Vondox likes this.
  49. Vondox

    Vondox

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

    please update to 2.0.1. You got an option in "Rendering Setup" to enable/disable DontDestroyOnLoad feature and that also will apply on all enviro objects except your camera and player.

    The EnviroEffects object will be created once in Start(). In order to keep the instance when loading scenes not additive you have to keep/enable the DontDestroy flag. If you see two instances of EnviroEffects you most likely have two insatnces of EnviroSky that isn't supported.

    Your second error is because of missing EnviroEffects object(Loading new scene without dontdestroy on EnviroEffects object). I will add an null check and a debug error in next update, thanks for mentioning.

    On first look you need to update to 2.0.1 and enable the dontdestroy feature in Enviro. You also need make sure that you only load the scene that includes enviro once! I will have a detailed look into that for next update 2.0.2 and may add a few things to prevent errors related to scene loading.

    About you question:
    Do you want to have time still progressing when in an interior scene or a full stop of everything?
     
    P_Jong likes this.
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I want to refine the weather parameters/system in 2.1 update to make the system more realistic and better work with shaders like LUX, UBER or Mega/Microsplat. I also will add a temperature system then.