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

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Hi!

    I'm using Unistorm with the HTC Vive and Unity 5.4.0f3, and I'm having some odd problems with fog.

    There seems to be an outline around objects in the distance:
    Screenshot 2016-08-05 10.33.37.png

    Here it is with the Clear weather condition:
    Screenshot 2016-08-05 10.34.35.png

    Any ideas what might be causing this?

    Thanks!
     
  2. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    for the fog outline check you have anti aliasing disabled, could be also other camera effect.
     
  3. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    @Damien-Delmarle You're right! Disabling MSAA fixes this... But I need MSAA for Vive :(

    I guess super-sampling might be an option, but that's not really a route I want to go down..

    Does anyone have any other ideas how I might fix this - or get the same fog effect another way?
     
  4. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    @BHS Do you plan on having interactable trees so the player can cut them down and have them fall to spawn a prefab?
     
  5. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    I don't think that falls under a weather thing
     
  6. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Similar to my water amount + plant growth idea, I have another feature where US is providing unconventional help: a "sleep" or "rest" function. It's not as generally applicable as the plant growth, but I thought I'd mention it anyway.

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using UnityEngine.UI;
    4. using System.Collections;
    5. using UnityStandardAssets.Characters.FirstPerson;
    6.  
    7. public class Sleep : MonoBehaviour
    8. {
    9.     private GameObject UniStormWeatherScript;
    10.     public GameObject SleepPanel;
    11.     public GameObject Player;
    12.     public GameObject GameUI;
    13.     public Slider energySlider;
    14.     public float distance;
    15.     public float fadeSpeed = 5f;
    16.     public float currentTime;
    17.     public float wakeTime;
    18.     public float sleepNeed;
    19.  
    20.     // Use this for initialization
    21.     void Start()
    22.     {
    23.         UniStormWeatherScript = GameObject.Find("UniStormSystemEditor");
    24.     }
    25.  
    26.     // Update is called once per frame
    27.     void Update ()
    28.     {
    29.         distance = Vector3.Distance(transform.position, Player.transform.position);
    30.         currentTime = UniStormWeatherScript.GetComponent<UniStormWeatherSystem_C>().hourCounter * 60 + UniStormWeatherScript.GetComponent<UniStormWeatherSystem_C>().minuteCounter;
    31.     }
    32.  
    33.     void OnMouseOver()
    34.     {
    35.         if (Time.timeScale == 1 && distance <= 5f)
    36.         {
    37.             SleepPanel.SetActive(true);
    38.             if (Input.GetKeyDown(KeyCode.F))
    39.             {
    40.                 sleepNeed = Mathf.RoundToInt(480 - (480 * (energySlider.value) / 100));
    41.                 wakeTime = currentTime + sleepNeed;
    42.                 if (wakeTime >= 1440)
    43.                 {
    44.                     wakeTime = (wakeTime - 1440);
    45.                 }
    46.                 Player.GetComponent<FirstPersonController>().enabled = false;
    47.                 GameUI.GetComponent<Image>().enabled = true;
    48.                 GameUI.GetComponent<Image>().color = Color.Lerp(GameUI.GetComponent<Image>().color, Color.black, 5 * (Time.deltaTime/25));
    49.                 Time.timeScale = 25;
    50.             }
    51.         }
    52.         else
    53.         {
    54.             SleepPanel.SetActive(false);
    55.         }
    56.         //Bad idea to keep in "mouse over" scope, but needs to only apply when sleeping...maybe have sleeping bool then keep in Update...
    57.         if (currentTime == wakeTime)
    58.         {
    59.             Time.timeScale = 1;
    60.             GameUI.GetComponent<Image>().color = Color.Lerp(GameUI.GetComponent<Image>().color, Color.white, 5 * Time.deltaTime);
    61.             GameUI.GetComponent<Image>().enabled = false;
    62.             Player.GetComponent<FirstPersonController>().enabled = true;
    63.         }
    64.     }
    65.     void OnMouseExit()
    66.     {
    67.         SleepPanel.SetActive(false);
    68.     }
    69. }

    Basically, I call the current time from UniStorm. Then I add my sleep time (I'm a little fancy with my implementation of that--rather than a straight 8 hours or something, I base it off of the character's fatigue) to that, and finally calculate the final time. I speed up timeScale until hitting that "wakeTime" and then bring time back to normal.
    I had a little bit of difficulty figuring out how to get the proper sleep time based off of fatigue, or "energy" as I call it. Initially I just did something like (800/energySlider.value), because a value of 1 would give 800 (or 8 hours), and a value of 100 would give 8 (or 8 minutes). Unfortunately a value like 50 (half energy) was a total mess, not to mention 75 or 25. It took a kind of embarrassing amount of time before I finally hit upon what I did above, but it works so I'm happy with it.

    Initially I took the US hour counter and multiplied by 100 (then added the minute counter on the right side) to give a military style time, like 1726 or something. However, any calculations with this number would screw everything up, because math doesn't normally go 59, 60, 100, 101, etc...so I put everything in minutes so the absolute max time is now 24*60=1440. Works out now.

    One important part is the RoundToInt--if this isn't there, sleepNeed and subsequently wakeTime both give values with decimal points, and US simply counts minutes off, not hundredths (or millionths) of a second. Because I "wake up" by checking if currentTime == wakeTime, wakeTime needs to be an int (for all intents and purposes, though a float is still okay). In theory one could try "waking up" by checking if currentTime passes the wakeTime, but that would be far more complex. So the sleep time needs to be rounded to an int.

    Keeping my "wake up" part in the scope of the OnMouseOver function might be a bad idea, but I'm not sure if putting it in Update would force Update to check it every frame. If it DOES, that would be kind of wasteful.

    edit: and I'm still working on that lerp...
     
    Last edited: Aug 8, 2016
  7. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    According to this and this it does

    The only thing I want to add is trees and not cabbages, and see them fall before I can harvest
     
  8. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    It isn't at all.

    That was added because it uses part of UniStorm to work--it uses UniStorm to track different growth factors (and to be honest, I don't think they planned that feature--it kind of came about as a result of something someone else did with US). Now, I suppose you might use something like that instead with a tree, but interacting with trees in and of themselves is not something related to US.

    I suppose you might try to add that script to trees in your scene, and then they would be interactive after they're "fully grown" (you could make it so they're practically already fully grown), and then you could do the rest yourself. To be honest though I have no idea how trees really work with Unity (they don't get assigned as GameObjects in the Hierarchy), so I don't know how you would assign it to them.


    @BHS, unrelated question: If I wanted to put a sundial in a scene, would I want the US prefab to be centered on that sundial for it to work properly?
     
  9. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    Ok I see. Do you have a link to the script or is it that custom script at the bottom of the growing trees wiki? I went through it but didn't see code that pertains to replanting, only to check to see if the plant is harvestable or not.

    If @BHS is going to use external scripts to make their product shine more, they should include all info so us customers won't have wrong information about what we have/don't have
     
  10. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I don't mean they included an external script, I mean that someone else did something similar to that plant growth system using US, and then they expanded on it and improved it. Their version is better than what was there before anyway. So use their plant growth script. It should be part of your UniStorm package already--if you go to demo examples, then plant growth, it should have the plant growth script there.

    I actually intend to have growing trees of some sort, which can then be chopped down, as well--but again I haven't yet delved into how trees work with Unity so I can't offer any tips there.
     
  11. Hoarmurath

    Hoarmurath

    Joined:
    Mar 22, 2016
    Posts:
    27
    can this asset be used on infinite terrain
     
  12. BHS

    BHS

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

    We will need a little more information to help you out.

    If your player is instantiating, see our GetUniStormComponents_C script for assigning components on start.


    When I get a chance, I can post our Rest/Sleep example script here so everyone can get an idea with how it's done. It shouldn't require any additional calculations.


    The prefab placement shouldn't matter because it would use the sun's position and not the UniStorm prefab.


    We have a plant growing script and system included with UniStorm. the script is called PlantGrowthSystem. It should work with trees. We also have a demo scene included called UniStorm Plant Growth Example C#.


    Yes, you would just need the UniStorm system to follow the player's position.
     
  13. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Okay, thanks.
     
  14. Hoarmurath

    Hoarmurath

    Joined:
    Mar 22, 2016
    Posts:
    27
    would it work even if there are multiple player gameobjects in the scene?
     
  15. InfiniteDice

    InfiniteDice

    Joined:
    Jun 30, 2015
    Posts:
    44
    Having an issue wherein I de-select auto add fog and the fog still turns on.

    1) I turn off camera global fog script
    2) I go under lighting -> and uncheck the fog there
    3) I go into unistorm and uncheck autoadd fog option there.

    Any ideas?
     
  16. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    UniStormWeatherSystem_C.cs

    Comment Line 641
    Code (CSharp):
    1. //RenderSettings.fog = true;
    It seems (100% sure) , the fog is needed for the clouds, so your clouds will be dark/black (There is no other way), I dont know if this will work for you, other way if you want to remove the fog and keep the color of your clouds is to set the the start and end distance of the fog very far or try to set the fog color transparent (I dont remember if this worked for me or not).
     
  17. InfiniteDice

    InfiniteDice

    Joined:
    Jun 30, 2015
    Posts:
    44
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, as buronix mentioned suggested is correct. Fog is enabled on start. Commenting it out will fix it always being on. We have fixed this with UniStorm 2.2.

    Also, cloud will no longer be affected by fog as of UniStorm 2.2. This is to allow users to use custom fog options or no fog if desired.


    We haven't tested UniStorm with the multiplayer portion of UFPS.

    If UFPS multiplayer uses Photon, we have an example with UniStorm using Photon here: http://forum.unity3d.com/threads/un...storm-mobile-free.121021/page-75#post-2547753
     
  19. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    I'm still having the same issue with this. I can't seem to make any headway. I've paused after runtime and the GetUnistormComponents script finds all variables in the scene and nothing is missing in the Unistorm editor. It is, however, not assigning the shafts caster on the sun shafts script on my camera. The error I get in the console is, "UnassignedReferenceException: The variable moonLight of UniStormWeatherSystem_C has not been assigned."
     
  20. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    check in UnistormSystemEditor the Object options tab if the Moon Light is asigned, its a constant, you dont need to asign it dinamically so if its not declared you need to drag it from the Hierarchy in: UnistormPrefab_C_UI -> WeatherSystems->Sun_Moon->WorldAxle->WorldAxle->Moon->MoonLight.
     
  21. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    It is indeed. All objects are assigned correctly.
     
  22. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Try to give a more detailed console log error, or even an screenshot of the error.
     
  23. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Here is a screenshot. Like I've said, when the player is added directly to the scene, it works as expected, but not when instantiated at runtime. This is a UFPS setup instantiated with ORK at runtime with a player prefab.

     
  24. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Hey there, one thing, this is generic so you can use it in every aspect and with other errors, when someone ask you about a detailed console log, they want the detailed information, not the error message, sometimes its enought with the error message, but 99% of the time it will not be enough.
    We need this (this is an example) :
    detailed Console Log.jpg

    second, try give information about how you instantiate your player, more detailed, code related, etc, if the moonlight is there before you instantiate your player and then disappear when your player is instantiated its pretty basic to know where is the problem, try to debug or check your code and search for the moonlight component.

    Third, maybe the cause is the moonlight is not there and thats the problem, check it in the hierarchy and check in the inspector if its there a light component (the unistorm var is only for the light component, not the moonlight gameobject)
    moonliught_hierarchy.jpg
     
  25. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Thank you for your reply. My apologies, I meant to grab the detailed view. The MoonLight object is there before and after runtime. It is assigned in the editor from the MoonLight in the scene hierarchy. I've also run through all objects and made sure they were referencing what is in the scene. The player is instantiated by ORK Framework at runtime. See pictures. The particle systems are assigned at runtime by the Get UniStorm Components script.



     
    Last edited: Aug 13, 2016
  26. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Sorry I have no idea about what its happening to you, if the moonlight var is assigned correctly at the time that the error is displayed in console its very confuse, I don´t know, check if maybe you are loading another instance of Unistorm (2 at the time) and the second one has no variables assigned, its very weirs but whatever you are loading to instantiate the player its causing it.

    Check if maybe you have an old version of Unistorm.
     
  27. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    The newest version of UniStorm is imported and there aren't two active. I did make some progress. Adding a "dummy" player to the scene with just Get UniStorm Components script active and then instantiating the actual player works as expected. It seems it is not pulling the components quick enough to load them into UniStorm variables. I'm not sure if this is normal behavior, but I've added an empty GO and added the script to that. That way it is already in the scene at runtime.
     
  28. BHS

    BHS

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

    You need to instantiate your player with Awake. UniStorm needs all components within the Start function so everything needs to be assigned before hand.

    What you can do is add a slight delay to UniStormWeatherSystem script start function by putting everything in a
    IEnumerator and using waitforseconds with maybe a 0.1 delay. https://docs.unity3d.com/ScriptReference/WaitForSeconds.html

    This should allow everything to be assigned as needed.

    I'm not sure how a player is instantiated with ORK Frameork, but this should work. If not, we will find out what's going on and help get things working for you.
     
  29. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Thank you for that! I ran into another problem getting all of the Project prefab GOs into the get UniStorm components. Just the ones that are more than one level deep, of course. Thanks for that Unity...haha. Anyway, I'll give that a shot and let you know how it goes!
     
  30. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Works beautifully! Thank you! For anyone else that runs into this issue, I have included the relevant part of the code.
    Code (CSharp):
    1. void Start ()
    2.     {
    3.             StartCoroutine(WaitforReady());
    4.         }
    5.  
    6.         IEnumerator WaitforReady() {
    7.             print(Time.time);
    8.             yield return new WaitForSeconds(0.1f);
    9.             print(Time.time);
    10.        
    11.         CloudA = "_MainTex1";
    12.     CloudB = "_MainTex2";
    Now another problem I'm facing, if you would be so kind. I can't seem to get any kind of fog to show up. I've tried Global Fog image effect and through the lighting interface...nothing. Ha! Any guidance would be appreciated. Thanks again!
     
    BHS likes this.
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Glad it worked and thanks for sharing your solution!

    Is the fog issue with a build or in Unity?

    During builds, Unity's fog needs to be enabled manually. If your fog isn't working during a build, see the solution here on how to enable it: http://unistorm-weather-system.wiki...test_the_build.2C_my_clouds_are_dark_or_black

    If you fog isn't working in Unity, then ensure that it's enabled in the UniStorm Editor. Also, ensure that your fog values under Fog Options are at low enough values that you are able to see the fog. If the values are too high, this may be what's causing your fog not to be visible.
     
  32. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    I made some progress on this after my post. Something in my project settings was preventing this from working. So I deleted that file from the project and tried again. It worked as expected in forward rendering, but setting rendering back to deferred kills it. Which, I understand, may be by design at this point. But the global fog image effect doesn't work either. Anyone had any dealings with this?
     
  33. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Ok, so here's the deal. Hopefully this may help others and maybe we can come up with a better solution. On my setup, which is a UFPS based prefab, I have the Weapon Camera set to forward and the FPS camera set to deferred. Forward rendering is required for Unity's Lighting Fog. I like this effect much more than the Global Fog Image effect that can be applied to the camera. Mainly because the image effect produces a hard edge where the fog ends, unless I just haven't tweaked enough. It can also be controlled by UniStorm whereas the image effect cannot. Also, I can't get the C# version to work at all, but the JS version does, which isn't going to be quite as good on performance. If anyone has further info, please enlighten me!
     
  34. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    Ok if you figure out the chopping part before I do, please share that part of code with me if you will. Thanks
     
  35. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    The last page seems to talk a bit about making chop-able trees.
     
  36. wolfyd33

    wolfyd33

    Joined:
    Aug 17, 2016
    Posts:
    3
    So I noticed an issue at nighttime. At some point as the moon is rising, the light it gives off changes abruptly for a bit, then goes back to the amount of light it was before. What is causing that and how do I stop that?
     
  37. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Might need a video of that :)
     
  38. wolfyd33

    wolfyd33

    Joined:
    Aug 17, 2016
    Posts:
    3
    Sorry about the delay. Sure here is a video I just made about it. Look at 45 seconds and onwards.
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Chopping trees would be simple.

    Once they have reached their max growth, while using UniStorm Plant system, have them become choppable. A choppable tree could be handled with a RayCast (https://docs.unity3d.com/ScriptReference/Physics.Raycast.html). If the object is near the player, is fully grown, and is a tree object, the player can chop it down. This can be handled with a simple health system (http://answers.unity3d.com/questions/1015165/decreasing-health-on-raycasthit.html). Each hit would take away health from the choppable object. Once the tree is out of health, instantiate (https://docs.unity3d.com/ScriptReference/Object.Instantiate.html) a prefab for your fallen tree object. Finally, use the same technique to collect the materials from the fallen tree and destroying it in the process.


    Hey there!

    It looks like you need to assign your the Sun to the Sun portion of the Environmental Lighting within Unity.

    See our guide here on how to do so: http://unistorm-weather-system.wiki...My_Sky_gets_bright_.28and_or_blue.29_at_night
     
    Last edited: Aug 19, 2016
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    UniStorm 2.2.0 has been accepted and is now live! Due to the shader changes, Unity 5.2.2 or above is required for the update.

    Note: The 2.2.0 features only apply to the C# version of UniStorm. The updated JS version wasn't able to make it in this update, but it is very close to being finished. It should be submitted next week and will be exactly the same as the C# version. UniStorm Mobile will follow shortly after.

    This post may be updated with more notes, if there was something we missed. This update was huge and consists of almost too many features and fixes to list.

    New Features
    • Adjustable Weather Fading Control - The UniStorm Editor now allows you to individually control each category for both fading in and fading out various factors for precipitation, light, fog, color, and more while transitioning weather types. This allows you to customize your weather and how they fade in and out without having to alter any code. The settings support both fading faster, slower, or almost instantly. This will also help users who use faster day lengths.
    • Improved Lighting using an Animation Curve - UniStorm 2.2's lighting has been redone. This is done by using an Animation Curve that allows users to set the sun intensity based on the time of day and their scenes. Sunsets and sunrise are now much brighter and more vibrant. UniStorm's lighting fully utilizes Unity's Global Illumination. Users who don't want to use the animation curve can alter the sun's brightness using the Sun Intensity Multiplier.
    • Ambient Lighting Control - Added the option to have Ambient Lighting handled automatically, like suggested, but we have also added the option to adjust it for each time of day. This gives user more control over the Ambient Intensity for each time of day to avoid certain times being too bright or too dark.
    • Twilight Colors - Added Twilight Time of Day option to most colors. This allows for greater transition between evening to night and night to morning.
    • Disable Temperatures - Added an option to the UniStorm Editor to disable temperature generation
    • Moonlight Shafts - Added Moonlight Shafts to the moon. This can be enabled or disabled in the Moon Options
    • Cloud Density Control - Added Cloud Density Option to the UniStorm Editor. This allows user to control the percentage of the clouds being faded.
    • Cloud Height Control - Added Cloud Height controls to the UniStorm Editor. This setting controls the height the clouds will render. The lower the value, the lower the clouds will render.
    • Cloud Height Fade Control - Added Cloud Height Fade controls to the UniStorm Editor. The Cloud Height Fade controls how gradual the Cloud Height will fade.
    • New Sounds - We have added 2 new rain sounds and 5 new birds/nature sounds to UniStrom. These have been added to the Sound Manager for users to try them out. These sounds were custom recorded by us. Customers are free to use them in their projects according to the Asset Store's EULA.

    Fixes
    • Fixed all warning messages for all UniStorm scripts
    • Fixed lightning from getting stuck on when transitioning out of Thunder Storms
    • Fixed Auto Fog so it's now properly working so it doesn't always enable fog
    • Fixed issue that wouldn't allow stars to move properly
    • All manipulated variables now use Time.deltaTime for consistent manipulation
    • Many bug fixes and improvements throughout UniStormWeatherSystem Script
    • Code cleanup throughout UniStormWeatherSystem Script
    • Removed old unused code throughout UniStormWeatherSystem Script

    Improvements
    • New Cloud Shaders - UniStorm's new clouds use half the tris count than they did with the previous version while looking far more dense and realistic. Storm clouds are also more dramatic than they were previously.
    • Cloud Generation - UniStorm's new cloud generating algorithm generates new cloud patterns with each weather change that has increased cloud coverage. This allows every mostly clear, partly cloudy, and mostly cloudy weather types to be different every time while still dynamically flowing as they did previously. We have also revamped the mostly cloudy weather type to more acutely resemble mostly cloudy clouds.
    • New Moon Shader - UniStorm's moon has been greatly improved. The dark side of the moon now blends in with the color of the sky.
    • New Weather Generating Algorithm - UniStorm's new weather generation system is capable of simulating more realistic weather than previously. This is done with 2 methods.
      • Precipitation Visual Bars and Sliders - This option allows users to pick the odds for each season based on a customizable percentage using sliders. The sliders determine the odds (in percent) for both precipitation and clear weather. The higher the Precipitation Odds, the more chance of precipitation weather types. The lower the Precipitation Odds, the lower chance of precipitation weather types and higher chance of non-precipitation weather types. The bars below visually represent the odds for each season. UniStorm will generate its weather based off the percentages below.
      • Precipitation by Animation Curve - This advanced option allows users far more control to pick the odds for each month based on a customizable percentage using an Animation Curve/Graph. Setting weather odds via the line graph gives you precise control over each month. The line graph consists of a Y value of 0.0 through 1.0. This Y value represents the percentage of precipitation in decimal form. If you have a Y value of 0.1, this would be the equivalent to 10%. The X value represents each month from 1-12. This advanced control allows weather odds to fade in between each month and allows you to make fronts or even follow real-world data from other graphs.
    • Temperature by Animation Curve - Graph based temperatures has been added as an Advanced Option. Fluctuating temperatures are based off of a graph. This gives realistic results and even allows users to follow real-world graphs, if desired. The previous method has been kept and improved for those who want to keep things simple. All graph options are completely optional.
    • Sun and Moon Created on Start - Sun and moon are new created on Start each with their own function. This allows both objects to be created and positioned so they are always consistently placed.
     
    Last edited: Aug 19, 2016
  41. Sonnenspeer

    Sonnenspeer

    Joined:
    Sep 9, 2015
    Posts:
    21
    I heard that UniStorm was not created in the mind to be inside of multiplayer/networking games. Is it still like that? And if yes, will be there in the near future support for networking?
     
  42. wolfyd33

    wolfyd33

    Joined:
    Aug 17, 2016
    Posts:
    3

    Thanks a bunch, that fixed it!
     
  43. BHS

    BHS

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

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Shodan0101 likes this.
  45. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Well, I upgraded to the latest version. Looks awesome so far, but having a little trouble again. I've already modified the new unistorm system script to add the wait function under start, but still getting a couple errors I can't track down. See pictures.



    Looks like it's unable to find the sunTrans GO of "Light Parent."

    Code (CSharp):
    1. sunTrans = GameObject.Find("Light Parent");
     
    Last edited: Aug 19, 2016
  46. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    UniStorm has a new function called InitializeUniStorm(). This function contains all the code that used to be in the Start function.

    What exactly did you modify? All of our examples worked, including the spawning player example. You may need to use the newest prefab of UniStorm.
     
    Last edited: Aug 19, 2016
  47. jrock84

    jrock84

    Joined:
    Jan 13, 2016
    Posts:
    38
    Per you suggestion I just replaced my prefab with the newest one from the update and removed the modification from the following solution from post #4031.

    Code (CSharp):
    1. void Start ()
    2.     {
    3.             StartCoroutine(WaitforReady());
    4.         }
    5.         IEnumerator WaitforReady() {
    6.             print(Time.time);
    7.             yield return new WaitForSeconds(0.1f);
    8.             print(Time.time);
    9.      
    10.         CloudA = "_MainTex1";
    11.     CloudB = "_MainTex2";
    It was moved into your new start function.

    I have the same problems as before now the Ienumerator fix. It misses some variables on scene loading. See pictures. It did seem to get rid of the errors from previous post, though. Thanks for your time.


     
  48. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    After the Update I have a big weird Artifact on the screen, this is a demo scene (its the same with all) :
    unistorm_demo_scene_artifact.jpg

    This is my custom scene:
    unistorm_custom_scene_artifact.jpg

    I was checking and the cause of the problem is the Dynamic Light Clouds (no fog) shader. if I change them to the old one and its working "fine" with fog enabled ofc (its kind different, I will give you further information with more tests).

    **UPDATED :

    nah, the artifact still is the problem with the new shaders, with the old dynamic light clouds 5.3 shader and fog enabled its working fine, it was the new color of the clouds overwriting my previous one.
     
    Last edited: Aug 19, 2016
  49. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    After build project got this error. what to do?
    Shader error in 'UniStorm/Moon': variable 'o' used without having been completely initialized at line 57 (on d3d9)

    Compiling Vertex program with SOFTPARTICLES_ON
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING
     
  50. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Btw, It would be a good idea to allow set or own audio source for ambient sounds in the object options, or create by default, to allow us to configure it with our custom settings.
     
    Last edited: Aug 19, 2016