Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. 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. PussSallivan

    PussSallivan

    Joined:
    Apr 28, 2020
    Posts:
    2
    Hi! I am loving this asset!
    I have been trying to use Enviro3's fog with Crest Ocean, but the guide you made for Enviro2 doesnt seem to work anymore: https://forum.unity.com/attachments/enviro_crestocean_urp-pdf.596221/
    The path and file "Assets/Enviro - Sky and Weather/Core/Resources/Shaders/Core/EnviroFogCore.hlsl" no longer exists for Enviro3.
    Is it placed anywhere else? or perhaps is there any other way we can apply Enviro3's fog to the ocean.
    Thank you!!
     
  2. joz_nascimento

    joz_nascimento

    Joined:
    Oct 24, 2017
    Posts:
    29
    Hi,
    Using EnviroLite, afert switch platform to Android, I am getting the error:
    "Graphics.CopyTexture can only copy between same texture format groups (d3d11 base formats: src=26 dst=9)"
    This error doesn't make the program stop, but I get it continuously while the program is running,

    Unity 2020.3.32f1
    EnviroLite 2.4.2
    envirolite_error.jpg
     
  3. gomurae

    gomurae

    Joined:
    Jan 9, 2016
    Posts:
    4
    I am using "enviro sky" in Unity 2019 and I get this error message, please tell me how to solve it.
    "Maximum number (256) of shader global keywords exceeded, keyword ENVIRO_SINGLEPASSINSTANCED will be ignored. You will have to delete some shaders or make them use less keywords."
     

    Attached Files:

  4. yonson_chappers

    yonson_chappers

    Joined:
    Feb 6, 2017
    Posts:
    31
    Hello I had a question about rendering 'on top' of fog. I have some AR 3d models that I wish to always be able to see (i.e. they are not obscured by fog) but I can't create a material or shader to achieve what I want. I've tried various settings is there some sort of UI shader I can use for HDRP/ Lit? THank you!
     
  5. jason0663

    jason0663

    Joined:
    Dec 4, 2020
    Posts:
    36
    Hi, Im using enviro and ambient sounds. Is there a simple way to integrate ambient sounds with enviro day night cycle to trigger sounds at set times such as day and night etc in ambient sounds? Ive seen ambient sounds integrated with day and night cycle that can use the ambient sounds timeline synced with enviro however not sure how to do it. Using unity 2021 universal render pipeline
     
  6. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    320
    Is there a way to fix the render order of Clouds when used with Crest. I am using Eviro 3.

    upload_2023-2-14_12-35-47.png
     
  7. DerikApps

    DerikApps

    Joined:
    Dec 15, 2014
    Posts:
    39

    1 - Graphics.CopyTexture
    Check the reflection settings (Light Probes) that are in the scene.
     
  8. jason0663

    jason0663

    Joined:
    Dec 4, 2020
    Posts:
    36
    Hi, I also have a light switch script for enviro Im trying to use. however its shows an error in console...

    Assets\EnviroDayNightSwitch.cs(27,26): error CS0103: The name 'EnviroSkyMgr' does not exist in the current context

    here is the code

    Code (CSharp):
    1.          using UnityEngine;
    2.          using System.Collections;
    3.            
    4.          public class EnviroDayNightSwitch : MonoBehaviour {
    5.            
    6.          private Light[] lightsArray;
    7.          private ParticleSystem[] PC_Array;
    8.                
    9.            
    10.          void Start () {
    11.            
    12.                      lightsArray = GetComponentsInChildren<Light> ();
    13.        
    14.                      //Adding Particle Arrays as well
    15.                      PC_Array = GetComponentsInChildren<ParticleSystem>();
    16.            
    17.                      EnviroSkyMgr.instance.OnDayTime += () =>
    18.                      {
    19.                          Deactivate () ;
    20.                      };
    21.            
    22.                      EnviroSkyMgr.instance.OnNightTime += () =>
    23.                      {
    24.                          Activate () ;
    25.                      };
    26.            
    27.                      if (EnviroSkyMgr.instance.IsNight())
    28.                          Activate ();
    29.                      else
    30.                          Deactivate ();
    31.                  }
    32.                
    33.            
    34.                  void Activate ()
    35.                  {
    36.                      for (int i = 0; i < lightsArray.Length; i++) {
    37.                          lightsArray [i].enabled = true;
    38.                      }
    39.          ///Gets our new particles for the array like the light above it and turns them on
    40.                      for (int i = 0; i < PC_Array.Length; i++)
    41.                      {
    42.                          PC_Array[i].Play();
    43.                      }
    44.                  }
    45.            
    46.                  void Deactivate ()
    47.                  {
    48.                      for (int i = 0; i < lightsArray.Length; i++) {
    49.                          lightsArray [i].enabled = false;
    50.                      }
    51.        
    52.          ///Gets our new particles for the array like the light above it and turns them off
    53.            
    54.                      for (int i = 0; i < PC_Array.Length; i++)
    55.                      {
    56.                          PC_Array[i].Stop();
    57.                      }
    58.                  }
    59.              }
     
  9. jmedrano-touchto

    jmedrano-touchto

    Joined:
    Feb 2, 2023
    Posts:
    1
    Hi, there seems to be an issue with WeatherParticles when building for WebGL (WebGL 2). Screenshot attached from the sample scene using built-in.

    Screenshot 2023-04-09 at 12.33.23 PM.png

    I'm also seeing this being printed out in the console:

    WARNING: 0:2: 'GL_ARB_shader_storage_buffer_object' : extension is not supported
    WARNING: 0:3: 'GL_ARB_shader_image_load_store' : extension is not supported
    ERROR: 0:15: 'readonly' : Illegal use of reserved word
    Note: Creation of internal variant of shader 'Enviro3/Particles/WeatherParticles' failed.
     
  10. Juneav

    Juneav

    Joined:
    Feb 18, 2017
    Posts:
    23
    Hello there!
    Is there any guide on how to setup (or a demo scene) of how to configure the fly through clouds? Or how to set the additional clouds layer at ground level to simulate mist or volumetric fog? Thanks!
     
  11. UnityGames99

    UnityGames99

    Joined:
    Aug 19, 2019
    Posts:
    8
    Hi, I'm using Enviro lite and just updated the latest version of Unity to LTS 2021.3.23f1 (Android Build) and now I'm getting this error. I'm using sunlight shafts.

    Blit material Enviro/Effects/LightShafts uses dest texture as input, it's an undefined behaviour. Consider using double buffering.
    UnityEngine.Graphics:Blit (UnityEngine.Texture,UnityEngine.RenderTexture,UnityEngine.Material,int)
    EnviroPostProcessing:RenderLightShaft (UnityEngine.RenderTexture,UnityEngine.RenderTexture,UnityEngine.Material,UnityEngine.Material,UnityEngine.Transform,UnityEngine.Color,UnityEngine.Color) (at Assets/Components/Assets/Enviro - Sky and Weather/Core/Scripts/Effects/EnviroPostProcessing.cs:189)
    EnviroPostProcessing:OnRenderImage (UnityEngine.RenderTexture,UnityEngine.RenderTexture) (at Assets/Components/Assets/Enviro - Sky and Weather/Core/Scripts/Effects/EnviroPostProcessing.cs:127)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  12. OddKidToons

    OddKidToons

    Joined:
    Aug 29, 2019
    Posts:
    21
    For some reason the Enviro Sky Rendering script causes all "unlit shaders to be tranparant if the sky is behind them. When its on I can see through my characters. When its off they are solid again. I tried multiple unlit shaders, the default ones that come with unity and 3rd party assets. How do I fix this? Is there a tag or layer issue? upload_2023-4-29_20-57-59.png upload_2023-4-29_20-58-13.png
     
  13. Teolog

    Teolog

    Joined:
    Jun 4, 2014
    Posts:
    4
    Where bug in version 3.05 for Unity 2022.2.17 HDRP
    additional camera render clouds and stars but only black skybox
    This related with EnviroHDRPSkyRenderer.RenderSky function

    Code (CSharp):
    1. skyMat.SetFloat("_EnviroSkyIntensity"
    not called for additional camera so camera sky intensity keeps near 0.8
    this replacement code fixed issue
    Code (CSharp):
    1.  
    2.           float skyintensity = GetSkyIntensity(enviroSky, builtinParams.debugSettings);
    3.             if (!renderForCubemap)
    4.             {
    5.                 Shader.SetGlobalMatrix("_PixelCoordToViewDirWS", builtinParams.pixelCoordToViewDirMatrix);
    6.                 Shader.SetGlobalFloat("_EnviroSkyIntensity", skyintensity);
    7.             }
    8.             skyMat.SetFloat("_EnviroSkyIntensity", skyintensity); //always set intensity to material
    9.  
    Not sure if any additional bugs exist here but this at least fixes second screen sky color ;)
     
  14. Goreduc

    Goreduc

    Joined:
    Jun 26, 2020
    Posts:
    5
    Hello PussSallivan,
    I met the same problem, thanks for your link to the old documentation.
    I adapted the code and it seems to work
    The #include is now :
    #include "Assets/Enviro 3 - Sky and Weather/Resources/Shader/Includes/FogIncludeHLSL.hlsl"
    And instead of "col = TransparentFog( [...]", I put
    col = ApplyFogAndVolumetricLights(col, uvDepth, input.positionWS_fogFactor.xyz, sceneZ);

    Hope it helps !
     
    DreamWayAssets likes this.
  15. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    Hello,

    thanks for the new update! I installed it and now get the following errors, how to fix those?

    Enviro.EnviroManager.instance.Lighting.Settings.globalReflectionsIntensity = 1.5f;

    Severity Code Description Project File Line Suppression State
    Error CS1061 'EnviroLighting' does not contain a definition for 'globalReflectionsIntensity' and no accessible extension method 'globalReflectionsIntensity' accepting a first argument of type 'EnviroLighting' could be found (are you missing a using directive or an assembly reference?)

    Enviro.EnviroManager.instance.Lighting.Settings.globalReflectionCustomRendering = false;
    Enviro.EnviroManager.instance.Lighting.Settings.globalReflectionsUpdateOnGameTime = true;
    Enviro.EnviroManager.instance.Lighting.Settings.globalReflectionsUpdateOnPosition = true;
    Enviro.EnviroManager.instance.Lighting.Settings.globalReflectionResolution = Enviro.EnviroLighting.GlobalReflectionResolution.R512;

    Everything here. I am setting the quality stuff in my own configuration.

    Thanks a lot!
     
  16. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    If anybody interested, it is here now:

    Enviro.EnviroManager.instance.Objects.globalReflectionProbe.enabled = true;
    Enviro.EnviroManager.instance.Reflections.Settings.customRendering = false;
    Enviro.EnviroManager.instance.Reflections.Settings.globalReflectionsUpdateOnGameTime = true;
    Enviro.EnviroManager.instance.Reflections.Settings.globalReflectionsUpdateOnPosition = true;
    Enviro.EnviroManager.instance.Reflections.Settings.globalReflectionResolution = EnviroReflections.GlobalReflectionResolution.R256;
     
  17. ekuNNN

    ekuNNN

    Joined:
    Sep 3, 2013
    Posts:
    22
    Hi, I'm using Envirosky 2.4.2 and it won't let me turn off the twinkling of the stars. Setting star twinkling rate to 0 does not work. Any ideas?
     
  18. FirstPassProductions

    FirstPassProductions

    Joined:
    Nov 3, 2018
    Posts:
    8
    Love the asset!! Purchased a few days ago. I am trying to get weather, time, ect from enviro from another script. i get this error. Maybe you can point me in the right direction! Thank you again!

    Assets\ButterflyAI.cs(4,7): error CS0246: The type or namespace name 'Enviro' could not be found (are you missing a using directive or an assembly reference?)

    LINE 4
    using Enviro.Core;
     
  19. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    233
    Fog Layer 1/2 ? the documentation is just a screenshot of what I can already see.. where is the explanation on how it works? I'm bit a disappointed in enviro 3... as the fog controls are very lacking, height falloff sure, where is distance range fall off? I want fog in the distance but near the camera I want to control it better so it doesn't start until like 500 units away in clear weather.. ie using fog in the distance to hide clipping without making the whole scene look rubbish with faded colors etc.. can't do that, density/height etc are not enough controls for this.. and I really don't want to ditch the whole thing to use a separate package just for fog :(
     
  20. JShuplutonic

    JShuplutonic

    Joined:
    Apr 2, 2020
    Posts:
    2
    So can you use a custom skybox and still have time with day, night and sun moving?
     
  21. k5k5cg

    k5k5cg

    Joined:
    Dec 2, 2019
    Posts:
    4
    Hello, in(unity2021.3,HDRP)
    Opening the Game window and Scene window at the same time, or operating in another windows window, will cause the main light and ambient light to reflect incorrectly.
     
  22. k5k5cg

    k5k5cg

    Joined:
    Dec 2, 2019
    Posts:
    4
    Hello, in(unity2021.3,HDRP)
    Opening the Game window and Scene window at the same time, or operating in another windows window, will cause the main light and ambient light to reflect incorrectly.
     
  23. DragonmoN

    DragonmoN

    Joined:
    Nov 27, 2016
    Posts:
    26
    Hello there, were currently using Enviro 3 in our HDRP based Project and ran into aa issue.
    Mandatory injecting Enviro into the Custom Post Process Orders results in breaking correct Volumetric Fog rendering. Maybe you know a Solution to this.

    It blends the Horizon sightline incorrectly with Volumetrics (Screenshots) and also some Cloudlayers and Objects, if in between Sky and Volumetrics.

    Here some Screenshots with and without Enviro injected.
    Enviro_Day_CPPO_off_.png Enviro_Day_CPPO_on.png
    Enviro_Night_CPPO_on.png Enviro_Night_CPPO_off.png
     
    Last edited: Aug 16, 2023
  24. TigrikGaming

    TigrikGaming

    Joined:
    Oct 2, 2019
    Posts:
    1
    Was wondering if anyone has seen this error or if it's just me and any ideas on how to fix it? This started after I updated and installed to the latest version. I can get it to go away by making it ignore this file but I need it for my weather to work obviously.
     

    Attached Files:

  25. xdanic

    xdanic

    Joined:
    Apr 18, 2019
    Posts:
    1
    Is there a way to lerp between two hours? I havent tried calliing the API, since probably that's not the most optimized, so I wonder if there's a way to tell enviro to fastforward, like a timelapse, mean, like from 6:30pm to 21:43pm in like exactly 5 seconds?
     
  26. lsdrambo

    lsdrambo

    Joined:
    Nov 13, 2013
    Posts:
    5
    Hi, trying to build for the Game Core Xbox One platform here using Unity 2022.3.8f1, Builtin rendering pipeline. My game uses "Enviro - Sky and Weather" v2.4.2.

    I get some weird graphical glitches in the game and I noticed it is also present in the Sample_BuiltIn_Standard from the Enviro package.

    This is what I get on the console (in the editor, everything looks fine) EnviroSkyXBox.png
    If a disable the "Use Volume Clouds" check box in the EnviroSky component (under the Feature Controls/Features panel), then the glitches go away (as well as the clouds :D)


    EnviroSkyXBoxNoClouds.png

    I'll try to test all the cloud options available to narrow down the cause of the issue to something more precise than the clouds, but I was wondering if someone has already found a solution for that. Thanks!
     
  27. cficara

    cficara

    Joined:
    Sep 27, 2017
    Posts:
    35
    Hi! Is it possible to have support for River Auto Material? URP 2021.3 version. Water doesn't have fog applied.

    The integration files they have use old paths and the current documentation example is wrong.

    As @Goreduc correctly pointed out:

    The path
    "Assets/Enviro - Sky and Weather/Core/Resources/Shaders/Core/EnviroFogCore.hlsl"

    no longer exists, should be:
    "Assets/Enviro 3 - Sky and Weather/Resources/Shader/Includes/FogIncludeHLSL.hlsl"

    And instead of
    TransparentFog
    , function should be
    ApplyFogAndVolumetricLights
    .

    Tried to edit myself but the shader is a monster file of 30.000 lines. Any help would be appreciated.
     
    Last edited: Sep 26, 2023
  28. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,406
    Hello everyone!

    I am really sorry that I wasn't active here in forums lately. But I will again visit forums regulary now. However for everyone who was or is seeking support please either send me a mail (vondox@live.de) or join our discord.​
     
  29. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    upload_2023-9-29_22-49-16.png

    Hi Hendrik and anybody else,

    I am working on two games right now, both use reflection probes and enviro also with it's reflection probe.
    In both games (space shooter and minature car race) if it is not too bright I have a strange "additional square shadow".
    I am not sure if it is a general reflection probe problem or a enviro reflection problem (all cars / space ships have both a reflection probe and that enviro reflection probe with all options checked).

    Any idea how to get rid of the additional shadow box without turning reflections off?

    Thanks a lot! Have a nice weekend...

    PS: The black shadow box dissappears when I turn off the Enviro - Reflection probe. Even if I still have the "normal" reflection probe activated (or not)
     
    Last edited: Sep 30, 2023
  30. wayne951001

    wayne951001

    Joined:
    Oct 10, 2023
    Posts:
    1
    I have a question about why the Enviro Sky Rendering LW can't be added to the main camera
     

    Attached Files:

  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,406
    Hello, the Enviro Rendering LW component is only used when you also use Enviro Lite instance and not using URP/HDRP.
     
  32. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    Is there no volumetric light in Enviro 3? Or at least in the settings. If so, can I enable it from or like in the older version somehow?
    I have a volume light cone in my game that looked better before I think :D

    Thank you!
     
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,406
    Hello, there is! It's under fog settings in your Enviro Manager and weather types. You most likely only need to tweak the settings a bit.
     
    Firlefanz73 likes this.
  34. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
  35. denis9994

    denis9994

    Joined:
    Feb 14, 2018
    Posts:
    1
    hi, I bought enviro
    I have imported it into my project and am using support mirror.
    added the mirror player component, as you said on the player prefab
    I also added the mirror integration component, as was said, in third party support

    when I make a game build, with all this, and click on networkmanagerhud "Server Only", and then connect to the server from other clients, then the players have the same weather on the server.

    But if I do everything the same, but build a Dedicated Server, then launch it, and players connect to the server, then everyone has their own weather on the server.
    How to make sure that on a dedicated server build, players connect to it and have the same weather?
     

    Attached Files:

  36. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    Hi Hendrik,

    for my space shooter I want to have one level where the player is "flying high above the clouds". Player in the sky with diamonds :p:D

    Can I somehow spawn/instantiate enviro clouds manually for a certain position and direction?

    Or set the clouds y position to some value below zero just for this level by script?

    With their animations please they really look and animate very beautyful!

    Thanks a lot
    Eric