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

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    I don't think I ever said it out loud so I thought I would:
    I'd love to have the ability to manually control the cloud layer width in gamespace rather than having it bound to the camera. I'm sure it's in the code I just haven't gotten around to look at it. Cheers!
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    You can expand the width with new worldscale option. It will automatically expand the clouds layer width and cloud camera farClip but not influence your world camera viewdistance.

    I also could send you a simple script, if you still want to manually expand only the cloud layers. But you may see some ugly cutoff effect on horizon when clouds layer is larger than your camera viewdistance.
     
  3. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Looking to buy, but a couple questions:

    1) The docs say "Do not use Desktop and Mobile version in same project, it won’t work!" -- does that mean you can't have both versions in the same project, but using them in different scenes? (We have separate scenes for mobile and desktop deployment, but in the same project since almost all assets are shared.)

    2) Is there a way to use a standard 6-sided texture skybox with Enviro -- so the skybox is rendered behind the Enviro sky effects? We need that because the large vistas in some scenes are hard/expensive to reproduce in meshes, and we have lovely skyboxes instead. (We'd fade to different time-of-day skyboxes so the background sky would be appropriate color -- I *think* it would look okay as long as the depth sorting was correct, with Enviro in front of the skybox.)

    3) I see you're working on the moon phases for 1.8 -- so that'll be accurate moon phases and path through the sky?

    4) (ADDED) So the seasonal growth system uses tree/grass meshes/prefabs placed manually in the scene, right? Won't work with terrain trees and grass?

    thanks
    Dave
     
    Last edited: Apr 26, 2017
  4. Vondox

    Vondox

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

    Thanks for your interest in enviro :)

    1.) I will update that in future and make this possible. For now I can send you a mobile package that will work with desktop in one project.

    2.) The sky in enviro desktop is a skybox shader itself, so you would need to modify the enviro shader to do that blending for you.

    The mobile version uses a skydome instead and should be able to blend with your skybox shader. But not tested this scenario!

    3.) Yea I will soon release new version with improved cloud lighting and rendering, improved moon and satellite rendering and option to use realistic sun and moon positions based on this:
    http://www.stjarnhimlen.se/comp/ppcomp.html#6
     
  5. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    There is not really a solution to get growth work with Terrain grass or trees... You need to spawn them as objects to assign the script to them. So yes you need to spawn them seperatly as meshes / objects.
     
    Last edited: Apr 26, 2017
  6. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea the growth feature is for gameObjects in your scene only.
    I have written and posted a simple script as starting point to switch between terrain grass layers to have season based terrain grass.
    Maybe useful for somebody.
     
  7. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Thanks for the quick reply and great answers. Regarding #2: How tricky would it be to modify the Enviro shader to blend a skybox?
     
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    If you provide me a sample of your skybox images, I could do some tests later and help with that if you want.
    I think it can be relatively fast be implemented, but the blending can become a bit tricky, depending on what is on your textures.
     
  9. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    So I'm still getting performance issues. It appears to be pretty much random, I can't consistently reproduce it, except that it does happen pretty frequently. Did you happen to test performance with PlayWay Water? I had an issue with a previous time of day asset that if it and PlayWay were on the screen at the same time than my framerate was horrible, but one or the other was fine. I hadn't figured out which asset was the culprit yet though. With Enviro my performance can be bad regardless of where I'm looking though.
     
  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Okay :/ I will do some more tests later and contact you. I currently haven't seen or heard from a enviro user having same issues in a build.

    Have you already done some profiling in a bad run and a good one?
     
  11. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Not yet. It never seems to happen in Unity, and outside of Unity I have to run 3 different builds to play the game (master server, local server, and then a client). I haven't found a way for Unity to let me choose which build to profile, and it always seems to pick the one I don't want to profile lol.
     
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Oh okay, I think there is a drop-down option to choose profiler target in unity, but haven't tested with multiple standalone builds.

    I will have a deeper look if I can reproduce your problems.
     
  13. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Okay thanks. There is, except it only gives you one standalone build to choose from. It doesn't register all of them as separate ones to pick, and I haven't quite figured out how it determines which one is the target that it does pick.
     
  14. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Just a quick WIP screenshot of upcoming 1.8 moon rendering!

    screen_1920x1080_2017-04-28_06-49-13.png
     
  15. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Looks great! But promise me you keep the option to change the scale of the moon easily. I need big scary moon phases ;)
     
    Vondox and dashasalo like this.
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422

    Yea of course, you can change the scale easily :)
     
  17. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi,
    i am thinking to use the asset with a racing game, I did a small test, but then I use the inside car view i get raining inside the car :)
    So I think that your asset does a camera overlapping and consequentially applies effet to all the screen ...how can I handle that ?
    I would even disable the enviroment sounds like the birds singing and take only the weather sound ..
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    How do render your cockpit? I would render with separate cam only the cockpit and setup camera depth, culling mask and clipping planes. This way you can have more accurate shadows and should fix your rain problem too. If you render with same camera you would need to setup rain particle collisions. But you may need to reduce particle emission or you may get performance issues using particle collision with moving colliders.

    You can reduce the ambient sfx volume or just set the ambient sfx fields in weather prefabs to "none".
     
    one_one likes this.
  19. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I am not getting you ...let's try to focus on simple scenario.
    I have the race main camera that can be shifted between different pivot points. few of those are inside the car with different view ...are you saying to add new cameras to render only the cockpit ? How ?
     
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea, you would have two cameras. A world and a cockpit camera. Add a new cam as child of your world camera and add a new layer for your cockpit/car. Set the new camera to only render your cockpit. When in third person(outside) view disable the cockpit cam and render your car layer with worldcamera. When going inside remove car layer from worldcamera and enable cockpit cam.

    With setting up the cameras depth and clear flags you can control how both cameras blend together.

    May do a search in forums here for more information. I am sure this got discussed here multiple times.
     
    antoripa likes this.
  21. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    ok . done .. it works ...
    reducing the fx volume nothing change ..i noted that before ask here
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Ah sorry, that will be fixed in next update. In current version max volume only changes on day-night switch.

    For now take a look at the SFX Holder prefab in Enviro -> Prefab folder. Set the volume to zero in both Ambient Audio sources attached at this prefab.
     
  23. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    For some reason Ambient Lighting won't update at all. It will stay at default at all time unless I'm using Skybox, but Skybox mode is expensive. What can I do?
     
  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    You may have another asset that is updating ambient colors in your scene and override enviro changes?
    Check out demo scene if it is working in demo scene you have to check your other assets.
     
  25. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    It's not working in the demo scene, too. Oh, by the way, after checking out the demo scene my test scene no longer works, it just hands up Unity when I try to enter play mode.
     
  26. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Then something is messed up. Have you changed something? Unity version? Maybe do duplicates of your weather prefabs and reimport enviro.
     
  27. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Ok, reimported everything, now it works. Thanks.
     
    Vondox likes this.
  28. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    @Vondox Hendrick if you don't mind me asking, could you share some kickass color gradients that you may have tried yourself on the skies ? Only if you have any time left to do it. This asset is crazy good when it comes to sky rendering and the right color gradient will make the most amazing difference to your scene .
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    I maybe will post a few settings when 1.8 is released.

    I have changed all gradients and graphs to calculate colors and values based on sun position in sky and not based on time of day.
    This change will allow correct location based lighting with latitude and longitude.

    Next update will also include some great improvements in cloud rendering visuals, more control over sky, fog and light colors based on current weather and improved moon and satellite rendering.

    I will upload a few screenshots later :)
     
    one_one and evilangel89 like this.
  30. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Excellent. The reason I asked this specifically is because Unity had some sky assets listed on the main page and I ran into a couple of videos of azure sky. The thing I noticed more there was that the gradients play a huge role in the time curve. The right gradient colors make one hell of a difference to the night sky and if there were a few sample preset gradients that enviro could ship with, it'll be awesome.

    I have no idea why enviro didn't get listed in there today, but enviro deserves to be there. Guaranteed :)
     
  31. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    @Vondox Is it possible to do fog scattering in enviro like below ? I have never tried .

     
  32. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea would be possible, need to use different scattering values for sky and fog then, may add this :)
     
  33. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Would really appreciate if possible. It would add a lot of realism to the asset. Right now I am using an open source volumetric lights asset and it is quite heavy on performance. If you can bring fog scattering I'll be very grateful.
     
  34. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I noticed there's a few compiler warnings Enviro throws in Unity 5.5.3f1. Are you aware of that, and/or fixing them?
     
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea I will fix those warnings in next update, but they shouldn't break something. :)
     
  36. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Okay thanks!
     
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    So...one reason I purchased this was because of the great fog pictures. But I cannot get very much fog in my scene at all.

    I followed directions, put the linear prefab in the scene, set up camera and player, messed around with the settings, even changed the weather to foggy 2 (which had no impact at all in 3 days), and could not get fog. I had a little fogginess in the distance, but no scattering along the horizon at all. Very disappointed. Unless...it is something I did wrong, which is probably the case. ;) So if you can let me know how to get some fog in my swamp, I would be most grateful.

    I was hoping to use this in a scene at a presentation on Monday but will have to back to Time of Day or Tenkoku until this works for me.
     
    antoripa likes this.
  38. Vondox

    Vondox

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

    okay sorry to hear that you have issues with fog. There are a few settings you may want to tweak in EnviroSky Component and Weather prefabs.

    At EnviroSky Component:
    upload_2017-5-7_2-39-42.png

    At the weather prefabs check the "Fog Density", "Height Fog Density" and "Fog Scattering Intensity".

    If you still can't get fog in your scene maybe try to reorder the enviro fog image effect at your camera. Also test the demo scene you should clearly see the fog when switching to foggy weather.
     
  39. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I will try the reorder.

    As for the weather prefabs, I can't even move the prefab into the input field for the weather prefab. I once got it in by deleting the entire Enviro Sky prefab and then putting it in back in...and putting the weather prefab in immediately. But since then, I can't seem to get it to work. And the weather never changed. Bright blue skies, no fog, and some clouds.

    Moving the height fog density did nothing at all and some of the other settings did not either. Will keep trying. Tomorrow I will go back to Time of Day if needed. Tenkoku didn't work with my water...too bad. lol
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Don't try to assign Weather Prefabs directly in EnviroSky component! Add them to the list in the EnviroZone component that is on your EnviroSky prefab and use the sample UI to change weather for example. (Enviro -> Samples -> Prefab -> UI)

    Or just remove the weather you don't want to have in your scene from that list.
     
  41. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Ahh, that was not clear in the docs. I did what you said above, and now there is absolutely no fog, sky is still clear, even without any clear days in the zone list.

    Fog sliders do nothing at all. The only image effects are the Enviro ones. I took out all of my other effects. The UI? It does nothing either.

    Very weird. I will post some pictures tomorrow. I don't mean to be difficult. I use Gaia, and TC2 and World Machine, Tenkoku, and Time of Day among may others...and am a whiz with UMA, but I can't seem to get yours to work for me. LOL
     
  42. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Then something is messed up :D Sorry I will update docs soon, really want to finish 1.8 at the moment.
    Maybe just start fresh: Delete enviro folder, remove the all enviro objects in your scene and do fresh import. Now add EnviroSky prefab in you scene assign player and camera and add the sample ui.
    It really should work now!
     
  43. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I tried that a couple of times. :) I am just getting frustrated, will try again tomorrow. Thank you for all your help!
     
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea I believe you :/

    If you see clouds changing when switching weather and everything is working expect fog, there maybe another component in your scene overriding unity fog settings.
     
    Teila likes this.
  45. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Could be that. This is an old scene that I resurrected from bottom of my stack of files deep within my storage disk. I wanted to see what I could do with it and show it off with some AI and cool effects at a Unity User Group meeting on Monday. Either way, I will spend more time with Environ when I can. I really like it and it looks great with Aquas. Sunsets and sunrises are amazing. Just the fog is giving me fits.
     
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Hey again, I tried again today with a fresh head a cup of coffee. Weather is working now. One issue though...it rains when the sky is clear. Anyway to fix that? :)

    Beautiful otherwise!
     
    Vondox likes this.
  47. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    What weather is shown as active? Have you maybe manually added a weather prefab directly in your scene which is active?
     
  48. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Weather is shown as active...I think. And yes, I did add a prefab but since that is what you told me to do in the docs, that should still work, right?

    Could you give me step by step how to get a cloudy and a foggy weather prefab to work? I am using only yours, not any custom ones.

    Cloudy...I cannot make the sky cloudy. Clouds are bluish so looks clear with high thin clouds, not a dark cloudy day.

    I am okay with the fog now with the Foggy prefab, but....I want a foggy and cloudy day. Adjustments to the clouds and density help a tiny bit but at the highest settings, the sky is still full of blue clouds. Changing color makes little difference

    This is so pretty..I really want it to work. :)
     
  49. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Deactivate all weather prefabs you have in scene when in edit mode. All included weather types are already added to the list on default zone that is already on the envirosky prefab, so you don't need to add anything more to your scene.

    You want to play with weatherColor(darker color more alpha) and fog scattering values on your weather prefab.

    After scene start all weather prefabs are spawned under Enviro Effects object. Now change weather to foggy 2 and you can change values on the cloned prefab to see changes in runtime. When finished tweaking copy the weather prefab component values and paste to the prefab in your project. If this is a weather prefab with particle effect you would need to manually assign it after copy paste.

    But current implementation lacks in making really dark clouds and it is hard to tweak those colors. I have rewritten parts of weather system in 1.8 to have more control over sky, light and fog colors and intensity based on weather.
    I also have improved clouds lighting and blending with scene to get more realistic results and more control over clouds visuals.
    But I need some more days to finish, and do some cleanup, bug searching.
     
    Last edited: May 7, 2017
  50. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks! I pretty much did all that and figured out how to make my own weather prefabs. I have one problem though...can't seem to turn off the rain! lol I even deleted the particle off of the weather prefab and it still rains. Rain is cool but not sure I want it all the time.

    How do I add in the splashes to make the rain look better? If it is going to rain in my swamp, then I want it to look good. :)