Search Unity

☁ Weather Maker ☁ AAA Clouds, Sky, Weather, Water, Volumetric Light & More!

Discussion in 'Assets and Asset Store' started by jjxtra, Jun 30, 2016.

  1. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Thanks a lot for the tip I managed with:
    Code (CSharp):
    1.  DawnDuskSlider.value = DateTime.Now.Hour * 3600;
    2.                     WeatherMakerScript.Instance.TimeOfDay = DawnDuskSlider.value;
    3.                     TimeSpan h = TimeSpan.FromHours(DateTime.Now.Hour);
    4.                     TimeSpan m = TimeSpan.FromMinutes(DateTime.Now.Minute);
    5.                     TimeSpan s = TimeSpan.FromSeconds(DateTime.Now.Second);
    6.                     InputTimeOfDayText.text = string.Format("{0:00}:{1:00}:{2:00}", h.Hours, m.Minutes, s.Seconds);
     
  2. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Hi
    Hi I am trying to update a slider when I insert text in the respective Input filed.
    I have two function: one is connected to the slider and the other to the input field event. The one on the slider works fine but the input field does not work? Many thanks for your help
    Code (CSharp):
    1.  public void InputYearValueChanged(string val)
    2.         {
    3.             YearSlider.value = float.Parse(val);
    4.         }
    5.         public void YearSliderChanged(float val)
    6.         {
    7.             WeatherMakerScript.Instance.TheYear = val;
    8.         }
     
  3. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Manually call YearSliderChanged(float val) in the other function.
     
  4. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    If I put this
    Code (CSharp):
    1. YearSliderChanged(val);
    into my InputYearValueChanged it says that I cannot covert string to float.
    I have tried this taken from here https://forum.unity.com/threads/problems-linking-a-slider-and-an-input-field.279083/(see below) but still does not work.(it works when I move the slider but as soon as I enter text the slider does not change the text anymore, neither updates the year)
    Code (CSharp):
    1.  public void InputYearValueChanged(string val)
    2. {
    3. Debug.Log("string value changed: " + val);
    4. if (YearSlider) { YearSlider.value = float.Parse(val); }
    5. if (InputYearText) { InputYearText.text = val; }
    6. }
    7.  
    8. public void YearSliderChanged(float val)
    9. {
    10.  Debug.Log("float value changed: " + val);
    11.  if (YearSlider) { YearSlider.value = val; }
    12.  if (InputYearText) { InputYearText.text = val.ToString(); }
    13.  }
    Sorry maybe this is not a question related directly to Weathermaker
     
    Last edited: Jul 20, 2018
  5. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    It's hard to say without seeing your code. I would suggest making a third method that updates the input text box and the slider, that way it can be called from either the slider or input change callbacks or any other custom code you make.
     
  6. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    I am not quite sure how to do it, however this works on updating weathermaker, it just does not update the slider
    Code (CSharp):
    1. public void InputYearValueChanged(string val)
    2.         {
    3.            WeatherMakerScript.Instance.TheYear = float.Parse(val);
    4.             YearSlider.value = float.Parse(val);
    5. }
     
    Last edited: Jul 20, 2018
  7. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Hi
    How can I switch on and off sounds effect?
    Code (CSharp):
    1.  public void EffectToggleChanged(bool isOn)
    2. {      
    3. WeatherMakerScript.Instance.WindScript.audio = isOn;
    4. WeatherMakerScript.Instance.RainScript.audio = isOn;
    5. WeatherMakerScript.Instance.HailScript.audio = isOn;
    6. WeatherMakerScript.Instance.SleetScript.audio = isOn;
    7. WeatherMakerScript.Instance.LightningScript.audio = isOn;
    8. WeatherMakerScript.Instance.SnowScript.audio = isOn;
    9. }
    This says that Component audio cannot be assigned it is read only.
    Also would like to switch off birds and all the other effects etc...
     
    Last edited: Jul 21, 2018
  8. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    You can deactivate the sound zone script if you don't want it to play. In the demo scene this is underneath the player.

    For the other sounds, most of the scripts have AudioSource* objects that you can set mute = true on. For the lightning, the audio source is protected so you will need to change it to public. In the next update I will make it public as well.
     
  9. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Deactivating the sound zone does not stops any sounds.
    Putting on mute every single sounds it works but it is not really elegant solution, would be nice to shut them off altogether as well as putting the volume down with a slider
    Many thanks
     
  10. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    The sound zone need to be deactivated before play mode. There is a bug where they do not turn off when deactivating after play mode, I will fix in next update.

    Weather Maker script has a volume modifier property you can reduce all sound with.
     
  11. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Ah ok thanks...I was getting crazy trying to fix this...
    I will use the volume modifier, however if I do this is telling me Non-invocable member,...It cannot be used like a method
    Code (CSharp):
    1.    public void EffectsVolumeSliderChanged(float val)
    2.        {
    3.           WeatherMakerScript.Instance.VolumeModifier(val);
    4.  
    5.        }
     
  12. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    WeatherMakerScript.Instance.VolumeModifier = val;
     
  13. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Sorry I got it now, it should be:
    Code (CSharp):
    1. WeatherMakerScript.Instance.VolumeModifier = val;
    However I may have found another bug...the slider VolumeModifier in the editor does not change but the volume works
     
  14. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    The volume slider in the inspector is also a bug, I will fix in next update.
     
  15. imagoculturae

    imagoculturae

    Joined:
    Apr 8, 2014
    Posts:
    81
    Thanks a lot, would be nice also to have 2 volumes one for ambient one for effects ;-)
    Many thanks for now, I will send you my interface and you can include it in your next release if you want...
     
  16. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Sounds good. I'll add a second ambient multiplier in next release as well.
     
    Mark_01 likes this.
  17. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @jjxtra ,

    Does this asset or will this Asset have GAIA and WAPI integration...? Thinking of buying...
     
  18. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    It does, yes.
     
    Duffer123 likes this.
  19. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @jjxtra , .Excellent! Good to know!
     
  20. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Feel free to email me if you have any questions.
     
    Duffer123 likes this.
  21. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @jjxtra ,

    What about Vegetation Studio? Any chance of integration with that too?
     
  22. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    In the works, sometime next week.
     
    Duffer123 likes this.
  23. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Excellent!
     
  24. dayero

    dayero

    Joined:
    Jan 27, 2014
    Posts:
    45
    Hi,

    any updates on this? I would be very interested in this plug in if top down 2d works out of the box.
     
  25. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Still in the works. No ETA yet, but watch the asset store for updates :)
     
  26. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    @jjxtra -- I've been having some issues in Unity 2018.2.1f1 (64-bit) -- using the default Weather-Maker prefab with no clouds my frame-rate is around 110 FPS. As soon as I enable light clouds that cuts roughly in half to around 55 FPS. So not sure what is going on there exactly, but it's hurting performance for me considerably and I'm running VR so cannot afford it.

    I'm actually working in a pretty empty scene on terrain, so I'm pretty certain the issue is the clouds, as when disabling clouds the FPS comes right back up. Any idea what could be happening?
     
  27. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Something is definitely wrong. I can render in 4K with clouds on/off frame rate is the same... Are you able to email me your project by chance?
     
  28. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Another thing you can try is run out of player mode. I did see a slight frame drop in Unity player, but then building VR for desktop and running from there I had no frame drop with clouds.
     
  29. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    All my tests were Unity 5.6.5, will test 2018.2 now.
     
  30. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    It appears Unity 2018.2 has introduced some sort of regression. I am seeing the same halving of frame rate on 2018.2. I am not seeing this at all on 5.6.5. I will try to fix/workaround, and log a bug with the Unity team.
     
  31. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I'm noticing other performance regressions in Unity 2018.2 in VR (outside of Weather Maker). None of the performance problems exist in Unity 2018.2 outside of VR even in the slightest.

    I will post back here once I have more information.
     
  32. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Do you have any reflection probes? If so can you try turning them all off and see if that makes a difference? I think that is where the regression is in VR compared to Unity 5.6.5. In Unity 2018.2, I loaded the demo scene blank in Weather Maker, the one with the shiny mirror on the ground. With the reflection probe in that scene turned on I saw the same problem with frame rate halving. Turning off the probe and frame rate is fine. In Unity 5.6.5, the reflection probe renders just fine with no slow down.

    I just finished reporting the bug to Unity. If you don't have reflection probes in your scene then I will need to do further testing, and it might be helpful to look at your project over Skype or something. Just send me an email.
     
    Mark_01 likes this.
  33. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Thanks @jjxtra -- really appreciate your fast response and action here, man.. it's much appreciated! :)

    Right -- performance in 2018.2 is not as good as it was in 5.6.x, it's actually much worse in some cases. Overall 2018.2 seems very 'sensitive' for want of a better word and I'm finding that other assets and scene setup combinations result in major frame-rate drops without any clear reason. So much so that I've started a clean production project and have been moving assets across bit by bit into 2018.2, setting up from a new blank scene, so I can find out exactly what / why this is happening.

    Can please you provide details on any other performance issues you're noticing, it might help me too. Or is it just more a more general performance degradation?

    Current scene is one terrain 500 x 500 that uses MegaSplat (which performs very well), plus Weather-Maker for the weather / environment and SteamVR setup for VR, that's it. I've not added any reflection probes to this scene yet and am still getting the same issue with the clouds. That said I'll go back to a blank scene again tonight and test again, adding things gradually and checking the affect on FPS to make sure.
     
  34. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I'm seeing particle system and some issues with lots of lights. Particle systems seem very laggy, especially in editor mode. The rendering of particles also does not look the same as previous versions.
     
  35. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Interesting. In my demo scene blank, I noticed the frame rate halving, but only when the reflection probe is enabled. Disabling the reflection probe and the frame rate was fine in VR. The scene is one plane and the clouds so it is surprising that a reflection probe even with real-time settings would cause such a drop. Unity 5.6.5 does not have the same problem.

    I've submitted the issue to Unity and they are having a look they say.
     
    Last edited: Aug 3, 2018
  36. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Are you able to verify if you have the same performance issue on Unity 5.6.5 or Unity 2017? I have run both and they perform fine.
     
  37. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Hi man - I was running your weather-maker asset in 5.6.x and 2017.x.x with no issues, the performance issue has just started since 2018.x. Thanks for your support.
     
  38. viking0007

    viking0007

    Joined:
    Apr 20, 2018
    Posts:
    4
    Hi. Just bought your asset but having some problem with box and sphere fog.
    When i drag in the box fog there is no fog in it. when drag in sphere fog it's just a pink sphere with no fog, I have rezised the box and sphere and played with parameters but nothing happend. In your videos you just drag them in and scale and there is fog:/I have tried with latest unity 2017 and 2018 version with no luck:(
     
  39. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Does the "DemoScene" work? It has fog sphere and box under the world object. Just activate them. Also have you dragged in the WeatherMakerPrefab to the root of your scene? Have you tried starting with a blank project and importing just weather maker?
     
  40. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    how well this will perform in open gl es 2 mobile ?
     
  41. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Not all the shaders support gles2 so your mileage may vary. I’ve tuned it for gles 3 devices but haven’t bothered with 2 as it’s quite outdated at this point.
     
  42. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    ok simple answer but can you please specify this subject in your product description that it only support gles 3 ?

    Thanks
     
  43. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I added a note about the fog not supporting gles 2. I think that's the main one due to the amount of shader variables it uses (lights, etc.).
     
    lolclol likes this.
  44. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Vegetation studio integration is still in progress, taking longer than expected (as is often the case with new features). As part of this integration, I am making a "Weather Zone" prefab. This will allow a collider to determine the weather profile, similar to how the new post processing volumes work in Unity 2018.2.

    In fact, combined with these post processing volumes and vegetation studio, you should be able to get some pretty nice looking effects going on.

    I will post back here once integration is complete and live on the asset store.
     
    lolclol and Mark_01 like this.
  45. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Hello - doing some tests on this asset and it's looking amazing. Integrating weather + water is fantastic.

    In my scene on iPhone X, I go from 60fps with just my terrain and props down to 20 with a very "default" WeatherMaker setup - ocean + clouds active, but not actively using any volumetric features.

    What should I look at first to get back up to 30fps?

    I'm not using post processing yet but I'd like to :D
     
  46. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Are you using Unity 2018.2 by chance? There have been some performance regressions in the Unity engine, especially on mobile and VR. If so, can you try deploying with Unity 2017 instead?

    Let me know and we can go from there. Clouds and water should not be dropping your frame like that, something fishy is going on.
     
  47. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Might as well try one run without water and another without clouds to see if either is making a difference too. Let me know what you find.
     
  48. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    I'm on 2018.1 - I'll trying moving up to 2018.2 and back to 2017, although the latter might take a little longer.

    What are the typical "big levers" for (high end) mobile optimizing? What do you usually have to give up first?

    *
    I will also try just dropping clouds and water in turn.

    *

    ON another topic, I think you need a better sample scene. I got this like four months ago and didn't realize how awesome it was until I saw it spiking on the top 10 lists and took a closer look. Your videos look a lot cooler than the bundled sample.
     
  49. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    For clouds, you can change the downsample scale, something like 0.5 or even 0.25 if you are really low end device. But the cloud shader is super fast and simple and really shouldn't bog anything down. The fog profile has a similar property.

    The water is slightly more complex than the clouds, but not by a lot. How many lights are in your scene if any besides the sun and/or moon? You can turn off volumetric shadows on the water by sliding the sample count to 0.

    For particle systems, disabling mist and turning off collisions or making your collidable geometry simpler will give you the best results.
     
  50. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    hi, i have tested your apk in my adreno 506 gpu and it didn't go quite well, below 30 fps when activated fog.