Search Unity

  1. Unity 2019.2 is now released.
    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. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Do you use the unity post processing stack? Maybe also related to that bloom effect gone crazy.
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Okay nice! Yea, good point. I will add saving the last opened categories in weather presets to improve workflow.
    I also noticed my typo some time ago... :D Haven't fixed this, as I am unsure if it possibly could break something when updating.. :/

    Simple fog mode is currently not implemented for transparent shaders, but I will add this in 2.1. :)
     
    malkere likes this.
  3. Keaneo

    Keaneo

    Joined:
    Mar 7, 2015
    Posts:
    80
    Hi,
    Developing a VR game on Rift/Vive. I get the strange "smudge" effect when moving my head sometimes (see screenshot) - any ideas what could cause it? The player has a particle effect attached to their hand sometimes and it smudges when this effect is visible in the headset (moving the effect out of view seems to return to normal). Also, it always smudges for the left hand and not for the right! Can't see ANY difference between the two, which is why I'm looking for potential causes so I know what to look for in my code/config!

    Thanks.
     

    Attached Files:

  4. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    203
    When using Full Enviro on mobile (high-end iPhone only,) what are the features that are most likely to tank performance? Guessing the volumetric stuff:
    - volume lights
    - volume clouds
    - light shafts

    Have gone to flat clouds and disabled everything with the word "volume" in it.

    Mainly want lighting and depth fog, ideally with scattering equations.

    Anything else I should lock down?

    Stack is primarily Aquas, Post-Processing v1, Enviro, and Microsplat.
     
    malkere likes this.
  5. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    That looks like your camera is not clearing. I don't have any experience with VR, but you have two cameras yes? Is there something on particle system that is messing with the left hand camera settings somehow? Try making a camera and set the clear flags to "don't clear," and move it around a bit with some objects in the scene like in your picture and you'll see what I mean.
     
  6. Keaneo

    Keaneo

    Joined:
    Mar 7, 2015
    Posts:
    80
    Turns out that the particle effect had a "Light Module" which was creating up to 25 lights! Disabled that and all fine now. However, I'll need to experiment because we need some additional light source sometimes. Does Enviro not work well with multiple lights, forward rendering, etc?
     
  7. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    I have player built and placed torches in my game that can end up being lots of lights, no specific problems with enviro I've ever seen.
     
    Vondox likes this.
  8. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,101
    I have a procedural landscape with a large number of lights, in my case I never had problems with enviro from that.
     
    Vondox likes this.
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    No, that should be all. Oh and make sure to use metal rendering api.
     
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Thanks for your report. I will investigate that issue.
     
  11. lucaslosi

    lucaslosi

    Joined:
    Oct 17, 2017
    Posts:
    5
    Hello Vondox,

    I'm having an error sometimes that almost everything in my scene turns black in game mode.

    Usually theres no error on console. The only infos that I have is that disabling Enviro Sky Rendering from the camera solves the problem and some times I have an error about the EnviroFogCore (Reimport and refresh in the project window clears this error.

    Code (CSharp):
    1. Shader error in 'Enviro/Particles/WeatherParticles': failed to open source file: '../../Resources/Shaders/Core/EnviroFogCore.cginc' at line 26 (on d3d11)
    2.  
    3. Compiling Vertex program with SOFTPARTICLES_ON
    4. 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_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

    Player and Camera are assigned in the EnviroSky manager.

    Also I have Gaia, AQUAS and CTS installed.

    You know what can be causing it?

    Thanks


    upload_2018-4-4_16-18-32.png
     
    Last edited: Apr 4, 2018
  12. Waterlane

    Waterlane

    Joined:
    Mar 13, 2015
    Posts:
    153
    Thanks for such a cool tool and for the great feedback you give here - It's most helpful and appreciated.
    I've managed to get better result btw.
    FYI - I think there have been two main reasons there are issues for me.
    1. My projects tend to want cool skies from a camera perspective - to control the player view, rather than a overidding in-game sky system.
    2. It's not always clear what impact some of the terms/slider used will/do have on scene.

    Keep up the good work though please. :)
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Hello, sorry that one is a new known issue in 2.0.3 and will be fixed in next update. Please make sure that when not using VR (It says that OpenVR could not initilized in your screenshot) you also have to disable the "Single Pass VR" option in EnviroSky inspector - "Rendering Setup". That should fix the black screen issue.

    About the error, with EnviroFogCore: Please try to right-click on enviro ressources shaders folder or individual shaders and choose "Reimport". Not sure why unity should messes that up rarely. I also had one project where unity was unable to find the include although the path was correct. Never seen this in all my other projects.
     
  14. m0ds84

    m0ds84

    Joined:
    May 25, 2016
    Posts:
    12
    Hi there, I'm trying to set the season in code but don't understand the line in the documentation.

    "EnviroSky.instance.Seasons.currentSeasons = SeasonVariables.Seasons.Spring;"

    What am I supposed to do with this line of code, Unity spits it out?

    Season doesn't appear to have its own "Enviro.instance.SetSeason" which I would understand how to use (I can change weather and time with ease).

    "The name `SeasonVariables' does not exist in the current context"

    With no example code given in the documentation, and as a newer user of Unity, I don't know what to change it to.

    Cheers!
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Hello, sorry yea that part of documentation is outdated. The "SeasonVariables" class name has changed to "EnviroSeasons" in recent update. Better use the ChangeSeason() function as this one also fire the season changed event:

    EnviroSky.instance.ChangeSeason(EnviroSeasons.Seasons.Spring);

    Also make sure that you deactivate the "Calc Season" option in EnviroSky inspector ("Time & Location Ccntrols" section).
     
  16. jayimagination

    jayimagination

    Joined:
    Dec 20, 2012
    Posts:
    80
    I was wondering where I could find the integration for Lux at?
     
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Please take a look in enviro scripts folder -> LUX Integration. You need to unzip the archiv and setup LUX weather like in their demo scene. After that add the enviro integration component on a gameobject in your scene.
     
  18. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    22
    I'm using Enviro with Gaia and I'm trying to figure out how I can modify the skybox so that I can get a large planet or planets in the background of the sky. Can I use a custom HDR with the skybox, if so, how? Thanks :)

    Example of what I'm aiming (sky-wise) for:
     
    P_Jong likes this.
  19. pccross

    pccross

    Joined:
    Jun 20, 2015
    Posts:
    92
    Having some strange issues with Enviro in a VR (Rift) project.
    If I let Player/Camera be assigned at Runtime, I notice that every time I trigger a teleport move, the screen goes virtually black for a split second, and then returns to normal when the move has completed. This happens every time I hit the teleport button on Rift controller.
    If I uncheck the 'auto' player/camera runtime assignment, and select different option for 'Camera', I don't get the teleport fade. However, while I can hear the rain and thunder effects, I don't see any in the game. I do see the Enviro stars in the night-time sky however.
    I'm running this in Unity 2018.1 b13.
     
  20. Lukeesta

    Lukeesta

    Joined:
    Jan 7, 2016
    Posts:
    20
    Hi

    I would like to create a cloud cover for a personal project that lies below the map, in other words a view from above. Since the clouds are volumetric, this should be possible with this asset, right?
     
  21. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    You could use the additional satellite feature. Create a prefab of your planet and in envirosky inspector -> "Edit Profile" -> "Satellite" category. Click on "Add Satellite" and assign your prefab.

    Sorry, what do you mean with "custom HDR" ??
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Sorry. currently not working out of the box. The fog will "overwrite" the clouds at the moment. But I will work on that in future. So you can flythrough clouds and view them from above.
     
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Sounds like that you have assigned the wrong player/camera then. The weather particle effects will move with the assigned player transform.

    Teleporting should work fine, I just tested this on my side. Please contact me in private message or e-mail and we can have a look into your project together.
     
  24. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,101
    Just a minor Problem, maybe worth a Little fix?

    In EnviroSky.cs
    Code (CSharp):
    1.     /// <summary>
    2.     /// Set weather directly with list id of Weather.WeatherTemplates. No transtions!
    3.     /// </summary>
    4.     public void SetWeatherOverwrite (int weatherId)
    5.     {
    6.         if (weatherId < 0 || weatherId > Weather.WeatherPrefabs.Count)
    7.             return;
    8.  
    If you have weatherID 0 but also Weather.WeatherPrefabs.Count = 0, this causes an exception.

    if (weatherId < 0 || weatherId >= Weather.WeatherPrefabs.Count)
    would already fix it. I am not sure if this should be fixed, I had situations where Weather.WeatherPrefabs.Count == 0
    I guess I called SetWeatherOverwrite too early.

    Thanks for Enviro :)
     
  25. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    320
    Hello I have a qeustion is there a chance that with Enviro in unity 2018.1 there will be no need to modify every single transparent detail to work proper with enviro fog? Usin rendering pipelines? It would be great, because this fog stuff is only one bad thing in enviro. First of all that we have to modify every shader we use and every update of shader we have to modify it again (huge waste of time) and second that preview in editor with these type of enviro compatible shader is totally wrong, So we have to change beetwen 2 shaders to first set up material then change it again to enviro compatible shader to have good results in game. this is soo annoying :( Please make it in other way using rendering pipelines to be able to use transparent shaders in normal way.
     
  26. SimumakDevs

    SimumakDevs

    Joined:
    Feb 13, 2018
    Posts:
    11
    Hi @Vondox, could you send me the script for multi camera support?

    Cheers
     
  27. TommiH

    TommiH

    Joined:
    Jan 14, 2008
    Posts:
    252
    Hello,

    I'm considering detaching my Enviro game object from the "official" prefab that comes with the package, and create my own prefab. But I'm worried that when making upgrades, you assume people to be using the official prefab. (For example, you add some new component to that prefab that's integral to the new version, assuming it will upgrade nicely for everyone because they're using that prefab.) Is this something we need to worry about?
     
  28. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Thanks, yea I will fix that in next update. If you want to change weather on start make sure to call that with one frame delay (Coroutine for example). In first frame enviro searches for all weather presets used in all the zones and initilize them. That's whay the list isn't created yet.
     
  29. Vondox

    Vondox

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

    yea that might be possible with the new rendering pipeline. But to even support these I need to rewrite a lot of parts of enviro. And this will take a lot of time of course. I just started to take a look into the hd pipeline and started to learn how to use them and rewrite enviro to support rendering pipelines.

    For next update I also will have a look to make the preview of modified transparent shaders right in editor.
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Please check your private messages. The multi camera support is already included and can be used by adding the "Additional Camera" component to your other cameras.
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Hello, you are save to detach or create a new prefab. If something changed in prefab I will add a new button in envirosky inspector to update prefabs, pretty much the same like profiles updates.
     
  32. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    320

    Preview would be great thing ;)
     
  33. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    22
    Thanks, I figured it out by just adding a large prefab planet into the scene using procedural planets. I tried the satellite option, but after starting game mode and then exiting, the satellite would recenter itself into the scene, I couldn't get it to stick to x,y,z far out of the scene. When I removed the satellite, it would throw an array error. In any case, enviro is awesome, great work!
     
    Vondox, P_Jong and malkere like this.
  34. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    264
    I'm using the EnviroAudioMixerSupport component. This component normally requires that the AudioMixer is in the same project, and is assigned in the unity inspector at compile time. However, this does not work in my configuration because I'm using asset bundles to send scene assets to another project (where my main client code is).

    I've adapted your component so that I can assign the audio mixer at runtime, after it's loaded into my main client as part of an asset bundle. Here is the code, in case anyone is interested in it:

    Code (CSharp):
    1. public void InitializeMixer(AudioMixer _mixer, string _ambientGroup, string _weatherGroup, string _thunderGroup)
    2. {
    3.     ambientMixerGroup = _ambientGroup;
    4.     weatherMixerGroup = _weatherGroup;
    5.     thunderMixerGroup = _thunderGroup;
    6.     InitializeMixer(_mixer);
    7. }
    8.  
    9. public void InitializeMixer(AudioMixer _mixer)
    10. {
    11.     audioMixer = _mixer;
    12.     if (audioMixer != null && EnviroSky.instance != null)
    13.         StartCoroutine(Setup());
    14. }
    To use this code, just add the above lines to your EnviroAudioMixerSupport.cs file (anywhere inside the class). Then you can call InitializeMixer() and send in the new AudioMixer, and optionally new mixer group names for each group. Here's an example of how to call the above function from somewhere else in your scene:

    Code (CSharp):
    1. public void AssignEnviroMixer()
    2. {
    3.     var enviro = GameObject.Find("EnviroSky");
    4.     if (!enviro)
    5.     {
    6.         return;
    7.     }
    8.  
    9.     var mixerSupport = enviro.GetComponent<EnviroAudioMixerSupport>();
    10.     if (!mixerSupport)
    11.     {
    12.         return;
    13.     }
    14.  
    15.     Debug.Log("Reassigning AudioMixer for Enviro groups");
    16.     mixerSupport.InitializeMixer(AudioManager.Instance.audioMixer, "Ambience", "Weather", "Thunder");
    17. }
     
    nirvanajie, P_Jong and Vondox like this.
  35. devikaworld

    devikaworld

    Joined:
    May 29, 2017
    Posts:
    4
    Hi @Vondox

    Our app "Kolb Antarctica Experience" is now live on the Oculus store. You can check out our Antarctic environment using Enviro.
    https://www.oculus.com/experiences/rift/1622671264464756/

    It's already live on Viveport and Windows Mixed Reality store and will be released on Steam next week. All the platform links are on our website.
    http://kolb.edu.au

    Thanks for making such an amazing plugin! We've had no development issues across all major VR platforms.
     
    P_Jong and Vondox like this.
  36. wkidwell

    wkidwell

    Joined:
    Jan 24, 2018
    Posts:
    11
    Your product looks interesting, what version of Unity do you suggest I download that will throw the least errors? I am currently on Unity ver 2017.3.0f3. Should I install an earlier version for maximum compatibility? Thanks for any info on this.
     
  37. pccross

    pccross

    Joined:
    Jun 20, 2015
    Posts:
    92
    Someone asked back in post #1391, how to remove the black ring shadow from behind their moon (looks like spherical black hole), and I didn't see a response to that.
    Is there a way to remove that outer black ring around the moon?


    upload_2018-4-12_22-8-35.png
     
  38. SimumakDevs

    SimumakDevs

    Joined:
    Feb 13, 2018
    Posts:
    11
    Is there any option to avoid the instantiation of the audio sources? We play our sounds with Wwise and would like to use only this audio system.
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    That version should be fine for enviro. In general I can't suggest you a version with the least issues. That depends on your project setup and what features/assets you may want to use.
     
    P_Jong likes this.
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Thanks for reminding me about that. I will work on a fix for that issue in the next days.
     
    P_Jong likes this.
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Unfortunaly, you would need to modfiy that in code. Disabling the spawn of audio sources would be easy, but you also have to disable the audio playback of enviro for weather, ambient and thunder sfx or switch to your sound engine, otherwise you would run into errors.

    Take a look into EnviroSky script:
    - Audio sources will be instantiated in CreateEffects () function.
    - Ambient sounds will be played in TryPlayAmbientSFX () function.
    - Thunder sfx will be played in Thunder () function;
    - Weather sfx will be played in UpdateAudioSource function.

    Send me a mail if you need help to integrate Wwise.
     
  42. wkidwell

    wkidwell

    Joined:
    Jan 24, 2018
    Posts:
    11
    Thanks for the reply
    Looks quite promising, I’ll give it a go!
     
  43. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    271
    Hey there.
    First off, thanx for making this great asset <3

    Anyhow,
    Would you be willing to add out the box support for NVIDIA VRWorks?

    As it's SPS mode, enviro causes it to only render in the left eye. Leaving the right eye black. Which is a simple fix according to the VRWorks docs... But while I'm a good coder... I have no shader experience, so it's really baking my noodle.

    I'd be willing to pay you for your time, if it ends up being a problem to implement.
     
    Last edited: Apr 13, 2018
    Vondox and Ramulos like this.
  44. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    Forgive me if this has already been answered but I combed through the forum and ran some searches and didn't find it if it's here. I wondered if there was any way to create an event that detects just rain weather changes instead of just a weather change. I'd like to add rain lens effects when rain starts and frozen lens effects to the camera when there's snow.
     
  45. Deleted User

    Deleted User

    Guest

    Shader error in 'Enviro/EnviroFogRendering': '[' : syntax error syntax error at Assets/Enviro - Dynamic Enviroment/Resources/Shaders/Core/EnviroVolumeLightCore.cginc(201) (on gles)

    Compiling Vertex program with ENVIROVOLUMELIGHT
    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_COLORSPACE_GAMMA

    Attempting to port to WebGL.
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Hello, I will have a look into VRworks in the next days.Should not be that hard to modify the shaders.
     
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Hello, you could just check the weather preset name like that:

    Code (CSharp):
    1. void Start ()
    2.     {
    3.         EnviroSky.instance.OnWeatherChanged += (EnviroWeatherPreset type) =>
    4.         {
    5.             DoOnWeatherChange(type);
    6.         }
    7.      }
    8.     void DoOnWeatherChange (EnviroWeatherPreset type)
    9.     {
    10.         if(type.Name == "Light Rain")
    11.             {
    12.                 //Do something
    13.             }
    14.     }
    But maybe a better solution would be checking the current wetness and snow intensity in update to drive your lens effects. That way you would have smooth transitions.

    EnviroSky.instance.Weather.curWetness
    EnviroSky.instance.Weather.curSnowStrength
     
    NAiLz likes this.
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,873
    Please make sure to use WebGL2 only. I havent't tested with latest update, but was working fine with 2.0.
     
  49. ChrisDirkis

    ChrisDirkis

    Joined:
    Jun 1, 2017
    Posts:
    37
    Is the mobile version currently compatible with the desktop version in the same project?
     
  50. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88


    @Vondox Thanks so much!