Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[70% OFF!] 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,760
    Akshara and Rotary-Heart like this.
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey everyone,

    Here’s a video that shows a few examples of what's possible with UniStorm's new lightning events. Built-in Emerald AI support has been added to allow lightning to strike and damage Emerald AI agents without the need for coding, however, any AI system can be damaged with a custom event. More complex mechanics can be added by adding custom functions to UniStorm's lightning event which allows UniStorm to call them when a lightning strike happens. Events can include conditions for added functionality.



    Adding a lightning event is as simple as adding your function to the OnLightningStrikeEvent in Start. This is called each time the lightning successfully strikes an object of the appropriate layer.
    Code (CSharp):
    1. void Start()
    2. {
    3.    UniStormSystem.Instance.OnLightningStrikeObjectEvent.AddListener(() => YourCustomLightningStrikeEvent());
    4. }
    There's also an event for lightning striking players. This can be useful causing damage when a player is struck by lightning.
    Code (CSharp):
    1. void Start()
    2. {
    3.    UniStormSystem.Instance.OnLightningStrikePlayerEvent.AddListener(() => YourCustomLightningStrikePlayerEvent());
    4. }
    The object that is struck with lightning can also be found with this:
    Code (CSharp):
    1. UniStormSystem.Instance.LightningStruckObject
     
    neshius108 and Akshara like this.
  3. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    This looks fantastic. (btw. how have you changed the players arms from rfps, never got this done).
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks! I just used this animated arms asset:
    https://assetstore.unity.com/packages/3d/characters/medieval-starter-kit-94288?aid=1101l3nnr and attached it directly to where the default RFPS arms are. I then replaced all of the animations that the weapons use with the custom one’s animations and disabled the default RFPS arms. If there are any reference to the default RFPS arms, you replace it with your custom arms/model.
     
  5. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Great, thank you.
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    You’re welcome!
     
  7. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    Which custom animations did you use?
     
  8. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    First, Thank You for continuing to always update and improve on this asset.
    Secondly I could use a little help and Forgive me if this is a noob question and or im just an ignorant old man but,

    If i am creating a world with multiple climates for example, a biome for the different climates like snow, desert, rain forest, etc. How would i go about setting this up using Unistorm to effectively transition when i go from one biome to another, as well as the ability to see into a biome and see the snow in the distance for example or sandstorm/rain on the horizon. i have tried creating zones before and ran into issues where one min your running dry and next min your in snow then when you run out there is no snow behind you anymore,....While I love what Unistorm allows us to do i need to understand How to do some of this.

    Edit: While working on some of the features mainly weather by trigger, i see you can manipulate it to trigger on when you enter a trigger but when you leave the area the weather is still with you, if you change to the current weather upon Exiting trigger it is no longer snowing in the area you left and reverts back to current weather on both areas. this is where im mostly hung up on

    Thanks In Advance
    James
     
    Last edited: Jun 17, 2019
    Rockwall33 likes this.
  9. anunnaki2016

    anunnaki2016

    Joined:
    Jun 16, 2016
    Posts:
    93
    @BHS script for photon 2 please
     
    Alex3333 likes this.
  10. btckey

    btckey

    Joined:
    Nov 1, 2012
    Posts:
    40
    My versions
    Unity 2019.1.6f1 (64-bit) for WebGL
    UniStorm 4.1.0

    1) When i choose Platform Type Mobile
    errors appear

    NullReferenceException: Object reference not set to an instance of an object
    UniStorm.UniStormSystem.UpdateCelestialLightShafts () (at Assets/UniStorm Weather System/Scripts/System/UniStormSystem.cs:1277)
    UniStorm.UniStormSystem.InitializeUniStorm () (at Assets/UniStorm Weather System/Scripts/System/UniStormSystem.cs:709)
    UniStorm.UniStormSystem.Start () (at Assets/UniStorm Weather System/Scripts/System/UniStormSystem.cs:389)


    2) How to reduce the weight of the assembly, what can be removed, optimized?
    I just need to Partly Cloudy and Light Rain

    when I do as in the picture, the weight of the assembly does not change
    https://drive.google.com/open?id=1SYHNssznfugC3K_TYS-wzG5dbtPirXWj
     
    Last edited: Jun 20, 2019
  11. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @BHS,

    im getting the error below. I presume it's because I use PostProcess V2 and not V1. Is there away to just use V2 instead?

    Assets\UniStorm 3.0\Scripts\System\UniStormSystem.cs(259,9): error CS0246: The type or namespace name 'UniStormSunShafts' could not be found (are you missing a using directive or an assembly reference
     
  12. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Hello!

    I was looking at this asset! Looks amazing!

    What really got my attention are climate zones. Is it possible that certain weather can be in certain parts of the world (terrain)? I understand with climate zones you can draw it down to snow to rain.

    Thank you!
     
    Jschilz1 likes this.
  13. neshius108

    neshius108

    Joined:
    Nov 19, 2015
    Posts:
    110
    Woah, lighting transforming people into werewolves, THAT's cool! :D
     
    BHS likes this.
  14. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @BHS Finally got around to trying out the new 4.1 update, unfortunately I've run into a few issues.

    First of all, I enabled Auroras on Clear weather type, then I go to night and this is what I see:



    If you look close, just a bit up and right of the mouse cursor, there is a small blue/green UFO flying through the air! Okay no, really I think it's the Aurora not displaying correctly. It goes away when I switch to another weather heh. All I did was enable aurora on clear weather type and leave the default intensity and colors, is there anything else that needs to be done to make them work?

    Next thing I noticed, and maybe this has always been the case, but the stars on the skybox don't render very close to the horizon, there should be some fog/diffusion near the horizon, but that's a pretty large gap of stars not seen.

    Couple other smaller issues, I noticed that the Master Profile doesn't contain defaults for any of the more recent/new stuff, including the ambient intensity, so it ends up set with wonky values (as do some others like environment reflections) when you import the master profile.

    I've also experienced another issue with water stuff but I think it's just the lighting in general. I have pinpointed when it happens, during dusk and dawn transitions. It seems like the default curves make it possible for there to be both the sun and moon completely off at the same time, when this happens, there is a drastic shift to extra dark but only for a few seconds until the other light turns "on" again. The result is the following 2 images. It starts out relatively lit (like the second image), then instantly jumps to the first image for a few seconds where there is virtually no lighting, then it goes back to the second image instantly. This is why I think there is a problem in the default values, at least one light should remain on at all times I think, but after some tweaking I still had the problem and couldn't narrow down exactly the right times to transition everything to avoid it happening (I tried overlapping sun and moon always on a bit, but I started to get some stranger results). The lighting in these pictures is adjusted slightly to avoid completely dark transition periods artificially with a directional light straight down at 0.1 intensity with basic white just so you can see something during the transitions when it goes totally dark, and I am using 12 minute day and 12 minute night cycle so everything transitions a bit slower.





    In this case, it was the transition to dusk, but I tried dawn as well and it did the same thing for a few seconds with the instant jarring light transition. The dim ambient light is always on, and I fixed the ambient intensity to be a gradual change but with no light at all it doesn't affect this issue.

    Edit: One more bit of feedback, it would be nice to have some control over the intensity of the Moonshafts in specific, but both sun and moon shaft intensity graph would be nice, the moon shafts are a bit too strong.

    As always, thank you for your efforts, look forward to Auroras working.
     
    Last edited: Jun 22, 2019
  15. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Custom animations on the AI or the RFPS Player?
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    You're welcome!

    As of right now, weather zones simply trigger weather changes. With the next update, I will be creating a biome/climate system that will allow users to customize the weather types for each climate. The weather will transition and update the systems weather types for each climate. This will also allow the precipitation odds, as well as other settings, to be customized per climate zone. This will all be handled using either the current texture at the player's position or with customizable climate parameters.

    As for being able to see the weather differences between zones, this isn't yet possible as there is only one active weather at a time. When designing the new climate zone system, I will look into a solution for this.
     
    Jschilz1 and Akshara like this.
  17. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm working on it. I'm hoping to have it ready with the next update.
     
    anunnaki2016 and Alex3333 like this.
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    1) Thanks for the bug report. I have a simple solution below, but I will have it fixed with the next update.

    In the UniStormSystem script, find the UpdateCelestialLightShafts function and update the function to the code below:
    Code (CSharp):
    1. void UpdateCelestialLightShafts ()
    2.         {
    3.             if (SunShaftsEffect == EnableFeature.Enabled)
    4.             {
    5.                 if (m_SunLight.intensity <= 0)
    6.                 {
    7.                     m_SunShafts.enabled = false;
    8.                 }
    9.                 else
    10.                 {
    11.                     m_SunShafts.enabled = true;
    12.                 }
    13.  
    14.                 if (m_MoonLight.intensity <= 0)
    15.                 {
    16.                     m_MoonShafts.enabled = false;
    17.                 }
    18.                 else
    19.                 {
    20.                     m_MoonShafts.enabled = true;
    21.                 }
    22.             }
    23.         }
    2) Reducing the size/quality of the audio files that are being used will most likely help.
     
    Olegjan17 likes this.
  19. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    What version of UniStorm are you using? The folder UniStorm 3.0 is no longer present since the UniStorm 4.0 update. The folder is now UniStorm Weather System. If you are updating from version 3.0, you will need to completely remove UniStorm from your project before importing the 4.0 version. This is most likely what's causing your error.
     
    AndyNeoman likes this.
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks!

    Currently, the climate zones are being redone (if you are referring to the older video of climate zones). For now, there are weather zones and they work with one weather type. I am working on a new climate zone system that will allow users to customize the weather types, temperatures, precipitation odds, and more that are in the current climate/biome. Climates/biomes will be determined by either the current texture the player is on (with Unity Terrains) or with customizable parameters. I plan on having this ready with the next update.
     
    Rockwall33 likes this.
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I found the cause of the mispositioned auroras and will get it fixed with the next update. For now, in the UniStormSystem script, find the line:
    Code (CSharp):
    1. m_AuroraParent.transform.position = new Vector3(0,-0.1f,0);
    And replace it with this:
    Code (CSharp):
    1. m_AuroraParent.transform.localPosition = new Vector3(0,-8e-05f, 0);
    I will add some settings to adjust the horizon height of the stars. For now, you can control this by adjusting the Transparent Y value on the UniStorm Stars material. A value of 0 should make the stars brighter along the horizon, but not too much. You can keep decreasing this value until you find a suitable blend height.

    StarHeightAdjustments.png

    Thanks for the info on the Master Profile. I will get that updated so it includes the updated features.

    Blending the sun and moon intensities can be adjusted using the sun and moon intensities curves. If want them to briefly overlap, or be equal, you can adjust the 2nd and 6th points by right clicking and adjusting the time value.

    CelestialAdjustments.png

    I'll add some settings to control the light shaft effects for both the sun and moon with the next update.
     
  22. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @BHS
    Thanks for the tips. I did try to modify the intensity curves, but was unable to narrow down the exact cause of the weird lighting. It's like when the intensity hits 0 the actual lighting effect changes from an intensity of 0.0001. I'll dig into this more and get back to you.

    I tried updating the position for the Aurora, and it did indeed fix the problem, except now a new one has come up. Whenever I move, the aurora freaks out like there is distant rounding error and it jumps around flickering a lot. Thoughts?

    Thanks for the updates on the rest :)
     
  23. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Thank you!!
     
  24. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @BHS
    I fixed the overlap on the time for lighting finally, took a bit to work out the right settings, but turns out it's pretty simple.

    However, I found a new problem. Looks like when the moon is dark (new phase) it still has moonshafts, these same shafts dance a lot on the moon in other phases. The moon shafts are very narrow and dance rather chaotic like there is clouds in front but there isn't, compared to sunshafts which are fairly steady and look right. It would be nice to be able to control a few variables for shafts including intensity, but the dancing part of it is a little distracting at night when there is nothing in front of the moon as in the second image (hard to show without video, but the shafts are constantly moving around like there is an obstruction but there isn't).



     
  25. wangjiangang

    wangjiangang

    Joined:
    May 5, 2015
    Posts:
    15
    Hi, BHS the unistorm support mesh snow ?
     
  26. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    That's probably the issue. I will remove and reimport.

    EDIT:- I have done that but I still have the original issue of how to get around not using post process V1 when I use V2.

    EDIT 2:

    @BHS Im getting two errors now I have deleted and reimported everything

    Assets\Standard Assets\Effects\ImageEffects\Scripts\SunShafts.cs(46,30): error CS0115: 'UniStormSunShafts.CheckResources()': no suitable method found to override

    Assets\Standard Assets\Effects\ImageEffects\Scripts\SunShafts.cs(9,38): error CS0246: The type or namespace name 'UniStormPostEffectsBase' could not be found (are you missing a using directive or an assembly reference?)
     
    Last edited: Jun 24, 2019
  27. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Thank You,
    as far as the transition goes as long as the texture holds the snow or rain look then that would be enough for now, the issue is when i was testing was i would walk out of a snow area and when i look back even if snow had stopped the terrain should still have the snow on the ground for at least a transitional period, instead of looking back and seeing grass as if it never snowed :)..... any idea when you expect this update, i know you just did an update so just curious?
    Thanks again
     
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I will add a moon shafts intensity setting for each moon phase so users can stop the moon shafts from being active on the new moon moon phase as this results in undesired effects. I will also add the other moon shaft settings to UniStorm's Moon Settings.
     
    combatsheep and Astaelan1 like this.
  29. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there!

    If I understood correctly, no, the snow does not build snow using mesh. However, the snow shader can be applied to any mesh to accumulate shaded 2D snow.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I looked into this and it's happening because UniStorm's sun shafts are being overwritten by Unity's sun shafts as UniStorm's is a modified version of Unity's (If you are using the legacy image effects). If you're not using the v1 version of the image effects, remove them and reimport UniStorm. There should be no conflicts with the v2 image effects and there are no dependencies on either v1 or v2.

    For clarification, when you are referring to v1 of the image effects, do you mean post-processing stack v1 or Unity's Legacy Image Effects (They are both different assets)? By v2 are you referring to the Post-Processing Stack v2 or Unity's v1 Post-Processing Stack?
     
  31. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    hi i apologize if this has already been asked or is in docs..
    the snow shader for objects looks great.. but is there a way to slow it down or adjust how fast an object freezes?
    currently CTS takes 20-30 secs to freeze over the land, but with unistorm shader objects are changed with in seconds..
    Thank You.

    Edit: modified "UniStormCTSController" this speeds up CTS snow effect..
    Code (CSharp):
    1.  
    2.  [Range(0.5f,10.0f)]
    3.         public float snowAccuSpeed = 3.0f;
    4. //in Update
    5.  if (Shader.GetGlobalFloat("_SnowStrength") > 0)
    6.             {
    7.                 m_CTSWeatherManager.SnowPower = (snowAccuSpeed * Shader.GetGlobalFloat("_SnowStrength"));
    8.             }
    9.  
     
    Last edited: Jun 27, 2019
    BHS likes this.
  32. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @BHS, I was referring to Post process V1 which i don't use, but when i imported Unistorm 4.00 they were imported along with the asset. I use V2 in project (i've not used the legacy effects for a couple of years for clarification) I wonder why unistorm imported the V1 post process folder if it doesn't use them?
     
  33. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hello all, @BHS I have posted a request on the discord channel but i thought I would post here in case any awesome users have managed to incorporate the unistorm shaders with Aura2 volumetric light? It works simply enough with the sun/moon and looks awesome but it needs adding to the shader as I understand for the particles for snow/rain/lightening to work. Any tips would be fantastic.

    Cheers,

    Andy
     
    Akshara and JBR-games like this.
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I will add a controllable slider to weather types to individually control the speed in which snow accumulates. This should allow for some cool functionality like having heavy snow accumulate faster than light snow. I will also try to balance the CTS controller to have it match UniStorm’s snow shader better.
     
    JBR-games likes this.
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    The Post-Processing Stack v1 doesn’t have to be imported with UniStorm. Its purpose is to have the default image effects available for the demo scenes.
     
  36. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I will reach out to the developer of Aura 2 and get UniStorm integrated as soon as possible. I should be able to do it with an included UnityPackage with a future update so the setup process can be minimized.
     
  37. anunnaki2016

    anunnaki2016

    Joined:
    Jun 16, 2016
    Posts:
    93
    @BHS bad fps last version unistorm and last version Unity 2018.4.3f1

    is very strange
     
    Last edited: Jul 4, 2019
  38. xxxgashekxxx

    xxxgashekxxx

    Joined:
    Jun 16, 2017
    Posts:
    6
    I have terrible FPS problems after the V4 upgrade for some reason as well, can't place my finger on why though; I am using VR just to add..... If I disable Unistorm it jump back up to 90 fps, but with it enabled i'm at around 50 fps.

    The draw calls or batches aren't massively increased when I enable it, and I don't see any Unistorm script behaviours hammering anything in the profiler.

    Edit: using Unity version 2019.1.8f, 1024x1024 terrain with minimal vegetation / models. Started a new test scene with just a 1KM terrain and Unistorm, and experience similar behavior.
     
    Last edited: Jul 5, 2019
    anunnaki2016 likes this.
  39. anunnaki2016

    anunnaki2016

    Joined:
    Jun 16, 2016
    Posts:
    93

    same problem
     
    xxxgashekxxx likes this.
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Interesting, the system performs quite well so there should be something that is causing this. Do you have cloud shadows enabled, if so, what resolution? What cloud quality setting are you using? What are the specs on your computer? Are you receiving any errors? Have you tested a build version to see if the problem is still present? Is this only happening in VR?
     
    Last edited: Jul 6, 2019
  41. Sam512

    Sam512

    Joined:
    Jan 13, 2019
    Posts:
    178
    Does your system work in forward render?
     
  42. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, it does.
     
  43. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Hi, using Unity 2019.1.10f1 i can`t see the settings tab:

    Image1.PNG
     

    Attached Files:

  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    This is a bug that happens when using 4K that doesn’t allow the editor to calculate the editor’s width correctly. I’m submitting an update for this within the next day or two.

    For a temporary fix, open the UniStormEditor script and do the following:

    Find the code below, located on lines 574, 583, 710, 1023, 1535, and 1887.
    Code (CSharp):
    1. GUILayout.Width(90 * Screen.width / 100));

    And make the following changes to them.
    Code (CSharp):
    1. GUILayout.Width(90 * Screen.width / Screen.dpi));
     
    SickaGames1 likes this.
  45. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Works now, thank you.
     
  46. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Two other little problems i have:
    1. The sun seems really pixelated behind the Clouds.
    2. This blue shape moves with the camera, how do i get rid of it ?
    Thank you.
     

    Attached Files:

  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    1) Change the Render Type of the clouds to Opaque. This can be found under the Cloud Options.
    2) This happens when your camera's near clipping plane is too small or if you have large far clipping plane distances. If you need to have a large far clipping plane (for example 20,000), make sure your near clipping plane is set to at least 0.2. For everything else, just marginally adjust the near clipping to find a value that works for your camera's far clipping plane. UniStorm doesn't need a large far clipping plane like it used to with version 3.0.
     
  48. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    1. Solved
    2. Near clipping plane is 0.12 (which i need for my fps controller), far clipping plane higher then 1700 gives me the blue shape? Mostly if weather is cloudy.
     
    Last edited: Jul 14, 2019
  49. Sam512

    Sam512

    Joined:
    Jan 13, 2019
    Posts:
    178
    I see that there's no shadow casting at night time. Even in real life there's shadow when full moon
     
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Increasing your Near Clipping Plane by even 0.05 should be enough to resolve that. It's somewhat of a limitation with Unity and low near clipping plane distances. Unity's shadows have similar issues. Another solution could be to just use a second camera to render UniStorm and its components.