Search Unity

[Released] kode80 Volumetric Clouds (Ver 1.1.0)

Discussion in 'Assets and Asset Store' started by kode80, Dec 4, 2015.

  1. stanislavdol

    stanislavdol

    Joined:
    Aug 3, 2013
    Posts:
    282
    setting sub pixel size to 4x4 helps to get stable 90 fps, thx

    Another thing i noticed is that clouds location differ too much for each eye.
    When the distance is so big there should be no difference at all. I couldn't find a parameter responsible for that(obviously changing this for camera is not a good idea as it works perfectly for all other objects)
     
  2. kode80

    kode80

    Joined:
    Aug 1, 2013
    Posts:
    151
    The convergence issue is due to a change in VR projection matrices in Unity 5.4. This is fixed in the develop branch and will be merged into master very soon.

    https://github.com/kode80/kode80CloudsUnity3D/tree/develop
     
  3. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Hello, very nice clouds!
    But I have a little question. How do I draw things behind the clouds? I would like to draw moon and stars behind these clouds so they get occluded by them. I am using particle system for stars. Should I change the render queue in the stars shader or in the clouds shader? Currently the beginning of the stars particle shader looks like this:
    Code (CSharp):
    1. Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
    2.     Blend SrcAlpha One
    3.     AlphaTest Greater .01
    4.     ColorMask RGB
    5.     Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
    Again, thank you for your great asset!
     
  4. kode80

    kode80

    Joined:
    Aug 1, 2013
    Posts:
    151
    The clouds are rendered to a RenderTexture and then composited with the scene as a full screen quad at the far clip distance from the camera. This means that anything in world space will appear in front of the clouds, just like a skybox. If you don't want to create an actual skybox shader, one approach you could use is the following:
    1. Set your particle system to a new layer, for example "Skybox"
    2. Duplicate your main camera, set it's Layer & Culling Mask to "Skybox"
    3. On your original camera, set Clear Flags to "Don't Clear", set Depth to 1 and remove "Skybox" from the Culling Mask
    Using the above, anything on the "Skybox" layer will be rendered first, then your scene and the clouds will be rendered on top.
     
  5. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Hello, thank you for a suggestion, but that is a problem. Deffered rendering modes (both legacy and new) break these things, especially if there are some image effects present. I have already tried it, but the sky always goes crazy. Well... I guess I need to just write a skybox shader, which is quite hard to get the same procedural effects of default sky. Anyways, thank you for your help and effort put in these clouds.
     
  6. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    I have a similar problem, I am using volumetric light solution and clouds are rendered after the volumetric light, is there a way to change the rendering order of the cloud?
     
  7. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Also, is there a way to blur out the clouds? I mean for the sake of making clouds look in low sub-pixel setting. 4x4 seems to bring really good performance, but everything gets pixelated. I can solve this by having a DOF effect with bigger range so sky gets blurred, but it would be nice to get such thing built in (or I am blind and it already is there).
     
  8. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Cascades are a no go unfortunately. The problem is that having shadows rendered at all far distances introduces to many acne artifacts. The issue is bigger the lower the cascade resolution density is. Having cloud shadows in the directional light cookie would eliminate this problem completely.
     
  9. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    At how long of a distance problems emerge? 1000-2000-3000 meters? I also wish to test in my outdoor scene.
     
  10. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    It's hard to say exactly. The issue is with the cascade resolution. If your cascade covers many hundreds or thousands of meters, then there will not be enough shadow resolution to render without horrible acne artifacts. Floating precision issues become a problem too. Unity 5.5 is supposed to introduce a fix to the precision issue at a later date.

    A cookie would sidestep all of these issues.
     
  11. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Again, could I have a screenshot with your scene and cascade setup? It should look something like 1500 shadow distance and with 0.1 cascade 1, 0.2 cascade 2, 0.3 cascade 3 and 99.6% cascade 4 that will be used for the distance. Again I might be wrong but try out with that.

    Shadows.png
    (Attached my setup. I absolutely wanted shadows for my far tree billboards)
     
  12. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    That's fairly close to my setup, except that my world is much bigger and the other cascades are much smaller. General z-fighting issues with shadow mapping acne show at large scales.
     
  13. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hey, anu update on Unity 5.5 beta? The clouds seem to be rendering in front of everything.
     
  14. stanislavdol

    stanislavdol

    Joined:
    Aug 3, 2013
    Posts:
    282
    Hey, I'm a little bit confused right now. What is a current latest version? 1.1.1? Because on the previous page there were talks about 1.2.1 and I don't see it anywhere.
    And how are the optimization tweaks you were talking about? I mean just roughly when should we expect them? Thanks
     
    Last edited: Oct 14, 2016
  15. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    hi

    I am interested in buying the license kode80Clouds, but I have some doubts.

    I am testing the free version ...

    1) Do not make clouds shadow on the scene (terrain, water, etc, etc)?

    2) The color of the clouds are not affected by the color of the ambient light. Do I have to change the color of the clouds manually using script to go coordinated with the ambient light?

    3) This is is most important to me, Your asset can work integrating it in the Asset Azure sky from the store?


    Greetings.
     
    StaffanEk likes this.
  16. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    hi again.

    I've seen that if you can generate shadows with clouds. But other questions remain unanswered.

    I have another question more.

    When I change some parameter of clouds in runtime (eg the color of clouds), I see clouds animation back to the beginning again and all position to begin the cycle animation from the beginning.

    Is there any way to avoid this? If we have to change the color of the clouds manually at runtime because they alone are changed with ambientColor of the Skybox, it is a very big problem if you want to cycles of day and night dynamic ...

    regards
     
    StaffanEk likes this.
  17. exploitedtaken

    exploitedtaken

    Joined:
    Feb 25, 2014
    Posts:
    19
    Hi, I use your Volumetric Cloud and I am having an issue. With Time of Day asset (stars, moon etc ) they can seen through clouds. I think its related to depth but i don't know which one is causing that. (your clouds or time of day shader) I need help. Thanks
     

    Attached Files:

    • wer.png
      wer.png
      File size:
      929 KB
      Views:
      975
  18. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hey, again, any update for 5.5? The clouds are drawn on top of everything. If they're not supported any more, tell us, at least, where the problem might be.

    Thanks a ton!
     
  19. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Z-buffer is inverted in 5.5.
     
  20. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
  21. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    Unity's new TAA seems quite efficient, is there a way to incorporate that into the clouds to improve performance?
     
  22. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  23. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    It's interesting that recent posts also direct to the same issue we have. Is it possible to have the clouds rendering into the camera's depth buffer?

    I want certain objects/effects to be hidden behind clouds.
     
  24. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Are you using Unity 5.5+?
     
  25. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Thanks for pointing that out but No, I'm in 5.4 and already read about the inverted z-buffer. But seems like the clouds are not included in the shader's _CameraDepthTexture!
     
  26. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hm... Weird. I've used the clouds with 5.4 but I've had no problem. Are you encountering this with all objects or only some?
     
  27. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    This happens to all objects so any objects in the scene will be drawn on top of clouds regardless of their distance to the camera. I think the clouds are rendered behind everything just as skybox's behavior and this has been set somewhere in its shader.
     
  28. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Weir that it happens in 5.4. I have that problem in 5.5 when the depth buffer is inverted.
     
  29. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Before 5.5, could you place any objects to be rendered behind the clouds and get them hidden? What setup did you use for that?
     
  30. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    Wow, how did I miss that post! That's exactly what I thought, the clouds quad is located at the camera's far clip distance so the camera's depthmap considers clouds at its farthest value (fully white) just like the skybox.

    Will try to change some settings to see if I can give it an arbitrary value so that any objects further than this value from camera will be drawn before the clouds. Any tips from the developer will help though :)
     
  31. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi

    Is there support for this asset? Almost a month ago I asked about a problem and kode80 has not yet been through the forum.

    Maybe I'm having some personal problem, but if it is not, I think it's a bad support for what your asset costs. I'm seeing that there are people who have problems or doubts and are not resolved

    I was very excited to buy it after using its trial version, despite how expensive it is, but now I do not know if I will finally buy it.


    I ask again what I asked:

    regards
     
    StaffanEk likes this.
  32. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    You need to add a @kode80 so that he sees an alert.
     
  33. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    hi

    Forgive my ignorance but I do not understand well

    Are you telling me that if I put the message here in the forum with "@kode80", does the alert come to him?

    Or do you simply mean to send him a private message?

    Greetings and thanks for replying
     
  34. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    @ftejada

    The forums are a little bugged. It helps to tag who you are talking to. That alert apparently works always.
     
    ftejada likes this.
  35. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Thanks.

    Let's see if you answer soon ...

    regards
     
  36. exploitedtaken

    exploitedtaken

    Joined:
    Feb 25, 2014
    Posts:
    19
    @TerraUnity did it work? Or am I doing something wrong?
     
  37. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,251
    The clouds always stick just on top of the sky and everything is rendered before it. Still didn't have time to tweak any shaders/scripts but I'm wondering why the developer does not help us for this great asset. Also read somewhere there will be fly-through addition to this asset which makes it more amazing but no updates have been made recently.
     
    ftejada likes this.
  38. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    The developer was last seen in August.....
     
  39. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    So, we have to fix the clouds for 5.5 ourselves. Any ideas?
     
  40. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    well if you go into his github and into the develop branch, you will see a version that is 5.5 compatible.
     
    Lex4art and Assembler-Maze like this.
  41. exploitedtaken

    exploitedtaken

    Joined:
    Feb 25, 2014
    Posts:
    19
  42. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    My humble suggestions for this impressive volumetric cloud asset:
    1)Presets (like in PostProcessingStack/SEGI for example). It's really hard to understand and use cloud coverage painting function in first hours - this advanced function is cool but users forced to use this somewhat tricky tool because there simply no other way to get decent clouds. Some presets of various beautiful cloud setups will save a lot of artist nerve on first encounter + editing existing preset often easier way to achieve desired result.
    2)First 8 hours with clouds was mix of excitement and frustration; this negative part mostly produced by my ignorance because there no video tutorial with "How to start makes great clouds in seconds for noooooobs" (only text in docs and text is not for nooooobs). In that forum thread I found announcement of tutorial ("I'm going to be putting together in an in-depth tutorial video over the next week that will demonstrate all of the properties, what they do, how to achieve certain looks and all of the performance tweaks I've mentioned above.") but it was in April XD. Voting for 5+minute video introduction here.
    3)This is not my field of competence but ... why this asset not in store? Looks decent enough :), but hidden in the depths of internet for ~99% of the customers.
     
    Last edited: Dec 7, 2016
  43. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    61
    Thank you for sharing your work @kode80! I just tried it with Unity 5.5.1, out of the box.
    Good looking clouds, nicely interacting with sun, but... the clouds are drawn in front of the geometry (your terrain or my meshes as well).
    I tried to change the shader render queue to background or to override the material queue, with no results. Strange.
    Any suggestion?
     
  44. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    61
    Got it working. Zdepth inversion since Unity 5.5...

    CloudBlender.shader, replace line 52 with:

    o.position = float4(v.vertex.x, v.vertex.y, 1.0-v.vertex.z, 1.0);
     
    genedegsg, internil, kmowers and 2 others like this.
  45. CrazyM1971

    CrazyM1971

    Joined:
    Dec 26, 2016
    Posts:
    1
    Thanks @thieum. I've been trying to find the fix for this myself. Nicely done.

    Also need to do the same in CloudBlenderEditor.shader on line 57 to resolve the problem in the Coverage Editor window.
     
    Last edited: Feb 1, 2017
    Lex4art likes this.
  46. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    These clouds look great! Can you fly through them?
     
  47. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    61
    Good to know. I'm not using this in-house editor btw, just to say that you can play around with Photoshop instead, works fine and much quicker feedback.
    I checked that red channel brings vol clouds in, blue channel seems to cut holes in the haze and horizon effects, green and alpha channel not used apparently.

    No you can't, it's a camera effect applied behing geometries.

    storm.jpg
    The effect remains quite heavy to process, you can spare a lot of fps from the main settings (downsampling). So I'm using it only for figuring a storm, in addition to a more simple clouds plane.
     
  48. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Maybe it will be some-kind of inspirational for long unseen author - here is the scene where these volumetric clouds used (and working good enough!):
     
    thieum and elbows like this.
  49. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    What are the requirements for this asset to work? Unity version and shader model, etc.
     
  50. Nemo_spirit

    Nemo_spirit

    Joined:
    Mar 30, 2017
    Posts:
    1
    I have the version Unit 5.5.2. I have the problem that appears in the image. I do not know why it happens. Does anyone have any ideas? Thank you.
     

    Attached Files: