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

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    hello
    i have this error
    Shader error in 'Enviro/Particles/Additive': failed to open source file: '../../Resources/Shaders/Core/EnviroFogCore.cginc' at line 24 (on d3d11)
    when i updated
     
  2. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Do you have enabled singlepass rendering in unity settings?
     
  3. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yea, only sample scripts classes are currently in a namespace. I planned to add a namespace in a later update but with some kind of guide to update users custom scripts. Maybe already in 2.1.0. :)
     
  4. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hm, please try to rightclick the "Shaders" -> "Particles" -> "EnviroParticlesAdditive" and choose "Reimport".
     
  5. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    thanks fixed :)
     
  6. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    Still fighting the darker nights I have loaded the new profile changed from trilight, flat, skybox and tried adjusting color missing something simple i am sure.

    Also having trouble getting enviro and aquas shader to play nice will keep trying.

    Thought maybe I messed up the dark nights profile and re imported it not much change.


    I made my Triple-Textured Bumpy ENVIRO shader as shown in the PDF but can't find the Aquas materials to add it to. Step 5 in the PDF instructions.

    Progress?

    Shader error in 'AQUAS/Desktop and Web/Double-Sided/Triple-Textured Bumpy ENVIRO': failed to open source file: 'Assets/Enviro-DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc' at line 76 (on d3d11)

    Compiling Vertex program with DIRECTIONAL LIGHTPROBE_SH
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

    Shader error in 'AQUAS/Desktop and Web/Double-Sided/Triple-Textured Bumpy ENVIRO': Can't find include file Assets/Enviro-DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc at line 76

    I can see the EnviroForgeCore.cginc where it wants to find it.
     
    Last edited: Jul 21, 2018
  7. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, do you use gamma or linear colorspace? About AQUAS you need to carefully check the include line:

    "Assets/Enviro-DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc"
    ->
    "Assets/Enviro - Dynamic Enviroment/Resources/Shaders/Core/EnviroFogCore.cginc"
     
  8. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    #include "Assets/Enviro-DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc"
    #include "Assets/Enviro - DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc"

    Both give me same response
    Shader error in 'AQUAS/Desktop and Web/Double-Sided/Triple-Textured Bumpy ENVIRO': failed to open source file: 'Assets/Enviro - DynamicEnviroment/Resources/Shaders/Core/EnviroFogCore.cginc' at line 76 (on d3d11)

    Compiling Vertex program with DIRECTIONAL LIGHTPROBE_SH
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

    I am using Linear color space under project settings/player
     
  9. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63


    Changed to gama and got this.
     
  10. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Hi,
    After I update Enviro to 2.0.4, my scene throws such error.
    "UnassignedReferenceException: The variable weatherMapMat of EnviroSky has not been assigned." Any idea how to fix this?

    And can you tell me what's the proper way to update Enviro?
     
  11. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, you are still missing a space between DynamicEnviroment. About dark night: Please try to set the left half of "Direct Light Color" gradient and "Ambient Sky Color" to black. Or you could use post processing color grading for example.
     
  12. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Oh that is strange, the material should be created on startup. Do you get that error in sample scene too? Or only your scenes?
    Best would be to backup your profile and weather presets and delete whole enviro folder before importing new version.
     
  13. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    Yes I was making a stupid mistake on the spacing that fixed it. I have only one error left:
    AQUAS Object not found! This component will be disabled!
    UnityEngine.Debug:Log(Object)
    EnviroAquasIntegration:SetupEnviroWithAQUAS() (at Assets/Enviro - Dynamic Enviroment/Scripts/AQUAS Integration/EnviroAquasIntegration.cs:96)
    EnviroAquasIntegration:Start() (at Assets/Enviro - Dynamic Enviroment/Scripts/AQUAS Integration/EnviroAquasIntegration.cs:45)

    I tried placing the Aquas Waterplane from my Hierachy for the game object and placing the script on the water effects as well as clicking the integrations.

    Will keep playing with the light settings. Thank you for the help.
     
  14. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Only in my scenes.

    I have already set up Enviro(v2.0.2) in my scenes before I upgrade Enviro to v2.0.4.
     
  15. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Just assign the "Aquas Waterplane" object in your scene in "Water Object" in EnviroAquasIntegration component.
     
  16. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Do you already updated your profile? (There will be a new button in EnviroSky Inspector.) If that does not help you maybe need to replace the envirosky prefab in your scenes.
     
  17. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42

    No, I didn't update my profile before. It does the trick. Thanks for your help. :)
     
  18. RyanDunne

    RyanDunne

    Joined:
    Mar 30, 2017
    Posts:
    13
    It works on builds but not editor, which is strange. Either way I can just toggle it on/off when needed.
     
  19. kweinhold

    kweinhold

    Joined:
    Oct 18, 2015
    Posts:
    10
    Hi, I'm having trouble with raindrops showing up on the terrain underneath the water layer. I have settings collision set for layers terrain and water, and not to include interior. Is there something else I need to set? Thanks. 20180721204916_1.jpg
     
  20. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Hi - can you share any steps you took for Enviro / Hydroform integration? I'm coming over from Aquas, where I had a one-line hack to integrate Enviro fog / haze color into the ocean surface. Have you done the same here?

    Also not sure exactly how skybox should integrate - my planar reflections reflect terrain properly but seem to lose color from the skybox.
     
  21. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    139
    I purchased this for VR use, i cant get clouds to show up in VR mode, and yes im using the VR prefab and VR clouds, rain etc and noting shows up, also iv notice when i try to change settings in runtime the runtime pauses automatically, what am i doing wrong here or does this not have VR support at all?
     
  22. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, if you already got a collider on your waterplane you just need to add the "Water" layer to the particle effects collision module settings ("Collides With"). You can find the effects in prefabs -> WeatherEffects folder.

    https://docs.unity3d.com/Manual/PartSysCollisionModule.html
     
  23. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, do you have assigned correct player and camera in EnviroSky inspector? Please check your camera there should be a component called "EnviroSkyRendering". Please also check that volume clouds are enabled in "Feature Controls" and Weather is set to some cloudy type.

    Please tell me your unity version and vr sdk if clouds still won't show up and I will have look.
     
  24. kweinhold

    kweinhold

    Joined:
    Oct 18, 2015
    Posts:
    10
    Thanks for the reply. Just to be clear, you are talking about the "Collides With" under "Collisions" section of the "Particle System" component on each prefab in WeatherEffects folder. That has Water and Terrain layer in each one. Also, each pond water has a water plane collider. It is a trigger collider with layer Water.

    The settings are:
    Collision Mode: 3D
    Dampen: 1
    Bounce: 0
    Lifetime Loss: 0.1
    Min Kill Speed: 0
    Max Kill Speed: 10000
    Radius Scale: 0.01
    Collides With: Water, Terrain, Border
    Interior Collisions: not checked
    Max Collision Shapes: 256
    Collision Quality: High
    Enable Dynamic Colliders: not checked
    Send Collision Messages: not checked.

    The raindrops still show up on the bottom of the pond, and no raindrops show up on the water (I figured it is because we are using Ultimate Water System). Am I missing something?

    Note also, There are two ponds and one ocean, and a continuous terrain, plus the Border is used only for house roofs (which I had none spawned at the time of the photo). Thus, I don't think the max collision shapes is the problem.
     
  25. icyfrog66

    icyfrog66

    Joined:
    Aug 15, 2017
    Posts:
    8
    Is there a way to increase the range that a particle effect takes place? For example, in one of my scenes, the Snow VR effect is only occurring in the very center of the terrain, and there is no snow falling outside of the region towards the center.
     
  26. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi @Vondox again!
    I have a question: is there a setting that when I change the clouds density it changes instantanely without animation?
    thanks
     
  27. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, I think it need to be a real collider, Please try to disable the "isTrigger" setting. After that you could modify the unity layer collision matrix to disable collisions between water layer and your player.
     
    Last edited: Jul 24, 2018
  28. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Yes, you can increase the radius in particle effects shape module. Those effects can be found in "Prefabs" -> "Weather Effects" folder. As the weather effects will following your player you should not need a very big radius. In general you want as small as possible to get a dense effect without emitting too much particles lowering performance.
     
  29. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hi, maybe try to raise the "Clouds Transition Speed" setting in "Weather" category of your profile. Very high values should look like "instant" changes.
     
  30. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    thanks, but I found with 0 value a better result :|
     
  31. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    It does not change clouds at all when setting that one to zero. :D
     
  32. kweinhold

    kweinhold

    Joined:
    Oct 18, 2015
    Posts:
    10
    That isn't really an option. Couldn't I just do it the other way around and change the particles so that they interact with trigger colliders? What would I need to do to do that?
     
  33. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Sorry not sure, but I don't think that is possible. Enviro uses unity particle systems, so particle collisions are not handled by enviro.
    Why is using a collider a problem? You can configure the physics collision matrix to only react to the particle effects.
     
  34. kweinhold

    kweinhold

    Joined:
    Oct 18, 2015
    Posts:
    10
    FYI, I decided to just create a separate collider on each water surface, set to a layer that doesn't interact with anything in the world other than the rain.

    Changing water collider to a non-trigger collider would require changing how player interacts with it.
     
    Vondox likes this.
  35. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello, unfortunaly a small bug about fog rendering on modified transparent materials went into 2.0.4. I will upload a hotfix to asset store later. In meantime you can contact me here in forums or mail for a small hotfix package.

    Sorry for the inconvience!
     
    sharkapps and Seith like this.
  36. Hypertectonic

    Hypertectonic

    Joined:
    Dec 16, 2016
    Posts:
    75
    Hey @Vondox I'm trying to use Enviro in a VR project and setting up with LIV to do some mixed reality videos, but I'm having some conflicts.

    LIV basically works by cloning the main camera (it deactivates the camera object, then instantiates it, then renables it... and destroys all the children of the clone) so we can have a 3rd person camera besides the player's VR camera. The project works fine until I start up LIV which causes an error on the player camera on the Enviro Sky Rendering script.

    Code (csharp):
    1. MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. EnviroSkyRendering.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at Assets/3RD-PARTY/Enviro - Dynamic Enviroment/Scripts/EnviroSkyRendering.cs:997)
    Which is
    Code (CSharp):
    1.  _volumeRenderingMaterial.DisableKeyword("ENVIROVOLUMELIGHT");
    If I enable volume light it also crashes but on line 993, where the same keyword is enabled...

    If I disable the Enviro Sky Rendering script before I start LIV, everything works as expected (except no sky naturally), but things break if I try to enable it again, which makes me think there's something that Enviro does on enabling that's causing the conflict. Is there some workaround so I can get this to work?

    This is using the latest Enviro and Unity 2017.4.7, using Single Pass (though this makes no difference). Besides this, Enviro works fine on the project.
     
  37. Vondox

    Vondox

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

    please try following workaround:

    1. Set "Player" and "PlayerCamera" to "None" in EnviroSky Inspector -> "Player & Camera Setup".
    2. Remove all Enviro components from your camera.
    3. Create a new script:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class EnviroStartLate : MonoBehaviour {
    6.  
    7.     public GameObject Player;
    8.     public Camera Cam;
    9.  
    10.     void Start ()
    11.     {
    12.         StartCoroutine(StartLate());
    13.     }
    14.  
    15.     IEnumerator StartLate()
    16.     {
    17.         yield return 0;
    18.         EnviroSky.instance.AssignAndStart(Player, Cam);
    19.     }
    20. }
    21.  
    4. Add the new component to a random gameobject in your scene and assign your player/camera here. That should be all. What it does is delay the initialization of enviro for one frame and give LIV time to setup.

    I hope it will solve your issue. :)
     
  38. Hypertectonic

    Hypertectonic

    Joined:
    Dec 16, 2016
    Posts:
    75
    @Vondox this does prevent the clash *if* LIV is already running at the start of the scene (although the 3rd person camera has no clouds rendering on it), but that's normally not how it is used; it is meant to get enabled at an arbitrary point later in the game after everything is working:

    1. Game starts, everything gets setup and works.
    2. At some arbitrary point further in the game, LIV is enabled.
    3. LIV clones VR camera to create an additional 3rd person (non-stereo) camera. (this is where it crashes)
    4. At some arbitrary point further along, LIV is disabled.
    5. LIV destroys 3rd person camera.
    6. Game carries on.

    I suppose the starting point for this would be knowing:
    1. How to setup multiple cameras with Enviro.
    2. How to properly enable and disable those extra Enviro cameras during runtime at arbitrary points.

    This might have already been covered somewhere in the thread but it would be useful if there was some more organized documentation...
     
  39. Vondox

    Vondox

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

    Still don't understand why it destroys the enviro material that are created in Awake or Start, but it looks like creating the material in OnEnable will solve the compabillity issue.

    But I think we have another issue here that isn't handled correctly by enviro right now. Rendering a VR singlepass camera and a non vr camera at the same time isn't working right now. But I will have a look to support that now and include that in next update and send you a package.

    You can add the AdditionalCamera component to support multiple cameras with enviro. In a normal usecase you can enable/disable the enviro camera component in runtime without any issues. Not sure why it does not work with this LIV plugin, but creating the material in OnEnable fixes that issue.

    Edit:
    Fixed the rendering of singlepass vr camera and non vr camera at the same time I will send you a hotfix package now for your to test this in your project.
     
    Last edited: Jul 30, 2018
  40. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hello there,
    I am trying to use World Streamers Lighting Manager as seen below on the left so I could apply it to all the sub-scenes that would get streamed but Enviro automatically puts the Enviro / Skybox object into the scene's lighting and if I click it there is no prefab in the project for it, so I am not sure how to put it into the World Streamer Lighting Manager box so I can apply it to all the scenes? Do you have any idea how to accomplish this?


     
  41. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    Hello,
    you could create a material and assign the Enviro/Skybox shader. Now set SkyboxMode in EnviroSky Inspector -> Edit Profile -> Sky to "Custom" and assign your material in CustomSkybox field.

    I just tested this and noticed that with latest update the moon and stars intensity won't update when trying this. I send you package to fix that. :)
     
  42. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    Hey Vondox!

    Incredibly amazed by the rate of you supporting your amazing plug-in here.
    I'm an absolute newbie when it comes to the techniques you've used to realise this brilliant plug-in.

    If you don't mind, may I ask you a couple of questions too?

    We're using your plug-in to built a world for VR, and I've noticed you have included a special VR version of your plug-in. However, we haven't experienced any downsides to working with the regular one in VR, everything looks as brilliant as on a 2d screen.

    Especially since the VR version (at least out of the box without configuring) seems a tad less impressive. Do you have some documentation (or maybe you've answered this question for another noob before)

    1.What are the differences between the Envirosky and Enviro Sky VR prefab, and does checking single-pass VR have another additional impact?

    2. What are the steps to get envirosky working with Aquas nicely?

    3. Does envirosky include fog? If so, can that fog be configured to appear at a certain radius (for rendering optimisation)

    Thanks!
     
  43. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    On a headless server I get the following error:
    RenderTexture.Create failed: format unsupported - 14.
    UnityEngine.RenderTexture:INTERNAL_CALL_Create(RenderTexture)
    UnityEngine.RenderTexture:Create() (at C:\buildslave\unity\build\artifacts\generated\common\runtime\TextureBindings.gen.cs:1171)
    EnviroSkyRendering:ChangeResolution() (at C:\Users\Jesse\Documents\repos\Unity\exile\Assets\Enviro - Dynamic Enviroment\Scripts\EnviroSkyRendering.cs:328)
    EnviroSkyRendering:Awake() (at C:\Users\Jesse\Documents\repos\Unity\exile\Assets\Enviro - Dynamic Enviroment\Scripts\EnviroSkyRendering.cs:213)

    Any ideas how to resolve that?
     
  44. Vondox

    Vondox

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

    the VR prefab just got a different setup, that should be more suitable for vr. Especially for the volume clouds and particle effects. For example the clouds does not use downscaling (downscaling often looks bad in VR), but therefore using less complex clouds formation to still get acceptable fps. Still I would use the flat clouds for VR as they are way cheaper to render, so you get more room for an impressive scene.

    If you check the unity VR/XR settings you can decide between multi and singlepass. Multipass is slower but has a better compatibility. SinglePass is faster, but your assets need to support this feature. Water assets often working not that great in singlepass(Reflections!). So only check that option in Enviro when using singlepass rendering mode. :)

    There are two steps required to get best results with enviro and aquas. First would be using the Aquas integration component. Just add that on a random gameobject and assign your aquas water gameobject. Second would be to modify the aquas shader to correctly work with fog and volumetric lighting. There is a step by step pdf guide included. (Enviro folder -> Scripts -> AQUAS Integration).

    Sure enviro got a fog effect, but it won't save any performance by itself. It is a post processing effect that will be added after scene was rendered. You still can use it to more naturally limit your viewdistance. Maybe check the enviro fog settings and raise the "Max Fog Intensity" to make fog hide your far away scene. You also can configure the density of fog in each weather preset. Now you could limit your viewdistance and save performance.

    Best Regards!
     
  45. Vondox

    Vondox

    Joined:
    Jun 3, 2013
    Posts:
    2,422
    That component (EnviroSkyRendering) should not be active at all in server mode. I will have a look if there is something wrong in latest version as it should not get added when using the StartServer function. I also will add an additional check now to deactivate component on awake if we are in server mode.
     
  46. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I have the component added to a camera, to set the component order between other components, so that's probably why.
     
  47. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    Try reimporting envirosky's shaders. I just experienced this Unity bug and this fixed it for me.
     
  48. RyanDunne

    RyanDunne

    Joined:
    Mar 30, 2017
    Posts:
    13
    Put a build on PSVR, the clouds keep pulsing on and off in a random pattern. I have no update weather and time isn't being progressed. PC (non-vr) build and Editor works fine, it's just PSVR. Anything I can do?
     
  49. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    Hi! Thanks for your helpful reply!

    When I went to follow your steps I noticed a slight discrepancy in the AQUAS tutorial that's giving me a headache. In the 4th step of the tutorial it states to add the following:

    4. Now we need to add the „TransparentFog“ function to calculate fog and display our volume lighting texture.

    Search for this line:
    float3 finalColor = diffuse + specular;
    And add this line right under:
    float4 finalFogged = TransparentFog(float4(finalColor, 0), i.posWorld.rgb, i.projPos.xy / i.projPos.w, i.projPos.z);

    First of all, there are 2 lines with exactly this string: float3 finalColor = diffuse + specular;, but based on the context of the sample image I could find the correct one, even though the sample image seems to be for 1.4.

    I have the shader compiled, without errors, but my water is greyish, like there is a dull filter on it, milky. First I figured that this might be fog, but then I noticed that it didnt change as I got closer


    Screen Shot 2018-08-01 at 16.04.50.png
     
    Last edited: Aug 1, 2018
    pango likes this.
  50. Vondox

    Vondox

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

    thanks for your report. Looks like I forgot to update the image here. :/ However there is a bug with transparent fog function right now I mentioned page before. Looks like that you deactivated conservation here in forums. Please contact me in a private chat here or send me a mail, so I can send you a hotfix. Just import and you should be good to go.

    Sorry for the inconvenience!