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,420
    First I would create a new layer for your terrain and colliders that are supposed to stop rain and snow particles. You want to have them sepperated as there is a max collider shapes count and once you excced that it will randomly stop working.

    upload_2017-11-23_20-53-15.png

    So assign the new layer to the "Collides With" layer mask and your collider. Also make sure that your collider is set to "static" when using "Low" or "Medium" collision quality. After that you need to tweak the "Voxel Size" until that point that no particle fall through your roofes.
     
  2. Ryzir

    Ryzir

    Joined:
    Nov 15, 2017
    Posts:
    3
    Awesome thank you, that solved the pink sky issue. However, it did not solve the arms + weapon missing in first person view. Whenever I add enviro to my scene it will ask me to assign a player (if i dont assign one, the arms and weapon will show up when i hit play but when i do assign it to enviro, the arms and weapon will disappear, any idea why?)

    Second issue: Whenever i hit play, it seems fine (without the arms and weapon in first person view) but whenever I make the build, it will be all distorted and blurry (see screenshot). Does anyone have a suggestion of how to fix it? 3.jpg
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Please try following: Create a new layer and name it "moon". Assign that layer in 'Rendering Setup" category in envirosky Inspector. Make sure that your weaponcamera renders only your weapon layer and have no enviro components added.

    About your second issue. Do you have activated the lightshafts or other Image effects? Please try to deactivate and check again.
     
  4. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hi Vondox,my rain's color is purple and no error in Console. my snow's color is same.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      1 MB
      Views:
      841
  5. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,256
  6. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Is it possible that "Day and Night" is not the same weather presets?
     
  7. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239

    Attached Files:

    • 2.png
      2.png
      File size:
      955.2 KB
      Views:
      806
  8. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Please take a look at the EnviroWeatherParticle shader:
    Enviro -> Shaders -> Particle folder.

    Maybe the shader ist unable to locate the EnviroFogCore.cginc. That one should be located here:
    Enviro -> Ressources -> Shader -> Core
     
  9. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    No, you can use weatherpreset for day and night. Maybe it was just am auto weather change? You can deactivate that in 'Weather Control" category of EnviroSky Inspector.
     
  10. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    The problem has been solved,thank you Vondox.The reason is somehow the Enviro -> Ressources directory haven't imported,so I import it then problem has been solved.
     
    Last edited: Nov 24, 2017
  11. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    I just want to change same weather "Fog Intensity" on day and night.Or any trick!!
    FC.jpg
     
  12. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    762
    Hi,
    Just bought it on sales, tried it a bit. Excuse my noob questions:
    -I use cts shader and it's fps counter. If i use volume clouds i have go from 160 to 60fps even after changing some values. I tried the flat clouds they are fantastic too and go to 140 fps so the performance seems good. Is there a way to use volume clouds, what would be your presets?
    -I did duplicate a weather profile (Ctrl+D) in order to mess without breaking the original it was cloudy1 but the copy showed a lot of clouds and don't seem to react on tweaking...What did i miss? Can i create an empty new profile?

    Thanks in advance
     
  13. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Some error message appear and I don't know how to fix.
    QQ截图20171125000422.png
    I try to delete the EnviroSky prefab in the scene and I add it to the scene again. But it don't work!
    Error Message is Still here!

    and I try to build the scene,But No environment light data in game,so the tree shadow is compelete black
    QQ截图20171125000535.png
     
  14. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    I reimport the EnviroSky and The error gone, that is good!

    But the volume lighting is not work in runtime game...
     
  15. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    I built it in unity 2017.1.1, api use dx11 only
     
    P_Jong likes this.
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Please add the Enviro/VolumeLight shader to the always included shaders list in Unity's project settings.

    Btw. the new update already uploaded and is in review, now I am working on the documentation and hope to finish that one next week.
     
    P_Jong likes this.
  17. Firlefanz73

    Firlefanz73

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

    I had the strage Color reflection Problems you remember?

    So I disabled the "GlobalReflections" in the inspector in my Scene.
    The Color Problems are gone.

    But in the log I get hundreds of warnings now:

    Attempting to update a disabled Reflection Probe. Action will be ignored.
    0x00000001411BD6CB (Unity) StackWalker::GetCurrentCallstack
    0x00000001411C005F (Unity) StackWalker::ShowCallstack
    0x000000014109A150 (Unity) GetStacktrace
    0x000000014059A493 (Unity) DebugStringToFile
    0x000000014059AC71 (Unity) DebugStringToFile
    0x0000000140322954 (Unity) ReflectionProbe::ScheduleRender
    0x00000000389C3E05 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.ReflectionProbe:RenderProbe (UnityEngine.RenderTexture)
    0x00000000389C3C77 (Mono JIT Code) [ReflectionProbeBindings.gen.cs:266] UnityEngine.ReflectionProbe:RenderProbe ()
    0x00000000389C3917 (Mono JIT Code) [EnviroSky.cs:1939] EnviroSky:UpdateReflections ()
    0x00000000389BE678 (Mono JIT Code) [EnviroSky.cs:1326] EnviroSky:Update ()
    0x000000000BC979A2 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FFD4C95612B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FFD4C8A889D (mono) [object.c:2623] mono_runtime_invoke
    0x00000001409235FC (Unity) scripting_method_invoke
    0x0000000140917E43 (Unity) ScriptingInvocation::Invoke
    0x00000001408D8A51 (Unity) MonoBehaviour::CallMethodIfAvailable
    0x00000001408E4B3F (Unity) MonoBehaviour::CallUpdateMethod
    0x00000001403A34A6 (Unity) BaseBehaviourManager::CommonUpdate<BehaviourManager>
    0x00000001403A417F (Unity) BehaviourManager::Update
    0x00000001405DE273 (Unity) `InitPlayerLoopCallbacks'::`38'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
    0x00000001405DC9B6 (Unity) PlayerLoop
    0x00000001410C6EC2 (Unity) PlayerLoopController::UpdateScene
    0x00000001410C843F (Unity) PlayerLoopController::UpdateSceneIfNeeded
    0x00000001410D1919 (Unity) Application::TickTimer
    0x00000001412DB5E9 (Unity) MainMessageLoop
    0x00000001412DCEA4 (Unity) WinMain
    0x0000000141DF75D8 (Unity) __tmainCRTStartup
    0x00007FFD86C82774 (KERNEL32) BaseThreadInitThunk
    0x00007FFD87BD0D51 (ntdll) RtlUserThreadStart

    What is the correct way to turn off the reflections or Keep it alive but get rid of the Color Problem then?

    Thanks a lot!
     
  18. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Currently the best way would be to control the global fog intensity values for distance and height fog here:

    EnviroSky.instance.fogSettings.distanceFogIntensity
    EnviroSky.instance.fogSettings.heightFogIntensity

    I would create a new script with to animationcurves and evaluate the values base on EnviroSky.instance.GameTime.solarTime.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class ControllFogDayNight : MonoBehaviour {
    6.  
    7.     public AnimationCurve distancefogIntensity = new AnimationCurve();
    8.     public AnimationCurve heightfogIntensity = new AnimationCurve();
    9.  
    10.     void Update ()
    11.     {
    12.         EnviroSky.instance.fogSettings.distanceFogIntensity = distancefogIntensity.Evaluate(EnviroSky.instance.GameTime.solarTime);
    13.         EnviroSky.instance.fogSettings.heightFogIntensity = heightfogIntensity.Evaluate(EnviroSky.instance.GameTime.solarTime);
    14.     }
    15. }
     
    P_Jong and zmaxz like this.
  19. Vondox

    Vondox

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

    performance of volume clouds are heavily depending on your gpu. Here are a few tipps to improve the performance:
    Please set the cloud quality mode to custom to enable full controll. You want to set the "Raymarch Steps" as low as possible without showing artifacts. A tipp would be to limit the bottom and top clouds height to maybe 3000 - 5000. You should be able to render clouds with less steps now.

    The render resolution can greatly improve performance, but higher values can look bad in distance clouds. You can try to hide the low res clouds in distance with an higher "Sky Fog Intensity" in your weather presets.

    The base and detail noise uv values will define your cloud shapes. Higher values will cost more performance. The base one will define your basic cloud shape, the detail will applied on the edges of your clouds shapes. Maybe you can save a bit performance here too by tweaking the settings to find a good visuals/fps ratio.

    There are also a few values that could influence clouds performance in weatherpresets. Please take a look in "Alpha Factor", "Raymarch Step Mod" and "Density".

    Try to use high "Alpha Factor" ad "Density" to boost the alpha of your clouds. That can save performance as we sample clouds until we get a full alpha. The "Raymarch Step Modifier" can be used to finetune the sample counts.

    About weatherpresets:

    After you dupicated your weather preset change the name a the top of your duplicate. Now assign the "new" preset to your "EnviroZone" component weatherpreset list.

    You also could create new presets and profiles here:
    Right-click in one of your folders -> Create -> Enviro -> WeatherPreset
     
    eaque likes this.
  20. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    You can disable the Reflection Probe in your profile -> Lighting category. Unfortunaly I am not sure why the reflections breaking your materials, I don't see those issues in all my projects. :/
     
    Firlefanz73 likes this.
  21. mgrugl

    mgrugl

    Joined:
    Mar 1, 2017
    Posts:
    23
    Thank you so much for this speedy reply! I wish you good progress with the cloud shadows. It's amazing how they enliven an outdoor scene.
     
  22. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Thanks! I have Postprecessing V1 installed with only dof. but I removed it and it did not help. I run with Gamma and without hdr.
    When turning off Reflection Proble now it is fine, no Color Problems and no log Errors anymore.

    Maybe I figure it out later. Looks very good now (even without reflections). :)
     
  23. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Thanks! It is helpful!
     
  24. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    762
    Hi,
    Many thanks for this very detailed answer! :)
     
  25. teroojala

    teroojala

    Joined:
    May 19, 2014
    Posts:
    6
    Hi i just bought this asset and there is a weird problem. I'm using OS X for development and everything works fine in editor player. But when i build project, scene is dark. Sun is purple and does not generate any lights, only sun and rays from it are visible.

    Is there supposed to be some special build-config or am i missing something?

    [edit] Included screenshot
     

    Attached Files:

    Last edited: Nov 25, 2017
  26. jason07

    jason07

    Joined:
    May 10, 2011
    Posts:
    34
    I am using Enviro with Playmaker and the SetTimeDate action that comes with it to go between different times of the day. For example, one state is set for early morning and one for the afternoon. They switch between just fine, but the transitions are not smooth, they jump to the different times. Is there a way for the transition between two times to be smooth? Thanks
     
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hello, that issue will be fixed in 2.0.1. Please contact me private and I send you update before store release.
     
  28. Vondox

    Vondox

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

    I am currently quite busy with supporting, but I can send you a modified playmaker action later.
     
    jason07 likes this.
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    Perfect timing for Enviro... purchased! Will this work with UFE? The only camera in my levels will be the fight camera...
     
  30. teroojala

    teroojala

    Joined:
    May 19, 2014
    Posts:
    6
    Thanks, i sent you private message thru this forum (inbox).
     
  31. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
  32. Saiga308

    Saiga308

    Joined:
    Jun 14, 2015
    Posts:
    46
    This is in relation to transparent objects/sprites/particles not rendering against the sky, but display fine if something solid is behind them.

    I have this issue in the latest version of Enviro. Unfortunately EnviroFog.cs is deprecated now, so what's the fix for the latest version?
     
    Last edited: Nov 26, 2017
  33. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
  34. Ryzir

    Ryzir

    Joined:
    Nov 15, 2017
    Posts:
    3
    Thanks, I was able to fix the first issue by following your steps. However, I had no success with the second issue. It looks like light shafts is disabled under player camera, is there another spot I should check?
     
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Strange, that should not happen anymore since 2.0. Enviro image effect uses the opaque queue already. Please contact me private with a few more information what shader not rendering correct on your side.
     
  36. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Please check out the height fog settings in "Fog" category of your profile. One note enviro fog is a global effect, stick with fog volume if you want "boxed" fog for a special area of your map.
     
  37. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Oops, sorry for that, here is a fixed version of the integration. I will add that fix to 2.0.1 and reupload tomorrow.
     

    Attached Files:

    Salja likes this.
  38. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Hm, please contact me private and send me screenshots your main and fps camera. I also can send you link to latest enviro version tomorrow.
     
  39. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Thanks. :)
    I don't have access to the UFE asset. But you can try to use the camera as player too. Or create a empty gameobject for your player and attach it to your camera rig.
     
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    About to try this now. The camera is a prefab so it should work perfectly.
     
  41. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    Bad news. I added this to my project and I got this error. It might be clashing with UFE...

     
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    I am going to try and reimport the UFE asset and see what happens...
     
  43. hengeworks

    hengeworks

    Joined:
    Oct 3, 2016
    Posts:
    11
    The clouds in the latest YouTube video (2.0) look much better than the clouds in the web demo (1.8). Any chance of getting an updated web demo before the sale ends?
     
  44. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    Delete the sample folder from Enviro. Looks like that UFE uses CharacterController class and changed something.
     
  45. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    I've already deleted the UFE folder for now so I can test it. And I am trying to create a profile for one of my levels but the settings aren't saving, no matter what I do :(
     
  46. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    When you saved the profile in runtime and going back to design you have to click "Load from Profile" to get the saved values back into your prefab.
     
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    I think I got that part covered. Trying to get some thick clouds in my scene and my efforts are being thwarted lol... I'll keep playing around until I get the effect I want. Even the moon looks cool... trying to get that to emit light as well.
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    upload_2017-11-26_0-2-53.png

    This is SO DAMN beautiful! And really easy to set up. And it works with real time GI which helps a bit for my level design.
     
    P_Jong and Vondox like this.
  49. Saiga308

    Saiga308

    Joined:
    Jun 14, 2015
    Posts:
    46
    My apologies. After you replied and stated this should not be happening due to Enviro using the opaque queue (which I double checked prior to writing) I started digging deeper in my code. I realized the line renderer and particles were not showing up because I was using a raycast hit to instantiate them based on the transform position, and then the raycasthit position. Since there wasn't any hit when shooting in the sky, they were not being instantiated. After figuring this out and fixing my code, everything is working properly. Sorry to waste your time. It's been a long 13 hour day of coding.
     
  50. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,420
    No problem. Happy to hear that it is working for you! :)