Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    280
    Thanks for the reply with the requested information! A nice sky rendering solution is definitely a need for my project and I will be happy to include Enviro in it. I wasn't able to get the demo working using the asset store link, but using the link in the thread worked fine for some reason. I messed around with the settings and I must say Enviro really is beautiful! The clouds are the best I've seen! This solidified my purchase for Enviro and I will be posting some screenshots soon for comparison and findings. :)
     
    Vondox likes this.
  2. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    335
    Working with the latest version of VRTK and enviro, enviro spams Enviro Rendering gameobjects under the player. This is because the latest VRTK disables all cameras on scene save and when starting the game you are using GameObject.Find("Enviro Rendering") on Start. VRTK probably enables the player later on once the SDKs are intialized. Therfrore you never find the old Enviro Rendering gameobject and create a new one anyway and it stays in the scene when you stop the game.
    May I suggest you just loop over the Player's children since you have a reference to the player already when not using 'assing in runtime' and find Enviro Rendering this way?

    Theres also problem with the night sky in VR. It looks like the clouds when not set to legacy. Also the moon kind of moves with the head.

    Im also having performance problems with enviro. Downloaded the latest version of the asset store and it essentialy halves my fps from 90
     
    Last edited: Jul 4, 2017
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hi rasto61,

    i would suggest to initialize enviro over script once vrtk has fully started. This should fix your problems with spamming enviro rendering object. But I will take a further look into this and may change the behavior to be better compatible with vrtk.

    Please send me a mail with your invoice, I will provide you a link to latest enviro version. This will include a few fixes for VR and should solve your issues and greatly improve performance in VR since you are not limited to legacy cloud mode anymore.
     
  4. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    335
    Yes, please have a look at this. You dont really have to increase compatibilty, just getting the Enviro Rendering in a a different way than Gameobject.Find so it allows to find it even if it is disabled.

    Will do, thanks
     
  5. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    280
    Hi I'm getting some errors that are prohibiting me from using Enviro efficiently.


    When I try to save the prefab with my preset settings of Enviro I get this error and it basically corrupts the prefab.

    Code (CSharp):
    1. The prefab instance was disconnected during activation while connrecting. Are you calling DestroyImmediate() on instance objects not marked as DontSave from OnEnable?
    2. UnityEditor.DockArea:OnGUI()
    When the scene stops playing I also get this error

    Code (CSharp):
    1. Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
    2.  
    The only thing I can do to workaround this is to duplicate the enviro sky prefab inside the folder, change the settings for it, then drag the prefab out of the folder to the scene. If I want to change some settings then I have to delete the prefab, change the settings in the folder, then drag it back out. Any ideas?
     
  6. Vondox

    Vondox

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

    I will send you link for latest enviro beta version.
    A profile system was added to manage different setup more easily.
     
    malkere likes this.
  7. ohmrzack

    ohmrzack

    Joined:
    Feb 6, 2017
    Posts:
    8
    First off I will like to say I am amazed at EnviroSky and how light weight it is with my game, I just have a couple of questions; How can I edit the ambient noises with my own? and also how do I make the seasons work? the documentation doesn't talk about it, thanks!
     
  8. Vondox

    Vondox

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

    if you are talking about the ambient sounds:
    Check the weather prefabs in Enviro -> Prefab -> Weather
    You can assign different sounds for day and night and seasons for each of your weather types You also can leave this empty to play nothing.

    Seasons are enabled by default. You can choose between different components for example switching between gameobjects, materials and textures to create your seasonal environment.

    If you are using the standard unity shader for your terrain you could add the "Seasons for Terrain" component and assign seasonal textures that get switched when season changes.

    Feel free to contact me on my mail if you have more questions. I will update documentation soon and add more detailed information how to setup all the optional enviro components and third party integration components.
     
    Last edited: Jul 6, 2017
  9. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    513
    Is Enviro compatible with Unity 5.6.2? I recently upgraded, and it seems to not be. Here's what it looks like in game. I removed Enviro from the project, imported the newest version on the asset store
     

    Attached Files:

  10. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hi emrys,

    please try this to fix this issue:

    Open EnviroSky.cs and search for this line:
    Code (CSharp):
    1. PlayerCamera.hdr = HDR;
    and change to:
    Code (CSharp):
    1. PlayerCamera.hdr = true;
    If you are interested I also can send you link to latest beta version. The new version includes a profile system based on scriptable objects and custom inspector for nicer usability.
     
  11. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    513
    That seems to have fixed it, thanks!
     
    Vondox likes this.
  12. cyeninas

    cyeninas

    Joined:
    Jun 20, 2017
    Posts:
    20
    Hey, I'm using this with Third Person Controller by Opsive and TPC uses Layers 30 and 31 for Enemy and Player respectively and no matter how many times I reimport Enviro it doesn't seem to overwrite the layers despite what the documentation says.

    I even switched out the sky and satellite rendering layers to unused ones in the Enviro Sky script and I'm still not getting clouds, and the moon is visible during daylight. Am I perhaps naming them wrong? What are their intended names?

    EDIT: Also I think the reason the settings don't apply is because it doesn't count as a complete project on Unity, so it only imports the data and not the project settings.
     
  13. Vondox

    Vondox

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

    that's correct the layer settings doesn't get imported, not sure where you read that.
    But set the layers to different id's should work.

    Anyway I have send you link to latest enviro beta, to make sure that it isn't a bug. Please name two unnamed layers and assign these in "Rendering Setup" category on envirosky component.
     
    malkere and cyeninas like this.
  14. cyeninas

    cyeninas

    Joined:
    Jun 20, 2017
    Posts:
    20
    Sorry, I probably just misread it. This version you sent me seems to be working as intended, but it was probably due to a misconfiguration on my part and not a Enviro bug. Thanks!
     
    malkere likes this.
  15. Kelos

    Kelos

    Joined:
    May 27, 2014
    Posts:
    11
    I want to make a walkaround for that - just speedup time during night.
    1) How can i get current dusk and dawn times?
    2) Is it changes during year?
     
  16. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,161
    A simple script can do that easy enough for now. I turn Enviro time management off and use this:

    Code (CSharp):
    1.     float dayTime = 9f;
    2.     int dayCount = 0;
    3.    
    4.     void FixedUpdate () {
    5.         if (!timePaused) {
    6.             if (dayTime < 8f || dayTime > 19f) {
    7.                 dayTime += Time.fixedDeltaTime / 50f;
    8.             }
    9.             else {
    10.                 dayTime += Time.fixedDeltaTime / 100f;
    11.             }
    12.             if (dayTime >= 24) {
    13.                 dayCount++;
    14.                 dayTime -= 24;
    15.             }
    16.             EnviroSky.instance.SetInternalTimeOfDay(dayTime);
    17.         }
    18.     }
     
    Vondox likes this.
  17. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,104
    We have a fairly complicated prefab that contains the Main Camera and a lot of other things. The first time I run Enviro after adding it to a scene, Enviro adds the Enviro Rendering cameras as children of the Main Camera. That's fine, we can apply that change to the prefab. However, it seems Enviro breaks that prefab connection every time we enter and exit play mode. I understand that Enviro needs to add its components and game objects to the Main Camera's hierarchy if they aren't already there, but we have included those into the prefab after the first time they were generated.Is it possible to prevent Enviro from doing that?
     
    Teila likes this.
  18. pixelR

    pixelR

    Joined:
    Sep 16, 2013
    Posts:
    51
    Hello,

    first of all: Enviro is looking great and I am happy to have purchased it. I was planning on getting another similar tool for sky & weather, as that one has very nice secondary clouds for the far horizon (which is very realistic looking), but I see faster development here, so I gave in.. :)

    Please check the attached screenshot (and I hope it's visible for you too): are those gradients normal, or is some setting off on my side, what do you think? It's a little like having only 16 bit colour palette instead of 32 bit. Or maybe I'm just seeing badly...

    Thanks for you answer in advance, keep up the excellent work!
     

    Attached Files:

  19. Vondox

    Vondox

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

    I will add option for separate day and night length in minutes and add a function to get dusk and dawn time for current day in year.
    Not sure but maybe already in next update.

    For now the code from malkere should do the job.

    Hi,

    sure I will have a look into this and change enviro behavior that breaks your prefab.
    Should be quite simple and included in next update 1.9.0.
     
  20. Vondox

    Vondox

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

    ohh that looks crazy :D Do you use any other image effects on your camera? Maybe try to change the order until everything is fine.

    Also maybe try to activate HDR rendering, still it should work just fine in LDR too.

    Also please try the sample scene to know if you getting similar issues. If nothing helps send me a mail with screenshots of your camera components, the unity version and your colorspace.
     
  21. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    280
    I'm also having that problem but it seems to be tied to the order of the Enviro Fog and other image effects. HDR helps this but doesn't get rid of it.

    This is Enviro Fog before the Post Processing Stack and Super Sampling script (top)



    This is Enviro Fog after the Post Processing Stack and before the Super Sampling script (middle)



    This is Enviro Fog after Super Sampling script and Post Processing Stack (bottom)

     
    Vondox, malkere and SirTwistedStorm like this.
  22. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    189
    I get a similar looking sky as well just not as bad as his with HDR on, all I have in the scene in Gaia, Gena, CTS, and HBAO.
     
  23. pixelR

    pixelR

    Joined:
    Sep 16, 2013
    Posts:
    51
    OK, switching from Linear to Gamma colour space solved the gradient problem. Silly me. :)

    I saw a new sunshine artefact on the other hand, see attached screenshot (DX11, Deferred rendering). I think I will just look it up where I can set the order of effects and then tweak settings there...

    Most importantly: the stars are twinkling in Gamma colour space, it looks so sweet! :D
     

    Attached Files:

  24. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Thanks for reporting will take a look into this.

    Can you please send a screenshot of what effect where active in post effect stack?
     
  25. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    280
    Only Anti-Aliasing (FSAA) :)
     
  26. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    189
    Switching from Gamma to Linear fixed it for me. With no post process effects on Enviro is working as intended I'll add some effects in later to see if it's still gorgeous
    . Desktop 07.13.2017 - 07.41.12.02.png Desktop 07.13.2017 - 07.38.27.01.png
     
    Vondox likes this.
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Maybe try to change the Lightshafts settings in envirosky component.
    At the end it should work in gamma and linear colorspace.
    Please send me a mail with these information if you still having issues:
    Unity Version?
    Screenshot of your camera components and enviro setup.
     
    Last edited: Jul 13, 2017
  28. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    I think you really want to execute some of the AA methods before other image effects. So putting these before fog should be fine. Things like bloom or colorgrading and other effects should go after enviro components.

    Oh I also will expose the dithering settings from enviro fog to reduce color banding in 1.9.0. I hope that this will help you getting rid of these banding.
     
  29. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    280


    This is my order and as long as the Enviro Fog is at the bottom of the stack it works fine, I think it makes sense to be at the bottom of the stack anyways now if I really think about it. :p

    Edit: I'd also like to propose a feature request. I think it'd be useful to have either a designated variable for what time Enviro starts when the scene starts or you could even have a Vector2 range to make it not start the same time every time. It's not a big deal and could be left out but I find my scene always starting at night time. Just a thought however! :)
    Anyone wanting to change this for themselves can goto line 416 in EnviroSky and add on top of it GameTime.Hours = Random.Range(0,24) or maybe a different range so it always starts at day time.
     
    Last edited: Jul 14, 2017
  30. JDrem1

    JDrem1

    Joined:
    Jun 24, 2017
    Posts:
    195
    @Vondox

    Hello.

    Enviro looks incredible. Please forgive if this question seems obvious.
    And at the risk of sounding like an idiot. But due to budget restrictions ATM, I thought I would ask.


    Can the Mobile version be used on PC for the time being.. And then upgraded later?
    And if the answer is yes, what is the difference between the two packages please.

    If no, then I have my answer. :)

    Thank you for any help.
     
  31. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    335
    Of course it can be used for PC. There is absolutely no reason you have to use it only for mobile.

    The mobile version is a lot simpler; simpler clouds, no scattering, just unity fog, no/simpler effects like sunshafts, etc.
    The mobile version is faster, and I originally used that as I needed it for mobile projects. After I started a PC project I got the non-mobile version and the difference was amazing. Enviro mobile looks good at its performance level, but the PC version looks just incredible. I initially had the mobile version in the scene but after changing it to PC version the difference was night and day.
     
  32. JDrem1

    JDrem1

    Joined:
    Jun 24, 2017
    Posts:
    195
    Hey great reply.

    Thanks a lot.

    Hmm now you have me thinking, because I want the eye candy, but I am predominantly looking at it for use with VR. And so wondering if the desktop version would be "VR friendly" Or if for performance it would have to be the mobile version.
    By what you say I want all the good stuff in the desktop version.(once I can afford it)
    Do you have any experience with how it runs in VR?

    And thank you again.
     
  33. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    335
    I was not able to use it in VR. Performance is usable but there are clouds, stars, moon problems right now. I have been in touch with the dev and he is taking steps to make enviro work in VR.
     
  34. JDrem1

    JDrem1

    Joined:
    Jun 24, 2017
    Posts:
    195
    That is great news. Here's hoping they can get it working with VR with performance.
    Thank you for the help.
     
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Enviro will start with the configured time in GameTime category. To have random start time you could create a new script and call:
    EnviroSky.instance.SetInternalTimeOfDay(Random.Range(0f,24f);
    for example in start function. This way you don't need to modify enviro code. I will add a simple script in next version you can add to your scene to have random start times.
     
    Freznosis likes this.
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Yea, unfortunately current version have some issues with VR. I am currently working on fixing these for 1.9.0 but i don't have a VR device, so it take some time to test changes and fixing the remaining issues.
     
  37. GumboYaYa

    GumboYaYa

    Joined:
    Dec 3, 2016
    Posts:
    1
    Hi,

    I am currently looking for a dynamic sky solution for our current project. And yours looks amazing!
    Though a few questions raised during evaluation:
    • What exactly is the difference between the desktop and mobile Version? Is there a chart somewhere?
    • Is there a WebGL demo of the mobile version?
    • Our current project has static cameras only and is a desktop title, but should run smoothly on as many setups as possible (i.e. MS Surface, most current Notebooks, etc). I guess that the mobile version would be the better choice for that?
    • Is it possible to create a static skybox of any given sky setup as an alternative for slower machines or machines without SM 3.0?
    Thanks in advance!
     
  38. Vondox

    Vondox

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

    sorry I currently don't have a chart or a webGl demo for mobile version. The mobile version doesn't support atmospheric scattering, multi layer clouds, no god ray's or fog image effect.

    I planned to rewrite mobile version in future and will create a graph to compare the features then. Good idea :)

    If you target desktop you should give full version a try. I haven't tried enviro on slower onboard gpu but you can customize settings to be really fast and create a graphic option menu to give your players control over quality and features. For example on slower GPU you mostly want to use only one layer of dynamic clouds with lower quality.

    About skybox image generation. There currently is no generation script included. But maybe there is a asset in store that can save a cubemap or six sided textures to create static skyboxes.
    You then could load that skybox to enviro disable all cloud layers and still use enviro weather effects and/or fog for example.
     
  39. Discord

    Discord

    Joined:
    Mar 19, 2009
    Posts:
    1,002
    Quick question. I'm having a bit of difficulty making EnviroFog play nice with my water. Everything looks good when the fog is turned off, but as soon as it's turned on, I can see the bottom of my terrain through my water. Any idea how I might be able to alleviate this issue?

    problem.jpg
     
  40. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hi Discord,

    Please try following:

    1. Create a new material and assign Enviro/Depth shader to it. Also disable shadow recieve and casting.
    2. Create a new gameobject and add a mesh filter and mesh renderer component to it.
    3. Add the water plane mesh to the mesh filter component, add the depth material in mesh renderer component.
    4. Now scale and place the new gameobject to match your water, but move it a few units lower.

    Please let me know if this workaround fixes your issue. :)
     
    Last edited: Jul 15, 2017
  41. Discord

    Discord

    Joined:
    Mar 19, 2009
    Posts:
    1,002
    Thanks, that did the trick!
     
    Vondox likes this.
  42. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    280
    I'm not sure why I didn't think of that :)

    I also had another question that I got reminded to ask because of the post Discord made. Is there any way to make my particles play nice with Enviro's fog? Currently it seems the depth of the fog is drawn before the particles or something as they become almost completely translucent.

    Fog Off


    Fog On
     
  43. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Yea the general 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]
     
    Freznosis likes this.
  44. Melohn

    Melohn

    Joined:
    Jul 17, 2016
    Posts:
    11
    I have a problem with this asset. if i use the demo scene everything works perfectly. but as soon as i add a diffrent character controller things start falling appart. i can get the weather system to work but i cannot see the sky box, no moon stars or sun. just a bluish sphere that turns darker towards the middle.
    another person earliere mentioned something about layeres but this is no where mentioned in the documentation.
    so how do i get my new character controller to pick up the actuall skybox?
     
  45. Vondox

    Vondox

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

    do you have assigned your camera and player in you scene correctly? I would first check that. If this isn't you problem send me please a screenshot of your camera components.

    Edit:
    Oh if you assigned your player and camera by hand you also have to disable AssignOnRuntime.

    Edit2:
    If you are on deferred rendering you also should try the fix I posted a few posts down!
     
    Last edited: Jul 17, 2017
  46. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    189
    Are you using Opsive's TPC?
     
  47. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Hi!

    Why do I get this when I look up in play mode?
    2017-07-17_13-41-13.png
     
  48. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,188
    Hi Teila,

    sorry there is an issue with deferred rendering and HDR disabled in current version.

    Fix:
    Enable HDR in EnviroSky component or do following:

    Open EnviroSky.cs and search for this line:
    Code (CSharp):
    1. PlayerCamera.hdr = HDR;
    and change to:
    Code (CSharp):
    1. PlayerCamera.hdr = true;
     
    Last edited: Jul 17, 2017
    Whippets likes this.
  49. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Thanks!
     
  50. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    I would like to have more control over shadows. I cannot seem to change the intensity on Enviro's directional light. Is there a way to handle this? Thanks again.
     
unityunity