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

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello,

    Clouds currently cannot be seen from above out of the box. They will be hidden by the fog at the moment. Weather effects and fog will work correctly. You may need to tweak the weather effects for rts games as they are designed to be used in first and third person views. But they are just unity particle effects and can be swapped for your own.

    Also all effects like fog lighting and so on are scene wide. If you plan to zoom out and want one area dark and rainy and another area it is clear and bright it won't work. If you plan to not zooming out that far and just hover over your terrain you could use the zone feature to have different weather on different parts of your map but you only see the weather in your current zone.
     
    blitzvb likes this.
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello,

    for the old screenspace Lightshafts you would need to open the EnviroLightShafts script and comment out this line:

    Code (CSharp):
    1. [ImageEffectOpaque]
    2.  
    3. to
    4.  
    5. //[ImageEffectOpaque]
    The Lightshafts will now show on your transparent shader, but it could still look strange in some situations where nothing "opaque" will be rendered behind your windows.

    Maybe a better way would be to disable the LightShafts and use the Volumetric Lighting effect. You now could swap your transparent shader to the EnviroTransparent shader. That one includes the needed modifications to properly show fog and volume lighting effects.
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    The immersive way would be to setup the particle collisions. That way it will stop raining into your houses but you see rain when looking out.

    You can find the particle systems used in enviro here:
    upload_2017-12-12_19-31-38.png

    Now check the „Collision Tab“ from „Particle System" component.
    upload_2017-12-12_19-32-46.png

    You maybe also want to create a new layer for all your objects that should stop particles and assign this layer to your roofes, terrain and so on. (Please note particles only collide with collider components! You maybe need to add these yourself and set them to static).

    The „Max Collision Shapes“ are very important too! Particles can only collide with that amount of colliders in the choosen „Collides With“ layers (Only assign your newly created layer). So you maybe need to raise this value.

    The "Voxel Size" should be used to fine tune. Try a setting about 0.75 - 1.

    Oh one note, I will update the particle effects in next update, so you want to go through each particle effect and set your layer again. But that should be done in a few minutes.

    And here is a link to the unity documentation:
    https://docs.unity3d.com/Manual/PartSysCollisionModule.html
     
  4. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @Vondox - thankyou for the quick reply and solution, much appreciated! I will give it a go.
     
  5. graphanite

    graphanite

    Joined:
    Sep 6, 2012
    Posts:
    6
    Hi Vondox,

    Does the new update include a shader variable to prevent the color of transparent particles getting overwritten by EnviroFog (due to the Depth Buffer)?

    In the past, I had to remove this line (" //[ImageEffectOpaque]") from the EnviroFog.cs script, but it is not an ideal solution as this breaks fog affecting AQUAS.

    Thanks,
    Martin
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello,

    yes that is implemented since 2.0! Here are step by step guides for AQUAS and R.A.M. There are also particle and a transparent shader included that will work with fog and volume lighting.

    R.A.M wih Enviro
    AQUAS with Enviro
     
  7. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    AWESOME!!! Quick question regarding the AQUAS one. I noticed that in the Gaia integration, there is an AQUAS option under Enviro. I followed this guide manually with one test project, but in the latest one I just did the Gaia option under your GX. Is it pretty much doing the same thing? I haven't gone through and started configuring anything beyond the base install through Gaia.

    Love that there is a guide for R.A.M. I haven't done anything more than import it and watch the videos at this point, but I'm looking forward to seeing what I can do with @NatureManufacture's R.A.M. and Advanced Foliage Pack. Would love to have option for droplets when the raindrops hit the water planes directly around the player. Not that my system could probably handle it though. rofl

    Great work as always @Vondox!
     
  8. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hey Vondox,

    I still have a huge difference between Fullscreen pc standalone and unity Editor.

    First of all I turned off the Checkbox "Global reflections" in the Scene in EnviroSky Profile because of my strange colored reflection Problems, which are solved then.

    But in the log each few Frames I get this warning:
    To have darker nights I set "Ambient intensity" to 0.3.
    Seemed to work, in unity Editor it is very dark now at night (perfect).

    But when I make a Fullscreen build, it is very light at night still.

    Any idea how I get dark nights in Fullscreen build too and what causes These differences?
    The reflection Color Problems I had before also appeared only in Fullscreen build mode...

    Thanks!
     
  9. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    PS: After Setting all lighting Settings like in the demo Scene of enviro it Looks better now.
    I will have to test more but it seems to work, thanks! :)
     
  10. Discord

    Discord

    Joined:
    Mar 19, 2009
    Posts:
    1,008
    I'm having an issue with my Enviro Sky Rendering component, and I think it might be affecting the clouds.



    Something about them just seems a bit off.

     
  11. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! Im using a third person view.. with 1 camera.. but its splitscreen coop playing.. so its 2 camera 2 players the screen split up... how do I get the second main camera to render enviro?
     
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Thanks for reporting! Please remove th Enviro Reflection component from the "Global Reflection Probe" on EnviroSky object. That one isn't needed anymore and I have forgotten to remove it. :/

    Will be fixed in 2.0.2 of course.
     
    KRGraphics likes this.
  13. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm haven't seen that one before! What unity version and rendering api you are using?
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    You can add the "Addional Camera" component to your second camera to render enviro effects on more than one camera. (Component -> Enviro -> Addional Camera).
     
    mattis89 likes this.
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    You still need to modfy AQUAS to work with fog and volume lighting. I am already in contact with Chris and maybe he will include modified shaders for enviro in AQUAS out of the box.

    Oh also talked with Bart and R.A.M will include an optional package with modified shaders for enviro in next update out of the box. ;)
     
    treshold likes this.
  16. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Sounds awesome! I actually figured out it wasn't doing the shader changes for AQUAS earlier today. I ended up copying the enviro files I made for my old test project into the current one and BAM!, I had fog on my water... heheh Loving Enviro so far. Looking forward to see where you take it from here.. Any chance for specialized storm modules being made available? Tornados? Hurricanes? Sandstorms? I realize not everyone would need these but might make for some cool Enviro add-on modules..
     
    Freznosis likes this.
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Thanks for the heads up... this will be helpful for those using their own probes in scene. Speaking of lighting, been meaning to ask, is there way I can get the radiance from the skybox mode to affect the scene? I am using the enviro skybox material and I want to emulate an HDR cubemap with this for some of my scenes. In two of my levels, I am using a custom cubemap and the only drawback is I can't remove the sun from it unless I paint it out. And also, the sun spot is extremely bright in the cubemap, FP32Float. The closest I can get to this is changing the ambient mode to something other than skybox (which doesn't do anything) and I am trying to find out how to change the colour of the sky so below the horizon is pitch black...
     
  18. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    I sent a PM to @Vondox, but thought I would post my question here as well. What are the optimal settings in Enviro for it to work in VR?
     
  19. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    I have a about Directional lights. I hope you don't mind me asking in this thread. How do I stop the light from passing through walls of my buildings?
     
  20. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    enable shadows for the light
     
  21. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    @rasto61 I am only using the Direct Light that comes with Enviro and it has soft shadows enabled - I was able to find some information about the fact my walls were only quads so I made cube based walls and that blocks the light.
     
  22. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    well yes, if your walls are quads pointing in and youre not using a 2sided shader then theres nothing to cast the shadows.
    not sure how much light passing through you meant though. if all the light is passing in then nothing was casting shadows, if it was just a small leak around the edges then you need either thicker walls or play around with the shadow bias
     
    ibyte and Vondox like this.
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    The skybox ambient mode should work just fine! (Just tested.) One note in current version you still have to control the intensity in unity lighting tab! I will bind that to enviro inspector in next update. I also already added the black ground option for skybox on my side. Will both be included in 2.0.2.
     
  24. Discord

    Discord

    Joined:
    Mar 19, 2009
    Posts:
    1,008
    Oh no, not the answer I was hoping to hear haha. I'm on Unity 5.6.3p1, with deferred rendering.
     
  25. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Sweet!!
     
  26. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi Sir, First Thank you for an Amazing Sky System!
    I have a problem with the Sun has some glowing or bubbling thing going on
    This is how it looks in the editor


    And this is on build


    My Setup:
    Windows 10, Deferred DX11 Only, Unity 2017.2.0 p4, HDR, 1 Camera Setup, Latest Envrio from Asset Store

    Thank you very much! :D

    edit! Apologize, Seems to be related to Bloom Image Effect from Post Processing
     
    Last edited: Dec 15, 2017
    ohbado and KRGraphics like this.
  27. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    Did you figure out correct bloom settings to fix this?
     
  28. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    I found that if I enable simple fog then this fixed it, but cudn't fix otherwise :/
     
  29. Discord

    Discord

    Joined:
    Mar 19, 2009
    Posts:
    1,008
    My issue was fixed after I reimported the package again.
     
    Vondox likes this.
  30. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm okay, do you use DX9, DX11 or OpenGL?
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm I have two more reports about same problems. Also only happens in builds with bloom enabled in post processing stack. Do you have tonemapping enabled in your post effect profile?

    Somebody maybe tested with another bloom solution already? The simple fog will workaroud that issue, just because it will override the bright sun with plain colored fog. Maybe we need to tweak the scattering values in enviro to workaround that issue...
     
    llJIMBOBll likes this.
  32. Deleted User

    Deleted User

    Guest

    Hi Vondox,

    I tried building for windows but I got the following errors:

    Shader error in 'Enviro/FlatCloudMap': invalid input semantic 'POSITION': Legal indices are in [1,15] invalid ps_3_0 input semantic 'POSITION' at line 32 (on d3d9)

    Error building Player: Shader error in 'Enviro/FlatCloudMap': invalid input semantic 'POSITION': Legal indices are in [1,15] invalid ps_3_0 input semantic 'POSITION' at line 32 (on d3d9)

    Compiling Fragment program
    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
     
  33. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    I am using Beautify's Bloom and I can't reproduce this bug.
     
    llJIMBOBll and Vondox like this.
  34. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, already fixed, please update enviro. :)
     
  35. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    I do have Filmic (ACES) tonemapper from Post Processing, I will try using Beautify's Bloom as RonnyDance said :D

    Thanx Man :D
     
  36. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Awesome! Thank you works perfect! IMO looks a lot better too :D
     
    Vondox likes this.
  37. Deleted User

    Deleted User

    Guest

    Hi Vondox, Enviro is already updated but the bug still exists
     
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    That is strange, looks like that the shader doesn't got updated! Please contact me on my support mail (vondox[at]live.de) and send me that shader file, just to check. I send you the correct latest file then.
     
  39. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Where is the Enviro Skybox to be found, so that I can access it using other assets? The lighting inspector shows this:

    skybox.png

    But I can't find it among the assets.

    Edit: I just saw in code that you create the material dynamically. Honestly I would prefer if you create the material as asset and use that one instead of doing that kind of stuff dynamically.
     
    Last edited: Dec 19, 2017
  40. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    What's the proper way to remove sun flare from the moon? I've seen there's On Day Actions and On Night Actions, but I rather think it's better to know if the object is the Sun or the Moon that the flare derives from. I need it in combination with Lighting Box 2.

    The scene looks currently like this which is of course wrong:

    enviromoon.jpg
    The dev sait to remove the flare, but I need the flare of course when the Sun shows up.

    Also, does Enviro use lens flares? I've seen there's an asset in the demo folder, but it doesn't seem to be used.
     
    Last edited: Dec 19, 2017
  41. Artur7

    Artur7

    Joined:
    Nov 30, 2015
    Posts:
    34
    Hello. I have problem like this (on iOS):

    IMG_0271.jpg

    What to do with it? I tried changing from Metal to OpenGL, but nothing helps.
     
  42. KarlCrosby

    KarlCrosby

    Joined:
    May 16, 2017
    Posts:
    1
    Hi there- first of all, amazing plugin. I am using it for VR presentations- the scripts on the camera seem to make the Steam VR teleportation line renderer not work. Sorry if this was covered- I didn't get through all 30 pages of threads
     
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I love your clouds... I'm still trying to get my clouds looking this good.
     
  44. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    using HX Volumetric lighting, has a nice haze to it
     
    BackwoodsGaming, Vondox and LukeDawn like this.
  45. DarkxxCrow

    DarkxxCrow

    Joined:
    Nov 16, 2013
    Posts:
    5
    Hello, I would like to know if there is something I should do to fix my problem. I use Enviro & CTS and for some reason, spotlights do not illuminate the ground anymore (they do illuminate trees and grass meshes). I tried with enviro alone and it works, but so it does with CTS alone. CTS support told me to ask here, so here I am. Please help me, it looks really wrong.
     
  46. CupariKun

    CupariKun

    Joined:
    Sep 1, 2014
    Posts:
    2
    cant figure out to how to stop Snowing and Raining in my House....please Help !!?

    thank you for your great work :)
     
    Rowlan likes this.
  47. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Just search this thread and you'll find the solution. Search page 29 for the word collider
     
    Vondox likes this.
  48. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    Just setup a trigger on each entry and exit to the house and add an Enviro Interior Script to it and you can set in that trigger how you want the ambient weather audio and effects of fog and weather to operate inside your building.

    You can also change the direct and ambient light settings as well.

    You don't need to worry about colliders anymore.

    M
     
  49. SquadraCorse

    SquadraCorse

    Joined:
    May 28, 2014
    Posts:
    13
    I'm using Beautify for those FX and IIRC, I just set the 'Sun' in Beautify to the 'Sun' nested under Enviro (instead of the Direct Light). Beautify only needs a transform - not an actual light. I hope that's all correct - I'm at work so am going from memory.
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    All materials that get modified in runtime are created in runtime. That was a feature request from some users using version control for their projects.

    But you still can have the skybox material as an asset in your project!

    1. Create a new material and assign the Enviro Skybox or SkyboxFlatClouds shader.
    2. Assign the stars and optional the galaxy cubemap in your new material.
    3. Set "Skybox Mode" in "Sky" category to "Custom Skybox" and assign your material in the "Custom Skybox Material" field.