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

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

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

  1. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    193
    Anyone got 2.0 to work nicely with hydroform ?
    It seems the fog is not fully shut off even if distance and height fog are disabled in the profile.
    It's only rendering the ocean when geometry is underneath it.
    I'll try creating a huge plane underneath the whole level, but since there's an aqua integration and fog was just worked on also making it work correctly with hydro would be nice!
    Great work on the rest. Looks even better now.

     
  2. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Seems like your pipeline is missing some cruicial post-effects, like Eye Adaptation and Tonemapping. If Enviro is working in HDR mode (which now does by default) - you'll need those post-effects.
     
    Rowlan likes this.
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Thanks, I'll try that. All I did in the screenshot was creating a new project, import Enviro and start the example scene.

    However postprocessing won't change the fact that the moon is white.
     
  4. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Oh-ho, I assure you it will. Your camera is being rendered either in HDR without tonemapping, or in LDR, but the moon is too bright to be correctly displayed in an LDR range. It falls beyond 0-1 range, appearing completely white. That's why you need post-processing, to tone HDR image to LDR. Just try it out, I guarantee it'll be okay once you set up everything correctly.
     
    Rowlan likes this.
  5. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    So far I really like the 2.0 update! Clouds are way, way faster now and it's all without multiple cameras! Movement of clouds is now incredibly smooth. Flat clouds are just awesome! Unfortunately, they are quite expensive at 4K texture resoltuion, but they still look good on 512 texture resolution.

    Volumetric lighting is good, too, but I have one problem/suggestion to it. Seems like there is no distance attenuation to directional light, meaning that the same amount of volumetric lighting will appear on any distance, which is not really correct. It'll be just perfect if there would be some kind of distance attenuation, like with fog, so that the more visible lighting would appear the farther you are from the observing point.

    This way we could actually get an accurate atmospheric scattering solution, where fog would simulate rayleigh scattering from the sky, and volumetric scattering would simulate mie scattering from the sun. We just pretty much need only that distance attenuation.

    But, yeah, 2.0 update. Well done! It's rather big in terms of improvements.
     
    Vondox likes this.
  6. parandham03

    parandham03

    Joined:
    May 2, 2012
    Posts:
    174
    In my game I am using multiple cameras(like side mirrors of a car). So I need to render the environment on more than one camera.
    In Enviro - Sky and Weather package I can able to assign only one camera. How do I assign multiple cameras as player camera?
     
  7. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    Quick Question, i have both Enviro Desktop and Mobile does Mobile have the same UNET integration as Desktop? if not would it be a matter of simply 'copying' over the scripts or is there more to it?

    Essentially i have a second project thats being built ground up for Mobile's, its an online game so would like to know if Enviro's Mobile version can support UNET like Desktop does.

    Thanks,
    -J
     
  8. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    just downloaded the update, seeing this using Unity 2017.2:
    enviro_new.PNG
     
  9. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    Errors look like this:
    environ_script_error.PNG
     
  10. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    replaced VR.VRSettings with XR.XRSettings in two files, demo scene seems to be running fine. Guess its OK, love those clouds.
     
    P_Jong likes this.
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Are on gamma color space? If yes you need to tweak moon and star intensity to get more natural look or switch to linear as the defaults are setup to use in linear color space.

    upload_2017-11-16_16-9-57.png
     
    P_Jong and Rowlan like this.
  12. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Yes, thank you. I was on gamma color space. Changed it to linear.
     
    Vondox likes this.
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Oh, sorry I don't have Hydroform. I will contact the Hydroform dev later to get more information and have a look why it breaks.

    I would have suspected that it won't render any fog like Aquas and would need to add fog rendering in shader by yourself. I will post a guide to enable fog for Aquas later here.

    Oh PlayWay and UWS should work out of the box as they rendering to depth.
     
  14. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    One more question: My rain and snow are purple. The demo scene in Enviro is fine. But when I import Enviro in my own project, drag the EnviroSky prefab into the scene, assign player and camera, hit play and change the weather, I see this error in the console:
    Code (csharp):
    1.  
    2. Shader error in 'Enviro/Particles/WeatherParticles': failed to open source file: '../../Resources/Shaders/Core/EnviroFogCore.cginc' at line 26 (on d3d11)
    3.  
    4. Compiling Vertex program with FOG_EXP SOFTPARTICLES_ON
    5. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME
    6.  
    Might be related to the purple rain and snow. Any pointers what could be happening?
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Thanks! To be true I had not a lot of time to work on flat clouds as I wanted to release enviro 2.0 before black friday sale. So expect improvements in next update. :)

    I also will have a look in directional volume light distance attenuation you mentioned.
     
    SirTwistedStorm and P_Jong like this.
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Please delete old enviro folder before importing 2.0. Oh and don't forget to backup your old profile. ;)
     
    Rowlan likes this.
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    I will contact you with a solution for multiple camera output later here! I already had that working for 1.9.2 but it needs a few modifications.
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Next update of mobile version will have a UNet Integration and also the new inspector, profile system and so on. Currently you can't copy the desktop integration as versions are very different.
     
    jagatai33 likes this.
  19. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Okay cool, looks like that the unity updater haven't worked as intended. I tested enviro in a fresh Unity 2017.2 and 2017.3B project and it was working fine for me.
     
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Yeah, well, that was stupid :D Thanks, it works now :)
     
  21. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    Have updated to version 2.0.0. When trying to do a build the build fails with 2 errors... both similar.

    1) Shader Error in "Enviro/FlatCloud Map" : invalid input semantic 'POSITION' : Legal indecis are in [1,15] invalid ps_3_0 input semantic 'POSITION' at line 32 )on d3d9)

    Seems to work in editor but fails the build. I am working in 2017.1 and deleted the old enviro folder before adding the new one.

    Any options?

    M
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Oh! Thanks for reporting. I don't understand why, but I just have rewritten that line with exact same code and it looks like I don't get that error anymore.

    Strange, hope that it will fix your issue too! Here is a hotfix:
     

    Attached Files:

  23. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Feature request: When you integrate with Aquas, you have to click component -> enviro -> integration -> aquas integration. Would it be possible that, when you click that integration menu button, a popup shows up that the water plane needs to be dragged to the integration script?
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Sure, I will have a look into and improve that. :)
     
  25. danteswap

    danteswap

    Joined:
    Oct 27, 2013
    Posts:
    164
    Hey I Need Your Help And Suggestion Because I want To Buy The Mobile Version ,I Am Working On A Mobile project and I want to Know About The Performance Cost Of The Enviro Mobile , I Mean If We Got A Scene then Whats The Performance Of scene With Desktop version And Mobile Version I mean Whats The Differences and cons Etc How Well It Performs On Mobile Device . So Can You Provide Some Videos and Screenshot Of Mobile Version In Action . I really need a good weather and dynamic day night Solution For My Project . SO can You Help Me .
     
  26. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    I didn't auto update, probably would have worked if I had let it.
     
  27. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    Hi there...

    OK started a new project to test and put in Gaia, Enviro and a couple of other bits.

    Now I have a Pink sky when playing the scene, although the scene view and game view are fine in editor and a number of errors in the console window. (The first error, I know about and can fix easily)




    Regards

    M
     
    Last edited: Nov 16, 2017
  28. xercool

    xercool

    Joined:
    Sep 5, 2017
    Posts:
    90
    Same issue there. Not working.

    Hotfix is not working too.


    Update:

    Fixed #pragma target 3.0 to #pragram target 4.0 and it works now!

    SV_POSITION is not working on shader 3.0 (d3d9) as I guess...
     
    Last edited: Nov 17, 2017
  29. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    Hi

    I have a problem with the shadows of the clouds in the latest version. In the previous version I marked the option "cast shadows" of the various layers and there was no problem.

    With this new version, this is how the shadows look (with different values on "shadow intensity")

    shadowclouds2.jpg

    shadowclouds.png
     
  30. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Looks like the asset store version 2 doesn't have the fix for the size of the reflection probe.Is that in another coming release?

    Screenshot-2017-11-17_08-53-07.png
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Thanks for reporting! Looks like a problem with the semi-transparent shadow dithering. What Unity Version you tested and what are your camera clipping planes at? However I will have a look into that and improve shadows in next update that will be released in the next days.
     
    Last edited: Nov 17, 2017
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    I have added a new setting to modify the scale of the included reflection probe. Do you already tested if that solves your issue?

    upload_2017-11-17_19-58-54.png
     
  33. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Any idea why my Aquas water is throughout blue? I performed the integration step and dragged the water plane over to the enviro aquas integration script. Enviro weather is set to storm, looks like this:

    aquas.jpg
     
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    You need to do a small edit in aquas shader to properly show fog and volume lights. I will create a pdf guide now to lead you guys through that. :)
     
    P_Jong and Rowlan like this.
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Here a short guide to add enviro fog support to AQUAS 1.4.2 shaders:

    Download

    I hope it will be helpfull, otherwise feel free to contact me!
     
    BackwoodsGaming likes this.
  36. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Aha! Sure enough, that works perfect. I must have missed that setting the first time through. Thanks!
     
  37. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    @Vondox so with the 2.0 official, can we use just it from now to the future?
    For example, I've downloaded and I'm using the beta package. Is this older than the one you uploaded and published on asset store?


    Thanks in advance.
     
  38. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Here are some issues I ran into when updating from 1.9.1 to 2.0

    Bug, with fix:
    In my game I assign the Player and PlayerCamera manually at start. I have "Assign at runtime" checked. The EnviroSky::Update() function overwrites these values. I added a small change to line 1300 to check both Player and PlayerCamera for null before calling FindGameObjectWithTag().

    Bug:
    EnviroSky::UpdateAudioSource() sets the season to spring. I'm guessing this was test code that was left in? It's not in 1.9.0

    Issue:
    EnviroSkyRendering::Awake() requires EnviroSky.instance to exist before running (null exception). I create my player with the camera and Enviro Sky Rendering and LightShafts scripts attached so I can order them correctly in the post-process stack. I create the player from a prefab at application launch before loading the scene containing EnviroSky. I worked around this easily by not creating the player until the scene is loaded, but it's something to be aware of.

    The new snow fixed the flickering I was experiencing with TextMeshPro text in world space. Yay!
     
    Vondox likes this.
  39. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Bug?
    ChangeCloudQuality() changes the old quality value instead of the new value. Update() then reverts back to the original value. I noticed in the editor code you're changing the 'new' cloudsQuality value directly, not using the function. I fixed this by adding this line to the bottom of the function:

    Code (CSharp):
    1. cloudsSettings.cloudsQuality = q;
     
    Vondox likes this.
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Thanks for reporting these issues. I will have a look and fix. I already planned to release an update in the next days. :)
     
  41. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    Would it be possible to restructure the code to be purely component based in the future? We have our own weather system, biome system, rendering effects that need to set values on the sky. The current implementation makes this difficult. We are forced to change large portions of EnviroSky.cs. It makes bringing in the latest and greatest changes not a trivial process!
     
    Exeneva likes this.
  42. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Thanks, it works now!

    Would it be possible to use #ifdef options in the shader? Because it would be super awesome if @dogmachris could add an enviro compatibility, so that one can skip this code change which will break with every update.

    Enviro, Aquas, Microsplat and Vegetation Studio are a very good combination.

    aquas-enviro.jpg
     
    Last edited: Nov 18, 2017
  43. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    I seem to be experiencing strange glitches after upgrading. The sky flickers in with black parts at times, the lightshafts also flicker on and off. glitch.png
     
  44. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    I did a quick glance through the last few pages, but didn't see this so hopefully I didn't miss it. I just did a fresh install of Enviro 2.0 into a new scene and my sky in play mode is showing up as the pink unity material error color. Any idea what is missing?

    And I just spotted the description from Moria... oops. I downloaded the hotfix, but it didn't seem to fix the issue.
     

    Attached Files:

  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Is your project set to dx9? Currently not supported, but I will have a look into that.
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hm please send me mail to vondox@live.de with further information about your project. Unity Version, other camera components, screenshot of your camera setting and how do you assign your player and camera.
     
  47. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    I figured it out. I am testing on a mac so it looks like it is an issue with metal. I removed metal from the graphics apis and it works.
     
  48. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Oh no -- this is problem if it doesn't work with Metal....that's a huge (and growing) restriction for both Mac and iOS builds... Vondox, are you able to investigate that?
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Yea, I will investigate and fix that in next update.
     
    gecko likes this.
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Could someone please upload a screenshot with console errors on metal? It should not be a big problem as it was working in an older beta version of enviro 2.0 already. Just need some hint where to look as I don't have a mac here for testing.