Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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] UniStorm 4.2 - AAA Procedural Volumetric Clouds, Weather, Sky, Cloud Shadows, & More!

Discussion in 'Assets and Asset Store' started by BHS, Jan 27, 2012.

  1. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    Hey there. The intensity of the sunlight range for the atmospheric fog can be controlled by adjusting the Fog Light Intensity for each weather type.
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    Rotary-Heart and PerunCreative like this.
  3. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,271
    @BHS
    Wrote you a private message
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    My apologies for missing your message here. I'm responding to it now. :)
     
    RandAlThor likes this.
  5. web553967152

    web553967152

    Joined:
    Mar 16, 2019
    Posts:
    4
    @BHS
    Some Shaders are not compatible with URP .
    Are there any plans to add support for them in the next version?
    0001.jpg
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    It's worth noting that I have a complex biome system coming with the 4.3 version of UniStorm that's capable of detecting the current biome the player is in, transitioning the weather between them, and even generating entire forecasts for every detected biome. However, for now, this is how you can set a forecast manually.

    First, you would need to disable weather generation so you can handle it manually.

    If you want to manually set a weather type, you would use:
    Code (CSharp):
    1. UniStorm.UniStormManager.Instance.ChangeWeatherWithTransition(UniStorm.WeatherType weatherType);
    You can handle setting weather with a daily event. An event can be created like this:
    Code (CSharp):
    1. UniStorm.UniStormSystem.Instance.OnDayChangeEvent.AddListener(() => YourFunction());
    The function you set for an event can check the day of the week or date and change the weather accordingly.

    Here's an example using day of the week.
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UniStorm;
    5.  
    6. public class CalendarWeather : MonoBehaviour
    7. {
    8.     [SerializeField]
    9.     public List<WeatherClass> WeatherForecastList = new List<WeatherClass>();
    10.     [System.Serializable]
    11.     public class WeatherClass
    12.     {
    13.         public WeatherType Weather;
    14.         public DaysOfTheWeek DayOfTheWeek = DaysOfTheWeek.Monday;
    15.     }
    16.  
    17.     public enum DaysOfTheWeek
    18.     {
    19.         Monday = 1,
    20.         Tuesday,
    21.         Wednesday,
    22.         Thursday,
    23.         Friday,
    24.         Saturady,
    25.         Sunday
    26.     }
    27.  
    28.     //Add the SetWeather function as an event that's invoked at the start of each day.
    29.     void Start()
    30.     {
    31.         UniStormSystem.Instance.OnDayChangeEvent.AddListener(() => SetWeather());
    32.     }
    33.  
    34.     //Set the weather according to the day of week.
    35.     public void SetWeather ()
    36.     {
    37.         for (int i = 0; i < WeatherForecastList.Count; i++)
    38.         {
    39.             if ((int)WeatherForecastList[i].DayOfTheWeek == (int)UniStormSystem.Instance.UniStormDate.DayOfWeek)
    40.             {
    41.                 UniStormManager.Instance.ChangeWeatherWithTransition(WeatherForecastList[i].Weather);
    42.             }
    43.         }
    44.     }
    45. }
    As for triggering weather in certain areas, you would use the WeatherTypeByTrigger script that's located in the UniStorm>Scripts>Examples folder. It's simple, but allows you to set the weather when the player enters a IsTrigger collider.
     

    Attached Files:

    RandAlThor likes this.
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    I have plans to look into a fix for this.
     
  8. web553967152

    web553967152

    Joined:
    Mar 16, 2019
    Posts:
    4
    @BHS
    emmm...
    The cloud shadows don't work .
    My Unity Version 2019.3.15f1
    URP Version 7.3.1
    I hope you can solve.
     
  9. nu51313932

    nu51313932

    Joined:
    Oct 28, 2016
    Posts:
    45
    Hello BHS.
    Can I control the Unistrom time in realtime?(pause time or continue time while playing the scene) some place in my video game need time to be fixed
     
  10. neshius108

    neshius108

    Joined:
    Nov 19, 2015
    Posts:
    109
    @BHS:

    Any updates on the cloud issues I mentioned several some time ago? :)
    Also I have tried switching weathers and I cannot seem to see any precipitation (I tried Heavy Snow, Heavy Rain, Rain, Foggy, etc.). I can see the clouds changing and the related sounds but nothing else.
    Only once I saw some huge snow flakes and that's it. How could I troubleshoot that?
    [Dragging the Heavy Snow prefab on the scene didn't work]

    Note: I have the editor quality setting to max and VFX activated in the scene view.
     
  11. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    295
    BHS said he's working on a fix. Hope it comes soon :)
     
  12. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    I'm in the process of adding better URP support.
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    Using real-world time can be enabled within the UniStorm Editor under the Time tab.

    To pause and resume time, use the following:

    Code (CSharp):
    1. //Pause time
    2. UniStorm.UniStormSystem.Instance.TimeFlow = UniStorm.UniStormSystem.EnableFeature.Disabled;
    3.  
    4. //Resumes time
    5. UniStorm.UniStormSystem.Instance.TimeFlow = UniStorm.UniStormSystem.EnableFeature.Enabled;
     
    nu51313932 likes this.
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    If you cannot see precipitation, you most likely have your player object in a position other than the camera. During a precipitation weather type, see the player object to see if you can see the particle effects when within the Editor tab.

    If your player is within the camera's position, see where the weather effects' parent object is being placed as it might be spawned in an incorrect position.
     
  15. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    UniStorm version 4.2.1 has been submitted and is awaiting approval!

    Example.png

    This update adds network integration with Photon PUN 2. This allows the syncing of UniStorm's weather, date, and time over the network. A working example scene of this is included.

    This works by having each player have their own UniStorm system that is run locally. The host syncs its weather, time, and date with all connected clients. If the host is disconnected, a new one is picked and the syncing process continues. Also, since each weather system is handled locally, each player can have their own quality settings. So for example, Player 1 can run UniStorm on Volumetric Ultra, where Player 2 uses Volumetric Low, and Player 3 uses 2D Medium.

    For those who want this version early, Private Message me your invoice number and I will send you the UnityPackage file. The tutorial for using Photon PUN 2 with UniStorm can be found here: https://github.com/Black-Horizon-St...em/wiki/Setting-up-UniStorm-with-Photon-PUN-2

    Also, UniStorm's documentation is in the process of being migrated from the Google Doc to its wiki here: https://github.com/Black-Horizon-Studios/UniStorm-Weather-System/wiki This will allow UniStorm's documentation to be more organized and not all one one document.
     
    Last edited: Jul 1, 2020
    Akshara and Rotary-Heart like this.
  16. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    295
    Any news on the URP bug fixes? :)
    Not that Im using networking, but the PUN integration sounds very cool. Thanks for putting up the docs on a github wiki!
     
  17. Super_apple

    Super_apple

    Joined:
    Mar 14, 2011
    Posts:
    31
    Hi,
    I use Unity 2019.3.0f6 In VR mode and Unistorm 4.2 , I got the error message .
    In my HTC vive ,the Image seems not right ,(left eye see right Image,Right eye see left image?)
    upload_2020-7-2_17-53-15.png
     
  18. Gabriel_SG

    Gabriel_SG

    Joined:
    Apr 7, 2017
    Posts:
    195
    Has the integration with Aura 2 (Clouds etc) be completed yet?
     
  19. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    62
    Hello @BHS I have a quick question, sorry if this was asked before.
    After each editor run, Unistorm is changing the "UniStorm Volumetric Clouds.mat" and "UniStorm Skybox.mat" files as expected.
    However, it would be really nice to avoid having changes on these files (at least in editor mode), especially when working with subversion systems, such as git.
    It is a bit annoying to revert the files for every commit, and to have to explain to less git savvy colleagues for the hundred time why they got a git conflict on these files.
    On older versions I was able to prevent the change by adding a property like this in the UniStormClouds class:

    Code (CSharp):
    1. public Material skyMaterial;
    2. private Material _skyMaterial;
    3. internal Material SkyMaterial
    4. {
    5.     get
    6.     {
    7.         if (_skyMaterial == null)
    8.         {
    9.             _skyMaterial = new Material(skyMaterial);
    10.         }
    11.  
    12.         return _skyMaterial;
    13.     }
    14. }
    ...And use only the SkyMaterial property throughout the code.

    But with the recent version, this hack causes the sky to not be rendered anymore.
    I am aware that this solution is not ideal, and it might cause a memory allocation, so let me know if you have a better idea on how to prevent accessing the original skyMaterial, at least in the editor mode.
     
  20. masa045

    masa045

    Joined:
    Nov 22, 2016
    Posts:
    32
    Hi I like using unistorm.
    but I'm make new project and import unistorm to scene that vegetation become jagged and artifact around edge.
    game view and build are same problem
    also this scene using temporal anti aliasing by post processing stack v2.
    my scene no issue when before import unistorm.

    I'm using
    vegetation studio pro
    gaia 2
    Tropical Forest Pack

    I'm not sure How do I fix such issue.

    ps: I notice cloud rendering at game view but cloud not rendering for build
    sky is blue and no cloud.
     

    Attached Files:

    Last edited: Jul 5, 2020
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    The last bug fix update, version 4.2.1.1, has been finished and is now live on the Asset Store. Now I will begin looking into the URP issues. You're welcome regarding the GitHub wiki. I use it for my Emerald AI asset and it's gotten a lot of positive feedback so I thought I'd do the same with UniStorm.
     
    Autarkis likes this.
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    The error messages you see are a Unity bug and not UniStorm. If possible, please update to the newest version of UniStorm, version 4.2.1.1, and use the updated VR Example scene. It works properly now. The issues were from the V1 Post-Processing Stack as some of the Image Effects don't work properly with VR. I've tested the update VR Example scene myself and everything is working correctly.
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    Hey there. Which older version of UniStorm did this work for? I tested your code and I was able to get the clouds rendering correctly, though I cannot see if the actual material file is being modified. The only issue I ran into was having to change the lines FindObjectOfType<UniStormClouds>().skyMaterial to FindObjectOfType<UniStormClouds>().SkyMaterial within the UniStormSystem script.

    As for a better solution, I'm not exactly sure. You can try the following to see if it works. This just creates a copy of the actual skyMaterial before it's modified and then uses that instead of the material located in your project.

    In the UniStormClouds script within the Start function at the top, add the following:
    Code (CSharp):
    1. #if UNITY_EDITOR
    2. skyMaterial = new Material(skyMaterial);
    3. #endif
     
  24. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    I haven't had the chance to test out the newer version of Aura 2. The last time I tried, which was awhile ago, Aura 2 wasn't documented enough to figure it out, but I believe the developer has updated things since then. I will give it another shot when I get the chance. It would certainly be a nice addition to UniStorm.
     
    Autarkis and Gabriel_SG like this.
  25. neshius108

    neshius108

    Joined:
    Nov 19, 2015
    Posts:
    109
    Hey there!
    The new update seemed to have fixed lots of issues with the weather, so that's awesome, well done @BHS!

    Now I started playing around with the different weathers and I was wondering how I could about switching the audio system from the built-in to FMOD.
    I know it's a bit outside the scope but I also understand that that kind of change would require a massive amount of modifications to get it to work, so I thought I'd ask you first!

    What do you suggest?
     
  26. alshttrbg

    alshttrbg

    Joined:
    Aug 14, 2019
    Posts:
    7
    hey Can we get a tornado in this asset?
     
  27. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    680
    How do I determine what version of Unistorm is in my project?

    and

    What is the recommended update procedure?
     
  28. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    45
    Hello, how would one go into integrating unistorm with microsplat?
    Thanks!
     
  29. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Hi there
    I have a few questions, I think they are easy to answer, while for me, it saves me a lot of time fiddeling with the settings if you answer them.

    1) Which of the color gradient options changes the main color of the sky for day and night? I want to have an exaggerated deep blue sky in arcade style at day and a super black night. I tried changing some of them, but the result stays always the same. I guess I am just changing the wrong ones.

    2) Is there any way to change the direction of the whole system? East = West in my scene, so I want to change the sun's / moon's position. I'll change the script if necessary, just tell me the right spot. Just changing the angle settings in the editor didn't help, since the whole Unistorm system always stays in place, probably due to hardcoded values

    3) (Edited: Ok... I found No 3 myself... :))

    thanks for your support
     
    Last edited: Jul 21, 2020
  30. Altair44

    Altair44

    Joined:
    Oct 22, 2019
    Posts:
    10
    1.- Is it possible to change the size of the sun?
    2.- Is it possible to change the moon for the image of some big planet?
    2.1.- Is it possible to see it during the day?
    3.- Can it fly through the clouds?

    I want to do something similar to the image.

    Regards.
     

    Attached Files:

  31. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    142
    I seem to be stuck on version 2.4.1.2, even when I update from the package manager.
    My project is 2019.3.ob1
    Anything I can do to get the latest version?
     
  32. blue_alien

    blue_alien

    Joined:
    Apr 9, 2019
    Posts:
    1
    any updates about URP support?
     
  33. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    Hey there! Great to hear the new update has fixed a lot of your issues.

    I'm not even remotely familiar with FMOD so I couldn't tell you. If it's anything similar to Unity's built-in audio system, then I would recommend following a similar approach to what I did with that. Look for every instance of the variable UniStormAudioMixer within the UniStormSystem and UniStormManager scripts and replace it with an FMOD equivalent.
     
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    I have plans to add tornado support at some point, but for now, you would need to handle the tornado logic yourself. If your tornado used particle effects, you would just set the tornado particle effect as the particle effect within your tornado Weather Type. This will allow UniStorm to fade it in when that weather type is generated. If you need to enable a script that will enable a custom script for tornado functionality, you would use an OnWeatherEvent.

    Something like:

    Code (CSharp):
    1. void Start ()
    2. {
    3.    UniStorm.UniStormSystem.Instance.OnWeatherChangeEvent.AddListener(() => YourWeatherEvent());
    4. }
    5.  
    6. void YourWeatherEvent ()
    7. {
    8.    if (UniStorm.UniStormSystem.Instance.CurrentWeatherType.WeatherTypeName == "Tornado")
    9.    {
    10.       //Enable tornado script here
    11.    }
    12. }
     
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    I haven't had a chance to look at MicroSplat support, but included is CTS controller script. The process should be very similar for MicroSplat except you would just adjust MicroSplat's snow and wetness values.
     
  36. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,259
    1) The color of the sky varies based on how high the Skybox Fog Height is set. By default, the Fog Color controls the sky color more because the sky's color is more influenced by the fog. If you set the Skybox Fog Height lower, than the Skybox Color Skybox Tint Color will affect the sky more. Using a Skybox Fog height of 0.85 and using the Fog Color to color your sky should give you the results you are looking for.

    2) You just need to adjust the Sun Revolution setting within the UniStorm Editor. This will rotate the sun and moon to set in the specified direction. So in your case, it sounds like you might want to set the Sun Revolution to 180.
     
unityunity