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

    monkyfizt

    Joined:
    Jan 16, 2017
    Posts:
    14
    thanks a lot. I just found the Solution myself :)
     
    Vondox likes this.
  2. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Ok, I've got another bug, watch the clouds. (Video enclosed, sorry for the low frames per second) They're all glitchy, but this only happens when my camera far clipping plane is more than 1000.
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm, I don't see a video, but for me clouds working good for higher far clipping plane too. Anyway I have two questions to get an idea what could happening: Does this happen with a freshly created profile and is this a VR project?
     
  4. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Sorry, here's a link:

    https://goo.gl/Hzbyku

    No, it's not VR, and let me try it with a new profile.
     
  5. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Well, it looks like it's still happening with a new profile, but it's less obvious now.
     
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Please contact me on my mail, I can't reproduce your issue on my side and need more information about your project setup. Oh and please attach a screenshot of your camera settings.
     
  7. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    I created a conversation to talk about it, is that ok?
     
    Vondox likes this.
  8. Timspurgeon

    Timspurgeon

    Joined:
    Jul 28, 2016
    Posts:
    24
    Hello Everyone,

    Is there anyone using Enviro with Playway water? If so any issues with it?
     
  9. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    I have posted so many times in the last few days...
    Well, I've been getting huge frame rate drops (15 fps or so) because of something called "EnviroSkyRendering.OnPreRender()". I'm assuming this has to do with the rendering of the sky, and it is taking up 16% of CPU processing, even more than the camera drawing and culling! It's terrible!
     
  10. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Are there any plans on making this compatible with Fog Volume 3. I haven't bought it yet but it seems like an interesting addition.
     
  11. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I'm an Enviro noob so please bare with me...

    My night sky looks too bright to be night. I'm using Enviro with Gaia integration.



    In the guide it says the left side of the gradient represents nighttime, the right side daytime. However the guide says "So at the middle the sun will stay exactly at the horizon." What does this mean? Does this mean at noon the sun will be at the horizon because of the gradients? Some further clarification on how the gradients work would be nice.

    Or maybe you can explain why my current lighting setup gives me the bright night result I currently have?
     
    Last edited: Aug 15, 2017
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hmm do you have the background feature enabled? This will add a little bit because another camera will be rendered.
    Oh and could you please tell me the time in ms "EnviroSkyRendering.OnPreRender()" takes on your machine? For me it is between 0.25ms - 0.35ms.That shouldn't give you a big performance hit. Btw I have a i5 3570k @ 3.4GHz.

    Maybe check your clouds settings, especially the quality settings(low values -> faster) of each layer and resolution slider. (higher values -> faster).

    upload_2017-8-15_19-30-15.png
     
  13. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I played around with settings and I think I figured it out - what got me was the fact that weather settings are also important. I also misunderstood the guide when it said far right is daytime - for some reason I thought the far left is when the sun is on the left side of the world and the far right is when the sun is on the right side. It took some thinking to wrap my head around far right being 'noon', middle being 'sunset', and far left being 'nighttime'.

    This is my night scene after playing around with the settings:



    The ground looks too dark and the trees seem to illuminate strangely. Is there a way to increase the amount of light that hits the ground at night?

    Any idea why the trees might seem to glow in the distance?
     
  14. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I noticed the latest update for Enviro hit the asset store today. To update, should I delete the original Enviro folder or should I just import the update over it?
     
  15. Vondox

    Vondox

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

    in this case you can just import it over your current installation. You also can delete enviro folder, but make sure to save your profiles and weatherpresets before ;)

    Oh and I will send you a private message to help you with your profile setup.
     
    Exeneva likes this.
  16. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69

    It is taking more than 2 ms, even with fastest quality settings on clouds. In fact, it happens even when no clouds are rendering!

    I can't find where the background feature is though.
     
  17. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm please create two layers and name one "clouds" and the other "sky" and assign these in "rendering setup" category on envirosky component. Just to make sure that it isn't a problem with the layers. Oh I also have sent you a private message to better help you.
     
  18. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Nope, that's not the problem. Oh, and I really appreciate the help, but I don't think I need a TeamViewer session.
     
  19. cyeninas

    cyeninas

    Joined:
    Jun 20, 2017
    Posts:
    20
    Hey, not a huge deal but since you fixed most of the warnings in 1.9.1 figured I'd point out you missed a few heh, the following files have warnings of inconsistent line endings: EnviroSurfaceAnimatorMultiple.cs, EnviroClearLightShafts.shader, EnviroMoonShaderCustom.shader, Puddles_HQ.shader, EnviroSkybox.shader, and EnviroParticles.shader
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hi, yea I also realized these but they should not show up a second time. Even after recompile or build I never saw these again. I still will have a look why this happens and why mono doesn't show up the notification that the line endings are mixed...
     
  21. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I had nothing but issues with PlayWay Water and this. Not sure if it's the combination or not, but some of the things were:

    -When building, it lost its shader connection, the water was pink.

    -While in the editor, the water was transparent over everything else (hard to explain, but had to do with a buffer on the camera, the one that mentions rendering before lighting as when I removed that it fixed itself but it would always reattached itself at runtime).

    -Jumping in water was fine, leaving the water the terrain at the bottom of the camera was stretched. Seems like a camera effect for the water gone bad.

    Those were just a few of them that I could think of off the top of my head.
     
  22. Freshmeat911

    Freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    79
    Has anyone tried using the vegetable growth system and got it working properly? I mean it's sort of working but seems to be missing things like the "step" set up is just not there?! And apparently that's one of the most important setup items for the growth lol. Another thing is that as soon as the plant hits "age" it spawns the dead version and starts respawning immediately not sure if that was my error or not.
     
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    What version of PlayWay have you tested. Sound like something was really messed up.


    Hm it should be all there. There is a list named grow stages. Raise the count to get the options to swap gameobject when your vegetable grows.
    Anyway the component is quite old and I will improve and add a custom inspector in next update.
    The respawn after the dead prefab spawned is normal. One point I will improve to be more flexible. If you like I could send you the improved version of this component before final update in the next days.
     
  24. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    Hey if it does not make problems for you it would be very nice if you Change the DemoUI Script to EnviroDemoUi or something a lot of Assets use DemoUI Script and all time very bad to Change the namespac :D
     
    Vondox likes this.
  25. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Oh sorry for that. Sure I will change that in next update.
     
    Salja likes this.
  26. Catttdaddy

    Catttdaddy

    Joined:
    Mar 17, 2015
    Posts:
    55
    I hear this is a great asset. I have one question that I really want. Are the stars and constellations real and does this show the milky way in the night sky?
     
  27. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    Someone a idea what Settings this is for fix the fog ?

    Screenshot_1.png
     
  28. Vondox

    Vondox

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

    Do you use the unity tree shader/tree system. The tree billboard shader is bugged since quite a few versions and does not work with camera depth texture based image effects like enviro fog.
    The only solution would be to switch to a third party asset to render your unity trees. AltTrees is relative cheap and will fix your issues. Or switch to SpeedTree. Their billboard shader is working with enviro fog too.
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    The included stars texture was generated from a stars catalog and the movement is based on the sidereal time to have accurate night sky. But enviro currently does not render the milky way out of the box at the moment. For now you could use a stars texture that includes the milky way.
    But I already planned to a texture slot for the milky way in one of the next updates.
     
    evilangel89 and Bartolomeus755 like this.
  30. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Thanks this was another issue I was having xD

    As far as I know I was using the latest PlayWay Water. Right now I am using AQUAS and it's good, except for some reason since updating my Enviro from 1.8 the fog doesn't work in Exponential mode, and it Linear it is insanely intense, even on lower settings.

    FYI I am using Linear/Deferred Lighting. Direct3D11 (but may add DX9 now because I removed PlayWay?).

    I have soooooo much in this project and I just don't want to have to start over lol.

    Edit: Is there some lighting stuff I have to setup in Unity?



    I even unchecked fog to no avail in this area.

    I also did:

    Further settings to check:
    1. Disable other directional lights in your scene!
    2. For best visuals use "Linear Color Space"!
    3. Enviro uses one layer for cloud and one layer for satellite rendering. Defaults: 30, 31

    Edit 2: Fog turns on underwater lol.
     
    Last edited: Aug 17, 2017
  31. Ravery

    Ravery

    Joined:
    Mar 5, 2016
    Posts:
    49
    I have some weird transparency issues using Enviro's Advanced Fog with shaders like Text Mesh Pro's font material or Unity's "Unlit/Transparent"
    Anyone know how to solve this?
     

    Attached Files:

  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    I use exponential fog all the time and it is working fine in 1.9 for me. What exactly is wrong with exponential fog on your side?
    Check your weather presets if using exponential you have to tweak the fog density. For linear fog you need to set the fog start and end distance. Also check your fog profile settings too.
    No you don't have to setup anything special in unity lighting settings for fog. Just make sure to use real-time or precomputed gi if you want to use dynamic time of day and assign the DirectLight object as your sun.
     
  33. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Exponential is what I want, it just doesn't show any fog at all. Linear is crazy.

    I followed the Getting Started video, except in the video it shows fog right off the bat with no customization but on mine it doesn't show.

    Edit: Aaaand Linear is working now lol. I feel cursed at the moment.
     
  34. Vondox

    Vondox

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

    The problem is that image effect based fog need the camera depth texture to calculate correct fog but transparent materials can't write to camera depth.

    What you could do is to render transparent materials after fog. Open EnviroFog.cs and remove the "//" in this line:

    Code (CSharp):
    1. //[ImageEffectOpaque]
     
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm hard to tell why exp fog doesn't want to show up on your side. Have you tested the sample scene?

    Try to create a new profile to test with default settings. Start the scene and click on "Edit current active Weather" in weather controls. Now raise the fog density. If it still doesn't show up you may want to check the order of your image effects on your camera.
     
  36. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Ah! Here we go. So Exponential doesn`t work at all, but Linear with the Foggy weather seemed to, but this is the result of the default Clear Sky:

    BEHOLD MY BUGGINESS!



    Edit: Figured out this is because Linear fog needs a distance though as you said.

    Edit 2: Still trying to figure out Exponential mode, going to switch to Gamma lighting and check. However, the Linear Clear Sky was fixed (workaround) by setting End Distance for the fog to -1.

    Edit 3: Good good, Gamma did nothing. Switching back to Linear and checking out to see if the Demo Scene works too. Currently I am doing this all in the first demo scene of this asset:

    https://assetstore.unity.com/packages/3d/environments/historic/medieval-environment-pack-6859

    Edit 4: Yes the Demo Scene to works, so I know it should work. It must be something in the scene.
     
    Last edited: Aug 17, 2017
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Ah okay, I think I know why now. You mentioned that you are using AQUAS. Do you already updated to latest 1.4.2? You should update and add the Enviro Aquas Integration component.
    In 1.4.1 Aquas underwater script is messing around with fog settings even when afloat. We fixed that in our latest releases.
     
  38. Freshmeat911

    Freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    79
     
  39. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    I started to play a bit with Enviro and I have some small problems.

    Where exactly are the FOG settings? In the manual I see something like this:


    All I see on the EnviroSky prefab is:


    I'm using the weather Cloudy 2 ... and I looked at those settings but the fog is still not being changed.



    Basically the fog starts to soon. I want it to start a big further ahead.

    -----------------

    2nd Problem is that I'm loading 2 scenes additive.

    I have a scene with a big model & a scene with my Terrain & Enviro.

    Enviro likes to move the Enviro Effects game object to the other scene... he is doing this by itself... can that be problematic? Why is he doing that? Is it because I set up my Player & Camera at runtime? The Player & Camera are in that other scene, not with Enviro.

    Thanks <3
     
  40. Vondox

    Vondox

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

    the global fog controls are in your profile since 1.9.0. Sorry the documentation screenshots are outdated, I am working on that. Take a look here:

    upload_2017-8-17_17-16-34.png

    Make sure to save your changes with clicking on "Save to Profile".

    About the Effect Holder Object. This is how unity work I think so. I just create a new GameObject, it looks like unity will put this in latest loaded scene. Not sure if I can tell unity where to put this currently. Is that a problem for your project? I might could create a workaround for that.
     
  41. Ravery

    Ravery

    Joined:
    Mar 5, 2016
    Posts:
    49
    This just works. Thanks!
    Everything looks good and the framerate is the same. Is there a reason why you have removed the line? Any drawbacks/gotchas?

    Edit: Just noticed: The fog does not affect the sprites at all. Is there a good solution for alpha + fog?
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    If you don't need semi-transparency you could switch to a cutout shader for your sprites.
     
  43. Freshmeat911

    Freshmeat911

    Joined:
    Nov 3, 2016
    Posts:
    79
    Anyone know why it looks like I'm drunk or something?.... Enviro issues3.png
     
  44. akannath1

    akannath1

    Joined:
    Jun 30, 2017
    Posts:
    4
    How can i create an effect like below where the clouds appear in front of the mountain? Below is an image Hendrik posted sometime back, but i am missing something and unable to achieve this effect. Is there a tutorial video for enviro which explains the "background rendering" feature?
     
  45. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Hi Hendrick, Sorry if this has already been asked before. Even with the fog support script for
    aquas, I seem to have trouble with the underwater effects. The screenshot would actually explain

    The black objects that appear under the floating disks in the lake demo of aquas appears only after I add enviro into this scene.


     
  46. Niyazmohammad

    Niyazmohammad

    Joined:
    Jul 23, 2016
    Posts:
    14
    How to Setup UFPS with Enviro ???
     
  47. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Further to the above I get another oddity as well. A lot of green and white blotches over the surface of the water. I'll post a screenshot when I'm home.
     
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm looks strange. I would first try to change the image effect order.

    I can provide you with a shader to replace the Skyfinalize shader to get that effect with background rendering.
    I will send you a private message once I am home.

    Oh haven't seen this before. When you added enviro after Aquas you may need to modify the image effect order. Please test if that solves your issues, I will try to reproduce that issue when I am home.

    Hm you only need to assign the worldcamera at enviro as playercamera the ufps player root as player.
    I am not sure but you may also need to change the clear flag of the weapon camera and change the depth value.
     
    Niyazmohammad likes this.
  49. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    @Vondox Do you have an updated documentation for 1.9, last online is 1.8.1? I try to find the global fog settings (want to switch from exp to linear).
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Sorry new documentation not finished yet.. But maybe watching this video will help you. Oh and when switching to linear you also want to set the start and end distance in your weatherpresets. I think I forgot that on default ones. Will set these in next update.