Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[RELEASED] Enviro - Sky and Weather (Dynamic Sky and Weather System)

Discussion in 'Assets and Asset Store' started by Vondox, Apr 11, 2015.

  1. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,098
    Gave myself the answer, it is:

    EnviroSky.instance.Audio.ambientSFXVolume = -1f;

    Thanks :)
     
  2. Vanidash-Studios

    Vanidash-Studios

    Joined:
    Mar 9, 2016
    Posts:
    71
    Im using microsplat for the terrain, i did change the light color under the lightning category, but all the other stuff is pretty much at default
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Hello, generally UWP should be supported, but it looks like that enviro with wmr vr sdk currently not working right. I need to have a detailed look to check why it isn't working like in openvr or oculus sdk... :(
     
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Sorry, not sure if I understand right what you want to achieve, but you could change the cloud speed in your scripts with this line:

    EnviroSky.instance.cloudsSettings.cloudsWindStrengthModificator = 0.01f;
     
  5. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Ah okay, if you still using the interior component the way you did, that won't work. Sorry :D
    But better use this line for volume mod and use the EnviroSky.instance.Audio.ambientSFXVolume for your game menu sound settings for your players.

    EnviroSky.instance.Audio.ambientSFXVolumeMod = -1f;
    EnviroSky.instance.Audio.weatherSFXVolumeMod = -1f;
     
  6. kamron6

    kamron6

    Joined:
    Aug 22, 2016
    Posts:
    2
    Hi again:
    In my project I move with big velocity (like 100km/h), so it's look like clouds move very fast, too fast to be real. The easiest solution would be to increase the scale of envirosky, but my far clipping in my camera has to be small. So what I need is to slow down clouds movement resulting from player movement.

    Excuse for my english
     
  7. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    558
    Hi Vondox, I'm wondering about Fog and Aquas, if there is a away to have fog over the water? Thanks again for your amazing system and help :D

    EDIT! WOW Im dumb I just looked in the integration folder and you have already thought of it :D IT makes such a massive difference, Thank you sooooo Much! :D
     
    Last edited: Mar 20, 2018
    Vondox likes this.
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Do you already updated to latest version? In 2.0 the far clipping plane of your camera does not modify the clouds rendering. Clouds should render in a realistic scale already.

    You only could change the EnviroRaymarchClouds shader to render stationary and not using worldspace coords:

    Open the shader and search for:

    Code (CSharp):
    1.        
    2. //World Space
    3. float3 EyePosition = _WorldSpaceCameraPos;
    4. //Workaround for large scale games where player position will be resetted.
    5. //float3 EyePosition = float3(0.0,_WorldSpaceCameraPos.y, 0.0);
    6.  
     
  9. Tecknosim

    Tecknosim

    Joined:
    Feb 15, 2018
    Posts:
    9
    Figured out the clouds are rendering on other 2 camera with AddionalCamera component. But they are rendered far away which is why they are not visible with my camera's 45 Degree FOV. What could be the reason for this ? And does Additional Camera component really help with frame rate, considering it also adds the EnviroSkyRendering script on the camera ?


    Also:

    Getting an error on Build :

    Releasing render texture that is set to be RenderTexture.active! UnityEditor.HostView:OnGUI()
     
    Last edited: Mar 21, 2018
  10. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    334
    Is this a bug in the Interior GUI?


    Unity_2018-03-20_17-10-52.png
     
  11. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    334
    I guess:

    NullReferenceException: Object reference not set to an instance of an object
    EnviroInteriorEditor.OnInspectorGUI () (at Assets/Enviro - Dynamic Enviroment/Scripts/Editor/EnviroInteriorEditor.cs:66)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1253)
    UnityEngine.GUIUtility ProcessEvent(Int32, IntPtr)
     
  12. devikaworld

    devikaworld

    Joined:
    May 29, 2017
    Posts:
    4
    We've since had success with building and testing Enviro on the Windows Mixed Reality platform. The main issue involved the design pattern of the camera setup in the Mixed Reality Toolkit. When using multiple scenes, it ignored Enviro's required rendering scripts on the camera.

    If you have access to a HTC Vive you can check out our Antarctic environment using Enviro. (Other headset platforms coming)
    https://www.viveport.com/apps/a8c8b884-d556-45b7-a6ca-4a329cac9964

    Thanks.
     
  13. Dorian-Dowse

    Dorian-Dowse

    Joined:
    Jun 2, 2016
    Posts:
    94
    I'm trying to get my sun obscured by clouds. Even with 100% cloud coverage the sun is clearly visible. In the demo of heavy rain it was obscuring the sun, but mine isn't. What parameters are controlling this?
     
  14. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    203
    Yes, I use deferred rendering. Would love to get the Aquas integration working - thanks.
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Hello,
    sorry I still cannot reproduce your issues on my side. I tested with different fov values too. Could you please provide a sample project for me or we have to meet in skype to start a screenshare for example.

    Hm the error should be fixed already, what unity version you are using and do you use the cloud shadows?
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Thanks for the report. It looks like it lost one of the triggers. Could you please try to remove and re-add the interior component? I also will add a fix for that issue on next update.
     
    Gregorik likes this.
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Nice! You project looks interesting, unfortunaly I only have a rift hmd here. Do you solved the issue wth multiple scenes already?
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Thanks for your report, I will have a look into that and try to improve in next update. It could be related to skyfogging do for now you can try to tweak the sky fog settings in your weather presets. Also note that volumetric lighting with high anistropy settings can produce a kind of "sundisk" too. You could reduce the volumetric lighting effect in rain weather presets for example.
     
  19. TeemuMV

    TeemuMV

    Joined:
    Nov 10, 2017
    Posts:
    19
    Toggling Single Pass VR during runtime throws an error on 2.0.2 as well.

    Using:
    Unity 2017.3.0f3
    Enviro current ver. 2.0.2b
    OpenVR with HTC Vive

    Setup:
    0) Play.
    1) XRSettings.enabled is set to false on Start.
    2) Enable VR on runtime at will.
    3) Play in VR.
    4) Disable VR on runtime at will.
    5) Go to 2) or quit.

    Steps to reproduce:
    0) SPVR disabled in Enviro
    1) Play
    2) Enable SPVR (via inspector toggle or script)
    3) Error (in multiple places, wherever RenderTexture.vrUsage is set):
    Setting XR usage of already created render texture is not supported!
    UnityEngine.RenderTexture:set_vrUsage(VRTextureUsage)


    What I tried:

    0) Enabling SPVR in Enviro by default, but it then causes the screen to display in double unless XRSettings.enabled == true.

    1) Fixing it myself by changing the following...
    RenderTexture temp = RenderTexture.GetTemporary(...);
    if (EnviroSky.instance.singlePassVR)
    temp.vrUsage = VRTextureUsage.TwoEyes;


    ...To the below format instead.
    VRTextureUsage vrUsage = VRTextureUsage.None;

    if (EnviroSky.instance.singlePassVR)
    vrUsage = VRTextureUsage.TwoEyes;

    RenderTexture temp = RenderTexture.GetTemporary(..., a, b, c, vrUsage);


    But this requires adding additional parameters (a,b,c in above snippet) in GetTemporary() which I'm not at all sure about:

    a = RenderTextureReadWrite readWrite (I used RTRW.Default)
    b = int antialiasing (I used 1)
    c = RenderTextureMemoryless memorylessMode (I used RTM.None)
     
    Last edited: Mar 22, 2018
  20. Tecknosim

    Tecknosim

    Joined:
    Feb 15, 2018
    Posts:
    9
     
  21. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Thanks, I will have a look into that for next update, that is planned to release this weekend.
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Hm, I also tested in 5.6.5. So please send me a sample project and I will try to fix the issue asap.
    The Additional Camera component only will save minimal performance as it does not rerender the clouds coverage map. It does add the needed components and updates values. Actually the effects are all screenspace effects that needed to be rendered on each camera to work.
     
  23. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    222
    Trying to use Enviro With WebGl?

    Errors:
    Code (csharp):
    1.  
    2. Invalid pass number (5) for Graphics.Blit (Material "Hidden/EnviroBilateralBlur" with 1 passes)
    3. UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
    4. EnviroSkyRendering:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSkyRendering.cs:960)
    5.  
    6. Trying to access pass 4, but material 'Enviro/VolumeLight' subshader (0) has only 1 valid passes.
    7. UnityEngine.Material:SetPass(Int32)
    8. EnviroSkyRendering:CustomGraphicsBlitFog(RenderTexture, Material, Int32) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSkyRendering.cs:1441)
    9. EnviroSkyRendering:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSkyRendering.cs:918)
    10.  
    11. Invalid pass number (10) for Graphics.Blit (Material "(Unknown material)" with 1 passes)
    12.  
    13. Trying to access pass 4, but material 'Enviro/VolumeLight' subshader (0) has only 1 valid passes.
    14. UnityEngine.Material:SetPass(Int32)
    15. EnviroSkyRendering:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSkyRendering.cs:883)
    16.  
    17.  
    The errors go on and on 999+

    Caused by: EnviroSkyRendering.cs
    The errors seem to be for Volumetric Lighting.

    I disabled that and errors went away.

    Is that the right thing to do or am I missing something else?
     
    Last edited: Mar 22, 2018
  24. iManolo

    iManolo

    Joined:
    Apr 10, 2015
    Posts:
    7
    Hello!

    I am having troubles with the clouds speed. I have watched the video where its explain how to do this. But when I do the same: Uncheck "Use wind zone direction" and change the parameters of "Clouds time scale" or "clouds wind Strength modificator", nothing happends.

    I am working on "Enviro Profile 2.0". There is any parameter that I have to uncheck or similar?

    Thanks!!
     
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Yea, volumetric lighting isn't supportet on webgl right now. Please keep it deactived for now.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Sounds like that you modifed the profile directly and not used the EnviroSky interface. If you modify the profile you have to click on "Load from Profile" in EnviroSky inspector to see your changes. Maybe check the included basic documentation for more information!
     
  27. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    222
    Well at least WEBGL getting love as of 2017.2 it has Linear Render support. Maybe since these new devices are so powerful now we might see that in future. Thanks. getting used to using enviro in a WEBGL setting.

    New Question: When enviro is linked up to AQUAS water plane what exactly happens? I don't see any drops effecting the water. It seems mostly its for underwater fx? Anyone have anything to share on the best approach to get he most out of Eviro and AQUAS.
     
  28. iManolo

    iManolo

    Joined:
    Apr 10, 2015
    Posts:
    7
    Thanks! It was that! Clicking on "Load from Profile" all works fine! And really wonderfull wheater system! Congratulations!!!
     
    Vondox likes this.
  29. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    558
    Hi Vondox, This might not be something on your end or it could be to do with events or maybe its me (prob me).
    What it is, is i'm refreshing my light probes on hour changed... this works great unitll I change the time back using a slider or then move the slider forward, but it will continue to work when I enable use day/night cycle. This is my code;
    Code (CSharp):
    1. public void Init2()
    2.     {
    3.         if (Sky == null)        
    4.             Sky = EnviroSky.instance;
    5.      
    6.         if (Sky != null) {
    7.             Sky.OnHourPassed += () => {
    8.                 RefreshProbe ();
    9.                 Debug.Log ("Hour Passed!");
    10.             };
    11.  
    12.             if (RefreshOnStart)
    13.                 RefreshProbe ();
    14.         }
    15.     }
    16.  
    17.     public void RefreshProbe()
    18.     {
    19.         if (Probes.Length <= 0)
    20.             return;
    21.  
    22.         foreach (ReflectionProbe Probe in Probes)
    23.         {
    24.             if (Probe.isActiveAndEnabled) {
    25.                 Probe.RenderProbe ();
    26.                 Debug.Log (Probes.Length + " PROBES REFRESHED");
    27.             }
    28.         }
    29.     }
    I'm wondering if there is a event I can hook into maybe i'm using the wrong one, or I could create my own that checks if the hour it different from the hour it's cache and if so play an event.

    Really appreciate your help :D

    Thanx Jim

    edit this is my code which I use to set the hour of the day with a slider
    Code (CSharp):
    1. public virtual void EnviroTimeOfDayHour (float Value)
    2.         {
    3.             Sky.GameTime.Hours = (int)Value;
    4.  
    5.             EnviromentSliderValue [0].text = Value.ToString();
    6.         }
    edit: I think i've found a fix its works great but only will call the event when i slide the slider forward... :D

    I exposed lastHourUpdate and added this;
    Code (CSharp):
    1. public virtual void EnviroTimeOfDayHour (float Value)
    2.         {
    3.             Sky.GameTime.Hours = (int)Value;
    4. Sky.lastHourUpdate = Mathf.RoundToInt(Sky.internalHour);
    5.             EnviromentSliderValue [0].text = Value.ToString();
    6.         }
     
    Last edited: Mar 24, 2018
  30. julesd

    julesd

    Joined:
    Sep 30, 2016
    Posts:
    11
    How can I reduce the animation of the flat clouds?
    I have reduced the volume clouds to move slowly, but with the animation of the flat clouds being so much quicker, it does not look right.
     
  31. Dorian-Dowse

    Dorian-Dowse

    Joined:
    Jun 2, 2016
    Posts:
    94
    I'm wondering if it's possible to make rain be stopped by a collider? I have a shelter. The rain splashes on the roof, but then goes straight through into the interior and splashes on the floor. I can use a zone, but this stops the rain everywhere, not just in the shelter.
     
  32. DrussAxeLegend

    DrussAxeLegend

    Joined:
    May 4, 2017
    Posts:
    6
    hey, Enviro is making my player gameobject that has an unlit texture shader appear transparent, does anyone have any suggestions on how to fix this.

    Edit: I figured out how to fix it, I changed the render queue on the shader to transparent.
     
    Last edited: Mar 26, 2018
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    The AQUAS components is mainly to fix underwater rendering. There also is a guide to modify the aquas shader to support enviro fog. I don't think that aquas has a rain ripple feature, but you could add a collider to your water plane that only be used for particle collisions to stop rain to go through the water and have some effect of rain splashes/ripples on your water plane.
     
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Hm, yea the OnHourPassed event will only trigger when you time will pass forward. But you could take a look in EnviroReflections script. That one should work on both directions.
     
    llJIMBOBll likes this.
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    I will expose that setting in next update for easy changing. For now you would have to open the shader and modify it in code.

    Open the EnviroFlatCloudMap shader and search for this line:

    Code (CSharp):
    1. f += noise(uv + _Time.y * 0.0001 * timeScale * (1.0 - mul)) * mul;
    Here you can tweak the 0.0001 to modify the speed of flat clouds morphing animation.
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Hello, already answered here:

    https://forum.unity.com/threads/rel...nd-weather-system.317986/page-33#post-3320502
     
  37. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    I have been using Enviro for quite some time, it's really is beautiful. As I get more in game though I'm getting more and more strict in regards to performance. Currently running full-screen HD at around 115 fps with enviro off, and only around 45 with it on. I'm not using advanced fog or volumetric lighting, no reflection maps or particle systems, just clouds in this example. Surely I'm doing something wrong?
     
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Hi malkere, what is your clouds quality at and do you already updated to 2.0.2? Latest update includes some performance improvements.

    Edit: Do you render with Additional Camera / multiple EnviroSkyRendering components in your scene?
     
    Last edited: Mar 27, 2018
  39. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    I am running 2.0.1, updating now. I run only one EnviroSkyRendering component on a single camera. I have light shafts and everything turned off. I have it setup to change the cloud quality in-game.

    Updated. The performance does seem better. I am building right now, will try and compare numbers. The clouds look really bad though =o Quality on Ultra, see attached video. They're jittering with camera movement somehow.

    2.0.1 Low to Ultra is 40 to 70 fps in build
    2.0.2 Low to Ultra is 60 to 70 fps in build

    The jittering did not happen in build. Will try restarting Unity.. Restart didn't fix XD not a big deal if it works in build, looks really bad in Editor Play mode for some reason?

    Gahh.. I'm so confused now. Profiler is showing Enviro using minimal resources. My GPU is stuffed with 30ms of "other".. Building a developer build...
     

    Attached Files:

    Last edited: Mar 28, 2018
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Clouds looking really wrong in your video :D Should look better even on lowest. But there is a bug in current 2.0.2 that messes with the downsampling/reprojection of clouds. Maybe related to that?! I have send in 2.0.3 for review yesterday with a few fixes. So maybe wait for that update gone live or send me a private message for early access.

    Volumetric clouds are quite demanding when using the higher settings. You should add a settings menu in your game to let players change the quality. Also maybe add a option to use flat clouds only to support lower end gpus.
     
    malkere likes this.
  41. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    I had issues with setting the clouds to flat only in runtime, nothing was rendering, so I removed the in-game option. I'll try and set that up again.

    In build, looking up at the sky (frustrum culling most everything else) HD
    no clouds (clear weather) 130fps, cloudy3 low res, 110fps, ultra res 80fps.
    So as usual it's mostly my fault =] Optimization is a whole profession in its own =o=
     
    Last edited: Mar 28, 2018
  42. julesd

    julesd

    Joined:
    Sep 30, 2016
    Posts:
    11
    Just wanted to say I am very happy with this product. If you are browsing this forum and do not own Enviro, get it. It is worth every cent and more. Support is also amazing.
     
  43. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,098
    Hello Hendrik,

    if I have Enviro 2.0.2 running does it make sense to upgrade to 2.0.3?

    Could I download it and just copy the new scripts to upgrade without loosing my Settings again?

    thanks for the updates and the very good Support by the way :)
     
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    Thanks! Happy to hear that you enjoy working with enviro. :)


    Thanks! Yea, you should update, fixed a nasty bug in 2.0.3. Just make sure that you uncheck the profiles/prefabs when importing the new version and you should be fine.
     
    P_Jong likes this.
  45. Bydark

    Bydark

    Joined:
    Oct 9, 2013
    Posts:
    9
  46. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    339
    Any update on documentation updates that include multiplayer setup, im having a heck of a time with this audio source error, and probably don't have the networking set up right due to not even knowing where I should put the scripts. UNET btw
     
  47. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    @Bydark Looks like the wet camera particles are not imported properly or the material is bugging or something. When you come out of water with the water camera it puts some effects on it just like the bubbles when you go under water. I would look at the camera water effects that get added as children to your camera by Enviro and make sure the particle systems are setup properly.
     
  48. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    339
    @Bydark thats an UWS thing not Enviro, but I happen to believe I have the answer. For UWS you need to turn off anti aliasing, if you want antialiasing use post processing. If that doesnt fix it try switching to linear colorspace and differed lighting. Anti aliasing should fix it though turn off the default anti aliasing.
     
  49. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,086
    2.0.3 seems to have fixed my clouds in the editor problems. Also my flat clouds not working was because I hadn't set up flat clouds properly for all weather profiles. All is working now~

    I thought I'd mention too, I really don't like having the weather profile groups all closed whenever I go to one. Usually I'm switching between 3-4 to set their numbers comparatively to one another and I'm constantly re-opening the tabs. I just changed the public bool to true for general, fog, and clouds, but it's much easier to use that way in my opinion. Maybe just me =D

    PPS: I never noticed, and it would be a major pain to change, but environment is spelled with an nm. In setting up the Aquas shader I got an error because I spelled the folder environment XD

    AAAAND, a question. I got Aquas to use the fog input, but I'm using simple fog, while it looks like it's using the advanced fog. Is there an easy way I can get it to use simple fog?
     
    Last edited: Mar 30, 2018
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    1,867
    What error do you get? Here are the steps to setup unet with enviro:

    1. Deactivate auto assignment and don't assign player/camera in enviro sky.
    2. Create a new object in your game scene and add the enviro unet server component.
    3. Add the enviro player component to your player prefab that get spawned when you login. Here you have some options to assign the local player and also assign a camera or find the main scene camera.

    That's all for a simple setup. But it may change for a more complex scene setup with multiple scenes. Please feel free to contact me on my mail for further support. :)