Search Unity

[RELEASED] UniStorm 5.2 - AAA Volumetric Clouds, URP Support, Weather, Sky, Atmospheric Fog, & More!

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

  1. BHS

    BHS

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

    RandAlThor

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

    BHS

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

    web553967152

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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:

    Joymagine and RandAlThor like this.
  6. BHS

    BHS

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

    web553967152

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

    nu51313932

    Joined:
    Oct 28, 2016
    Posts:
    81
    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
     
  9. neshius108

    neshius108

    Joined:
    Nov 19, 2015
    Posts:
    110
    @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.
     
  10. Autarkis

    Autarkis

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I'm in the process of adding better URP support.
     
    LostPanda likes this.
  12. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
  15. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    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!
     
  16. 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
     
  17. Kaen_SG

    Kaen_SG

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

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
    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.
     
  19. masa045

    masa045

    Joined:
    Nov 22, 2016
    Posts:
    35
    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
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
    LostPanda and Autarkis like this.
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
    rymcc, Autarkis and Kaen_SG like this.
  24. neshius108

    neshius108

    Joined:
    Nov 19, 2015
    Posts:
    110
    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?
     
  25. alshttrbg

    alshttrbg

    Joined:
    Aug 14, 2019
    Posts:
    8
    hey Can we get a tornado in this asset?
     
  26. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    85
    Hello, how would one go into integrating unistorm with microsplat?
    Thanks!
     
  27. 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
  28. 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:

  29. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154
    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?
     
  30. blue_alien

    blue_alien

    Joined:
    Apr 9, 2019
    Posts:
    1
    any updates about URP support?
     
    LostPanda likes this.
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
  32. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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. }
     
  33. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
    RagingJacob likes this.
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    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.
     
  35. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    What ever happened to Unistorm Events?
     
    Last edited: Sep 21, 2020
  36. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    NullReferenceException: Object reference not set to an instance of an object.
    at UnityEngine.Transform.get_position () [0x00000] in <00000000000000000000000000000000>:0
    at UniStorm.UniStormSystem.UpdateColors () [0x00000] in <00000000000000000000000000000000>:0
    at UniStorm.UniStormSystem.Update () [0x00000] in <00000000000000000000000000000000>:0

    (Filename: currently not available on il2cpp Line: -1)

    Getting this error (a lot cause its on update) on build and in editor
     
    Last edited: Aug 17, 2020
  37. gozdagb

    gozdagb

    Joined:
    Feb 23, 2014
    Posts:
    71
    @BHS Hi, do you know maybe why, depending on the selected resolution, I have such an effect as a result?
    Unity 2018.2
    Unistorm 3.0

    Thanks
     

    Attached Files:

  38. mentalgear

    mentalgear

    Joined:
    Jul 19, 2019
    Posts:
    23
    Can clouds be flown through ?
     
  39. andrew_unity628

    andrew_unity628

    Joined:
    Apr 1, 2020
    Posts:
    9
    Does anyone know of a way to add a custom Aurora effect, beyond just changing the settings of the included one? Enviro has a nice Aurora effect and I'd like to try and get something closer to it in UniStorm.
     
  40. nu51313932

    nu51313932

    Joined:
    Oct 28, 2016
    Posts:
    81
    I just switched from 4.1 to 4.2 and the cloud color it not as the same. I don't know why.

    Just wanna ask you. Does the cloud color (such as when it is sunset) should be the same as version 4.1?
     
  41. my_hit

    my_hit

    Joined:
    Dec 4, 2018
    Posts:
    1
    Hello, I met some trouble. When the camera rise to some height, there is a blank at the horizon, just like the picture. Could you give me some advice? upload_2020-9-15_16-35-51.png
     
  42. anunnaki2016

    anunnaki2016

    Joined:
    Jun 16, 2016
    Posts:
    93
    Hi my friend @BHS, i have test photon script, but big probleme, if you die and players respawn who is go create a new clone unistorm system network and is create big problem can you help me fix that please?
     
  43. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    No, clouds cannot be flown through.
     
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Every time I release an update that modifies the colors, I update the Window>UniStorm>Create System examples to closely resemble what they were previously. If you want to adjust the overall cloud color, you can change the UniStorm Volumetric Clouds material _uCloudsColor to have more control of the overall tint.
     
  46. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, this is a bug that I will be fixing with the upcoming 4.3 update. It should be submitted within the next week or two.
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there. The Photon code is an example to get you started. If your player is being killed and spawned, you would have to add code to check for an already spawned UniStorm system before spawning a another one.
     
  48. nu51313932

    nu51313932

    Joined:
    Oct 28, 2016
    Posts:
    81
    Can I change the sun colour or sun texture(for my own sun art texture)?
     
  49. EntertainmentEnterprise

    EntertainmentEnterprise

    Joined:
    Aug 22, 2018
    Posts:
    18
    @BHS I know you get lots of requests and demands, so I hope I'm not adding to your plate... Any chance at Single Pass Instancing support for VR in the 4.3 update?

    This has been our go to weather and sky system for a few years now, but our latest project uses the much better for VR performance SPI system. I can update them manually for now if not, but I'd really like to not have to do that. Thanks for your time!
     
    stef07 likes this.
  50. ernov

    ernov

    Joined:
    Sep 17, 2014
    Posts:
    21
    Hi
    I have a problem of display with the ocean, without doubt it is necessary to make a particular adjustment.
    Indeed the ocean rendering is not applied correctly, with the ocean standard, Ceto or Crest.
    If you have an idea, thank you in advance.

    Unity Unity 2019.4.8f1, Unistorm the latest version.