Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Volumetric Clouds

Discussion in 'Assets and Asset Store' started by Eideren, Oct 20, 2014.

  1. JustZht

    JustZht

    Joined:
    Apr 5, 2015
    Posts:
    16
    Hi, Thanks for this amazing asset.
    I have some problem importing this package when targeting Android (But a fresh import on Standalone target is working). Is mobile support dropped in the 2.0+ version? This is the shader compiler log :
    Code (CSharp):
    1. Shader error in 'VolumetricCloud': 'distance': no matching 2 parameter intrinsic function; Possible intrinsic functions are: distance(floatM|halfM|min10floatM|min16floatM, floatM|halfM|min10floatM|min16floatM) at Assets/VolumetricClouds2/Scripts/VolumetricCloudsCG.cginc(656) (on glcore)
    2.  
    3. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DYNAMICLIGHTMAP_OFF _NORMALMAP _SKIPPIXELTWICE
    4. Platform defines: UNITY_NO_SCREENSPACE_SHADOWS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3
    5.  
    Code (CSharp):
    1. Shader error in 'VolumetricCloud': invalid subscript 'posWorld' at Assets/VolumetricClouds2/Scripts/VolumetricCloudsCG.cginc(656) (on glcore)
    2.  
    3. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DYNAMICLIGHTMAP_OFF _NORMALMAP _SKIPPIXELTWICE
    4. Platform defines: UNITY_NO_SCREENSPACE_SHADOWS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3
    5.  
     
  2. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey, mobile is still supported but not really recommended though since it still is heavy on perfs'.
    I sent you a PM, tell me if that worked !
     
  3. mlsptn

    mlsptn

    Joined:
    Jul 27, 2016
    Posts:
    7
    Hi Eideren,

    I just updated to Unity 5.5 and the new version of Volumetric Clouds. I asked a question before about the clouds reflecting changes to the skybox (such as atmospheric thickness). In the previous version, this worked if I added a light probe group in the scene. With the new update, the clouds don't respond to any changes in the skybox even though there is a light probe group in the scene. I'd appreciate any help!
     
    Last edited: Sep 26, 2016
  4. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hi, I can't really support Unity beta's until released, I might take a look at it if you have any errors or warnings but I suppose it's unity breaking support by changing their standard shader code again.
     
  5. mlsptn

    mlsptn

    Joined:
    Jul 27, 2016
    Posts:
    7
    Ah, understood. I'll try it 5.4.1 and let you know how it goes.
     
  6. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
    Hi, Amazing asset, but I am having some problem with VR. I am using HTC Vive.

    I saw in an earlier thread that someone reported that the shadows were not behaving in VR. I don't know if it's the same problem I have. The shadows for me are not in stereoscopic. Or maybe they are, but they are not currently rendered, so there's a strange depth offset when I look at the shadows of the clouds. They are not at the distance that they are supposed to be, which makes the shadows look like they are popping into the foreground. The clouds are OK though. was there a fix for this? please help! thanks,
     
  7. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hi, I don't have an HMD to check but we could always try a couple of things.
    Is "Single-Pass Stereo rendering" enabled under Project Settings>Player ? Try with and without it.
    If you change the target eye on your camera from "Both" to only one of them are they still rendering incorrectly ?
     
  8. TheTaj

    TheTaj

    Joined:
    Jun 26, 2014
    Posts:
    24

    Hi Eideren, the clouds look fantastic, but I'm currently unable to get them working on Unity 5.4.2f2 for the Google DayDream.
    I've seen others manage to convert the shaders to function in VR space, is this achievable on the DayDream? For some reason the build is having issues with the shader, it shows as an all-pink screen in-game.
     
  9. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey I sent you a pm, replace the file inside your project with this new one. Tell me if it worked !
     
  10. Strauchninja

    Strauchninja

    Joined:
    Nov 24, 2016
    Posts:
    2
    I just bought your plugin, but cant use it. Just walked through the manual. but after attaching the script to the camera an applying the "Volumetric Clouds HighQ" material the whole screen turns pink. I looked at the shader and there is an error, maybe you know how to fix it?
     
  11. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
    is there a way to just turn off the shadow altogether? In case I cannot fix this problem with the shadows being not stereoscopic, I will just turn them off for now. thanks.
     
  12. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
     

    Attached Files:

  13. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    To disable shadows click on the material used to render the clouds, in the inspector find "Screen Space Shadows" and toggle it off.

    1. That's probably the depth-map being badly mapped.
    2. It was only to check whether they where accurate when rendering once on the vive and I guess that they are.
    I'll have to find a way to emulate an HMD to fix all of that, unity doesn't render in HMD mode if we don't have one.

    That's weird, what version of unity are you running on ? MainLight comes from unity's standard shader and its only occurrence uses a single parameter, did you modify the standard shader ? Could you run it inside an empty project ?
     
  14. Strauchninja

    Strauchninja

    Joined:
    Nov 24, 2016
    Posts:
    2
    The Unity version is 5.5.0f3. We did not modify any shader. We tried to run it inside a complete new empty project, same thing is happening. We also tried to add the standard shader to the unity grapics preferences. no changes for that.
    Any other ideas?
     
  15. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Alright my bad, Unity changed their standard shader again. I sent you a fix, check your PMs !
     
  16. Mephesto_Khaan

    Mephesto_Khaan

    Joined:
    Jun 2, 2013
    Posts:
    47
    Hi Eideren, your clouds look really nice! Does it work in VR well? Being distant clouds can I render them monoscopically so I dont have to render them twice?
     
  17. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hi, if you can mix mono and stereo camera rendering in VR then yes you can. Using a camera to render the clouds and another for your standard stereo rendering then play with clear flags to layer them correctly but as said before, I am not certain that VR in unity allows that, you'll have to try it yourself, a couple of unity cubes and two cameras with different culling masks and clear flags should be enough.
     
  18. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
    I am having a weird problem. I created a build from unity, and I passed the build files to another computer for my friend to test. When he runs the build on his computer, he cannot see the clouds at all. He can, however, see that when he flies through where the clouds are supposed to be, the screen would go white, as if flying through the clouds, but otherwise, the clouds are not visible at all.

    The every same build on my computer runs perfectly OK, I can see all the clouds just fine. I am not understanding how the same build can appear so differently on two different computer? Please help?

    I am using Vive and unity 5.4.0
    thanks,
     
  19. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    It's only in editor, right ? Is your camera in orthographic mode maybe ? Besides that I don't really see a reason, compare your graphics settings and unity player settings just in case.
     
  20. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
    no actually this is happending in Build. Not in editor mode. Both computers running a build, but showing very different result, one with clouds and one without. I am going to have to do without the asset for now and come back and revisit this, maybe after I upgrade to unity 5.5.
     
  21. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    It might have to do with depth-map support, what are you running it on ? Here's the requirement of depth texture, at least 90% of PCs support it by now though.
     
  22. nickyoso1

    nickyoso1

    Joined:
    May 2, 2011
    Posts:
    85
    Hi, I'm also experiencing the MainLight error in Unity 5.5, any chance you could send me the fix as well?
     
  23. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey, sorry about that, check your PMs !
     
    nickyoso1 likes this.
  24. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
    can you please also send me the fix for unity 5.5? I just upgraded to 5.5, I am getting the Mainlight error as well. will you be just updating your asset on the asset store sometimes soon?

    I get the mainLight error, and also the materials for HighQ and LowQ both are just complete purple on the material view, and the game view. I am assuming it's related to the mainlight error?
    thanks.
     
  25. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Yep, the first post on this thread mentions it. The package was submitted to unity's asset store team around 4-5 days ago, they might be too busy since it's almost christmas.
    Check your PMs !
     
  26. dhuang

    dhuang

    Joined:
    Jan 5, 2016
    Posts:
    40
    Hi, I am still having this problem with the clouds not visible in some computers (in a build, not editor). you mentioned it might have something to do with depth-map support. Does that mean that's a hardware problem, so that particular computer doesn't have the hardware to support depth map? do they need to update their driver? that computer is running a 1080 GTX nvidia card. The clouds don't show up in the build (except when flying through the clouds, just blocks the camera completely in white while inside the clouds).

    I am using a GTX 980ti. the clouds show up on my computer.

    does that mean there's nothing I can do on my end? changing anything in unity setup or in the scripts? Please help, I am not familiar with the camera depth issue and how to manipulate them in script to make it work. I love your cloud effects but if it doesn't work on all the computer, it would really take away from the game. thanks,
     
  27. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    A 1080 should be completely fine, I didn't test it on one but there's no reason for it to fail that badly on a newer HW generation. Are you certain that there isn't a single difference between the build that is running on your computer and the one on the other ?

    There aren't that many reasons for this issue to persist, either the depth map isn't setup or there's an invisible piece of geometry in front of the camera which writes to depth or the material fields aren't setup correctly (Draw distance too short, steps max too low), but all of those can't possibly change between your two setup if the build is the same.

    Just to be sure update your drivers and verify that the console doesn't report any error or warnings.
     
  28. Rave-TZ

    Rave-TZ

    Joined:
    Jul 21, 2013
    Posts:
    77
    I'm having a difficult time getting the clouds to render. I sometimes turn off Occlusion Culling, other times I set the camera to Deferred (which I can't use for my project), and its always hit and miss. Most of the time the clouds are simply not rendering. I'm trying to get this working in the editor. Havent tried it in a build yet. I do get illumination when its near the point light. I'm on Unity 5.5 using a 1080GTX

    Another thing that seemed to make a difference was setting the camera to Solid Color instead of Skybox. This would sometimes kick the cloud rendering on.
     
    Last edited: Jan 16, 2017
  29. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey, did you try to increase the "Plane Offset" field inside the script's inspector? Uncheck "Hide Plane" as well to confirm that you can see clouds through the editor's camera from a game's camera.
     
  30. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    105
    I bought this cloud package a month ago and I've really enjoyed it! I have a question. Is possible to have random Z/W Dimensions or Tiling variance each time at runtime? Every time I launch the scene, I see the same cloud shapes and position. It takes a bit away from the immersion.
     
  31. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    There you go : https://drive.google.com/file/d/0B0IqUaawrTWnZFp4ODE5XzZGc0k/view?usp=sharing
    Drop it anywhere and fill in the material field.
     
  32. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    105
    Thanks for the fast reply!! I placed this script in, just beneath the cloud component. For some reason it's overwriting the settings in my material on launch. I'm not sure what's wrong. Any obvious ideas why this might be? Thanks again!
     
  33. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey, no problem !
    Well, that's how materials works by default ; their values are always saved in both play and editor mode so when it randomize material values they will stay that way until you change them yourself or re-randomize them.
    I don't really see why you would want to get back initial values since they will always be randomized on start ?
     
  34. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    Hey we have been using the Volumetric clouds for a while now.

    Is there any way make the clouds go along Y and X axis. EG From bottom to top of the scene?
    Basically for our project we have a character and a camera directly in front looking at the character and we want the clouds to be in the background (from top to bottom) behind the character. I understand that we can rotate our character and camera setup but it throws off a lot of our Kinect sensor calculations.

    In the older versions you were able to rotate the Plane to whatever angle you wanted. However in the new package the clouds go along Z and X axis with no way of rotating it. Also setting it to a Sphere setup doesnt have the desired effect.

    For now I am just using the old 1.4a package but it would be nice to be able to use the new reworked version of the shader with perhaps a Horizontal of vertical option for the clouds?


    Thanks!
     
  35. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    105
    Sorry I was thrown off by the density and wind variables, now I understand. Thank you! I'm noticing one last thing. The randomization is applied to the material when I launch my scene, as desired. Though if I stop the scene and play it again, it doesn't get randomize again beyond the first play and values are locked in. I'm looking for a random 'seed' each time on play basically.
     
  36. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    I checked on an empty project and it does pull new random values on each play, you might have another script that is setting the global seed for unity's randomizer though. Or maybe you meant pause instead of "stop the scene" ?
    For the first one you could add :
    Code (csharp):
    1.  
    2. Random.InitState((int)System.DateTime.Now.TimeOfDay.TotalMilliseconds);
    3.  
    to line 48, right above
    Code (csharp):
    1. if (windDirection)
    But you should still look into your seed not resetting on play issue since that could interfere with the rest of your game.

    Hi, so that's actually far more convoluted than just rotating a gameobject ; most of the code is optimized with and depends on the fact that they are projected onto that axis. I'll see what I can do about that but I can't really promise you anything.
     
  37. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    105
    Seems I just had the script in the wrong location. Once I moved it to the parent of the Camera, it then worked. Cheers!
     
  38. WolfdogInt

    WolfdogInt

    Joined:
    Nov 3, 2015
    Posts:
    1
    Hello, When I imported these assets i got exactly the same shader errors as Thetaj. Can you help me with this?
     
  39. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    255
    Hello, I just bought the asset. Really surprised how good it is!
    I have a feature request though.
    In my scene I have tried creating a secondary layer of clouds. This works with two separate cameras each rendering their own clouds. But no matter how I set it up, one of the cloud layers are always rendered behind everything else, which makes sense.

    Is there any other way, or would it be possible to extend the shader to allow a secondary cloud layer on another height?
    Additionally, can fog be added to clouds?
    Thank you
     
  40. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey, that error has been patched since more than two months now, are you using the latest version ? If you are then what version of unity are you running on + your graphics API (opengl/DirectX/...) ?


    Hi, thanks !
    I extended the script to allow two of them to co-exist, check your inbox !
     
  41. KimLaughton

    KimLaughton

    Joined:
    Feb 4, 2017
    Posts:
    3
    Hi - love the effect, but having problems with VR (Vive). In single pass rendering (which I have to use because the scene is part of a group project) I get the glitch shown in the pic. Wondering if there were any work arounds for this?

    clouds.JPG

    It's as if there is a cutout moving separately from the camera...
     
  42. BetaJester

    BetaJester

    Joined:
    Oct 12, 2016
    Posts:
    3
    I've got the main light error as well :/ 5.5.0f3
     
  43. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey, just tried it out under 5.5.0f3 and couldn't replicate this error using this asset's latest version in any of the available APIs, are you certain that you are using this asset's latest version ? The update mentioned in the text you quoted is available since mid-december ...
    If that didn't change anything, could you send me the entire error and your specs ?

    Hey, I am working on it right now, I'll PM you with a fix soon.
     
  44. lokeuei

    lokeuei

    Joined:
    Mar 18, 2014
    Posts:
    4
    trying this on Unity 5.6 beta and I think there's another shader problem. When I attach the material to Raymarched Clouds script, it shows me these errors:
     

    Attached Files:

  45. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    @Eideren I'm having the same problem in single pass VR, did you end up finding a solution?
     
  46. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Sorry about the delay everyone, I had a couple of issues with my ISP.

    That user never replied back to tell me if what I gave him fixed his issue, I'll send you the stuff I sent him in PM.

    So, I was going to ask you to wait until 5.6 comes out of beta since I can't predict whether or not they will change their code on release but I did end up taking a look at it just to see if it was an easy fix and, sadly, no it isn't ...
    Using 5.6 beta breaks two major functions I was using to keep it aligned with the standard shader, I already fixed some of it but another issue came up and I will have to replace a big part of unity's code with my own to support GI.

    But 5.6 isn't released yet so I won't be doing that until Unity's changes are permanent, sorry.
     
    punk likes this.
  47. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Thanks bro, I'll test it tommorow and get back to you
     
  48. lokeuei

    lokeuei

    Joined:
    Mar 18, 2014
    Posts:
    4

    no worries! totally understand having to support beta code. I'll wait for 5.6 to get out of beta and when you have made the changes. thanks!
     
  49. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hey guys, the new version has been uploaded to the asset store, here's the change log :

    // Version 2.3
    Added/Modified :

    • Lighting computations are at least twice as fast now at the cost of an almost un-noticeable visual degradation.
    • Slight improvement of some raymarching functions leading to a very small overall performance improvement.
    • Variable to control clouds's bases flatness.
    Fixed :
    • "Holes" in Single Pass VR.
    • Compatibility with Unity 5.6.
    Removed :
    • Skip pixels controls ; was degrading most GPUs performance instead of helping because of how GPUs are architectured.
     
    Last edited: Apr 8, 2017
  50. i9mobile

    i9mobile

    Joined:
    Aug 8, 2013
    Posts:
    54
    Hi, your package is very impressed (based on youtube video since I haven't purchased yet). Can it display more realistic clouds, because they look a little cartoon on the video. I'm looking for something like this: