Search Unity

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

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

  1. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Does the mesh have to be as big as your entire water plane? If you add it to your water mesh, how would it below the water level? lol The mesh IS the water level.

    Beautiful!!
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Create a new gameObject with a mesh filter and renderer. Then assign the water mesh in mesh filter component, add material to mesh renderer. Then scale and place slightly under your water plane.
     
    Teila likes this.
  3. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Hi,

    With:
    withDepth.png

    Without:
    withoutDepth.png
    Clear difference. Since 1.8.0 i have no issues with fog anymore. Also the undewater view is fine now.
     
    Vondox likes this.
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Awesome, looks great :)
     
  5. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Thank You!! :)

    Yes, but still a lot of problems to solve ;) and a lot to learn!

    but i am having fun :)
     
    malkere likes this.
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Update

    I will upload 1.8.1 this weekend. Here are a few screenshots showing improved and fixed hdr rendering and improved multi layer clouds. Will add a complete changelog later.

    cloudyday.png
    foggy2.png
    night.png
    storm.png
    sunrise.png
     
  7. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Having a weird issue: Some weather prefabs start playing at runtime, but others don't. I've compared the prefabs and the particle effects within each, and can't see any differences. Possibly this error is a clue? I looked at that line of the script but am not sure what it refers to that I could address....

    NullReferenceException: Object reference not set to an instance of an object
    EnviroSky.GetEmissionRate (UnityEngine.ParticleSystem system) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:2433)
    EnviroSky.UpdateEffectSystems (.EnviroWeatherPrefab id, Boolean withTransition) (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:2408)
    EnviroSky.UpdateWeather () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:2474)
    EnviroSky.Update () (at Assets/Enviro - Dynamic Enviroment/Scripts/EnviroSky.cs:1394)
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Check all your weather prefabs particle system lists. Looks like there is a missing reference. I will add a fix for this to not break and give debug message in 1.8.1.
     
  9. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Aha! Yes, that was the problem -- and since the missing ref was on the preceeding weather prefab in the list, I didn't even look at it, was only looking at the ones that played when they shouldn't... Thanks!
     
  10. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Looks like there's stars shining through the dark side of the moon in this shot.
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Oh you are right, seems like the extinction isn't strong enough, I will take a look. Thanks!
     
  12. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Not sure if this has been fixed but I would always see the stars shining through the clouds, which made it look as if the clouds were behind the stars. :) Gorgeous pictures, btw.
     
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Really? Should be fixed since 1.8.0.
     
  14. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    My stars are always on too, visible and moving behind the day sky even at noon.

    My light shafts are causing problems as well, especially if I'm in gamma color mode. Any ideas?
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Modify the stars intensity curve. The default setup wasn't good in 1.8.0. What issues you get in gamma space with lightshafts?

    upload_2017-6-3_16-36-5.png

    Edit:
    Okay, I getting issues with lightshafts and gamma colorspace + deativated HDR on camera too now, will search for fix!
     

    Attached Files:

    Last edited: Jun 3, 2017
  16. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Is the stars curve not a 24 day? I have it shaped like a bowl at zero from 0.3 to 0.8, but I still get stars at 12, 13, and then lesser at 14 hours, then again, as expected between 22 and 05 hours.

    For the light shafts, the do not work at all on high quality in Gamma color. If I turn the "Use Depth Texture" on the sky goes pure white. If I turn the quality to normal or low and they are both on they work. But if I turn off only the sun shafts the sky goes white when the sun is on the screen. If I turn both sun and moon shafts off, the sky goes white if neither the sun nor the moon are on the screen.

    In other words if they are both on they work in Normal or Low quality mode, or if only the moon shafts are on.
    Also in both cases the sun shafts are fully visible even when the sun has set and is underneath the terrain.

    In another project it seem to work much better =[ only blips white sometimes instead of going flat white =o= it's past midnight again though, will try again in the morning.
     
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    No, it is based on sun position. Left Side is night, right side is day. ~0.5 is when sun hits the horizon. So you should form a curve like mine. I have fixed lightshafts in gamma space on my side. Will be included in 1.8.1.
     
    malkere likes this.
  18. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    @Vondox right on. Thanks for looking at it.
     
  19. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    @Vondox Hey mate, will you also be pushing the tonemapping for nights that I requested on 181? To get the bluish hue and fog scattering at night ?
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Yea, already implemented ;)
     
    evilangel89 likes this.
  21. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Sweet!
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hey guys, I have send 1.8.1 to store today. Also updated the WebGL preview:

    Enviro WebGL 1.8.1

    Changelog:
    • Added option for HDR Rendering. Fixed a few problems with hdr.
    • Added optional background rendering feature.
    • Added Curves for Sky Luminance and Color Power based on sun position. This will allow for more bright blueish nights if wished.
    • Added OnZoneChanged event.
    • Added curve for changing moon glow based on sun position.
    • Added option to Zones to not switch back to Default zone on exit. This is usefull when using overlapping zones only.
    • Added a simple shader to render depth only to fix fog issues with many water assets.
    • Fixed stars still showing behind moon and in glow area.
    • Fixed legacy cloud mode.
    • Fixed a few issues that could lead to errors if weather have no proper setup.
    • Fixed clouds not rendering when changeing sky layer.
    • Fixed and improved clouds thunder effect.
    • Tweaked stars rendering.
    • Renamed Effect Camera to Satellite Camera.
     
  23. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Hey, does this address that issue I reported with stars rotation or is that (hopefully) to come still?
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I am currently working on the new documentation. The most important things should be included and updated for 1.8.1.

    I will add the missing components and documentation for 3rd party integrations in the next days too.

    Documentation for 1.8.1
     
    Funkeys and evilangel89 like this.
  25. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Waiting for the Integration documentation :) Cheers!
     
    Vondox likes this.
  26. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Hi,
    thought i had my project set up for linear color space, but it was on gamma. Switched back to linear, and now get this strange color striping effect around the lights at night. I know this effect has a name but i cant remember right now. For the sun on sunrise it is covering the whole skybox.
    Tried to switch off all image effects already, used forward, deferred nothing helped. But it´s just on linear.
    Is this just a matter of lighting parameter´s ?
     
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I think you talk about color banding? I will send you a link for 1.8.1 to test, quite a few things changed.
     
  28. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Yes may be :) sorry! It´s like simulating 16 mio. colors with 256 colors. Or like the sky in old Amiga games :)

    Ah, may be that´s important! I am using the new Vulcan renderer since a view days.
     
    Last edited: Jun 7, 2017
  29. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Color banding is still there, have to play with the shader variables the next days.
    But the other problem with sun, moon and clouds is gone. The new clouds look great!
    Also the HDR feature is really nice and makes the color banding a bit better.
    FPS improved and some smaller problems are gone too.
     
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Okay cool :) Yea try to increase the noise intensity. Also maybe try to reorder the enviro effects and other image effects. If you still see strong banding send me an private message with screenshots of issue and your camera components please.
     
  31. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Hello. Do you have a feature that can change the value of directional light depending on weather? I didn't find it. It may be extremely useful. For example, you can use it to turn down lighting once a storm begins. Using cloud shadows proved that they are very costly to render and they don't look so great because their shadows are clean and sharp, which is unrealistic.

    Speaking of clouds shadows, Unity 2017.1 will have support for custom processed render textures. You can use them to create a render texture of clouds (corresponding to the world or not), apply cutoff and set it to directional light's mask to get free shadows, and it will be much faster. Do you have any plans for that?
     
    Vondox and one_one like this.
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    You can currently only change the light color by tweaking the Weather Light Mod gradient. Take a look into new documentation.

    Haven't tested unity 2017 yet, but that sound like a really cool feature. Will check that out and try to improve cloud shadows like you suggested.
     
    Kolyasisan likes this.
  33. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Sometimes the light gets so dark that it's barely noticable. The light at 0.01 color intensity is still a light. Can you make some kind of a threshold so the light would disable if below that threshold? This will greatly save resources as you don't need to render shadows (which will be very dim) and you don't need to shade anything (if using forward renderer). Please consider this feature.
     
    Last edited: Jun 8, 2017
    Vondox likes this.
  34. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Ok, works great :)
    Reordering the image effects did it alone. I just need to have the enviro effects at first.
    Tried now with the full set of Unity´s post processing stack applied and everything looks fine with an performance gain of 25 fps that´s about 35%.
    Tonemapping brings back the banding, well having it applied very last it produces nice results at daytime but not at night.
     
  35. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Vondox with Megasplat integration what would your weather system be able to control? Puddle rain drops? size of puddles? amount of river flow? snow coverage? ice?

    I was thinking that if you were ever able to add support for Voxeland with Megasplat it would be control of Erosion since Voxeland can be made to deform in interesting ways -and a storm would provide a great effect. @Wright
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi,

    the MegaSplat component currently synchronize wetness, puddles and snow only.

    I haven't got much time to work on the third party integrations lately. I will improve these in
    next updates.

    About Voxeland: Haven't checked that out yet, sorry, but will later.
     
  37. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    We just started having a weird issue: The sky is completely white, and I think it's overexposed. If I assign a Cloud prefab to weather, I can see the clouds start to form against the white, though they quickly fade to white also. However, the Enviro demo scene still works fine. Everything is hooked up correctly in the game scene (Player and Main Camera, that's about all, right?) I also deleted the Enviro 1.8 prefab and the Enviro scripts from the Main camera, but still, same thing at runtime. I also disabled all fog, doesn't solve it. Can you guess what I might be missing, or how we might have caused this inadvertently?

    No errors in console.

    thanks
    Dave
     
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi Dave,

    please check your sky tonemapping settings. Maybe also try to create a new envirosky prefab from working demo scene and use this in your main scene.
     
    Last edited: Jun 10, 2017
  39. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    It's not tonemapping -- it looks like the Enviro skybox simply isn't rendering. If I change the background color on the Main Camera to red, that becomes more evident. See screenshots.

    I also copied the Enviro 1.8 prefab and the Enviro Rendering from the demo scene to my scene, assigned Player and Main Camera. No help.

    main camera.png sky camera.png
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Maybe check the enviro components on your main camera and change the order.
     
  41. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Finally just deleted Enviro and reimported, and now it works -- whew!
     
  42. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I may have missed something setting this asset up but even in the demo the clouds move in the direction with the mouse.. is there a fix for this? Using Unity 5.6.1p2
    The sky is completely black until in play mode.
     
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    I am not sure why demo scene isn't working for you. Please try to reimport enviro and override the prefabs.
    The sky is only black in edit mode when using "AssignInRuntime". Also try to uncheck this and assign your player and camera by yourself.
     
  44. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Can`t work with "Rendering Path : Deferred"
    How to fix this?
    Unity 5.6.1p2
    Enviro Version: 1.8.1
    env.jpg
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi, two solutions for the moment:

    Make sure to enable the HDR option in EnviroSky and use a tonemapping image effect on your camera.
    Or open EnviroSky.cs and searh for this line:
    Code (CSharp):
    1. PlayerCamera.hdr = HDR;
    and change to:
    Code (CSharp):
    1. PlayerCamera.hdr = true;
     
  46. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Vondox ok I guess it was required to have the skybox, flares, fog etc toggled in the scene view so I see it in edit mode.. However the moon, clouds etc rotate in the background as I move the mouse in playmode. I've sent you a video to your email.
     
  47. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Good looking asset here. Is it possible to add moons to the system, if your world has more than one?
     
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,421
    Hi Whippets,

    yea you can add additional moons or planets :)

    Greetings,
    Hendrik
     
    Whippets and Teila like this.
  49. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Does Enviro use SSMS or is there any plan to add it? The blurring casued by mist and fog is a really good effect.
     
  50. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Just add it by yourself like I did? ;)
    But to your question: No SSMS does not come with Enviro. That's why I also just added it by myself. It's working great with Enviros Fog.

    Cheers
    Ronny
     
    Last edited: Jun 20, 2017
    Vondox and Whippets like this.