Search Unity

Feedback Volumetric Clouds

Discussion in 'High Definition Render Pipeline' started by SebLazyWizard, Mar 20, 2021.

  1. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    wm-VR, ElevenGame, LumaPxxx and 9 others like this.
  2. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
  3. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    [FEEDBACK]
    Unless I've greatly overlooked something

    One of our frequent mentions in meetings that keeps cropping up is

    A visual feedback reference for the direction and strength of the wind.

    I'm not sure of the old wind component can be used for this directionally speaking?

    Regardless, this did make sense for us as from project perspective in some cases, we have to match different systems directions that may choose different values to represent their rotations, or generally, if we have our cardinal point represented differently we'd also have to adjust this to match quickly.

    As for different wind speeds at different heights that was something we explored in other ways
     
    Last edited: Feb 19, 2022
  4. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    So... i saw Unity team are working on the Cloud Layer in Github.
    the results are sooooooooo beautiful!
    can't wait for it!
    Thank you for your hard work!
    but i just want to mention some problems about Cloud Layer based on the recent public version in Unity, because i don't think we will have any more chance to have someone in Unity working on Cloud Layer again.

    1. the shadows casted by Cloud Layer are not moving as clouds moving.

    2.please, let the shadows from Cloud Layer cloud be blended with the shadows from volumetric clouds.

    We could only choose one for now.
    small cloud shadow is a key to have detailed and beautiful lighting in huge landscape.
    the shadows from volumetric clouds are too big as they are physically correct, but it lost details and aesthetic.
    we could not use the shadows from Cloud Layer because the shadows from volumetric clouds are important too,
    and the shadows from Cloud Layers is just a repeated texture, it looks odd on far huge mountains.

    3.please add a distance falloff effect for shadows from Cloud Layer, so we won't have oddly repeated shadows on far huge mountains.

    5R0@@56JRJ4M%}R~LIX@GX0.png
    UJ{_C6)H@~%X]UF@CF3P%]P.png
     
    wm-VR and PutridEx like this.
  5. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, I just tried out with the current system, it already works. You end up with an EXR whose resolution depends on your HDRP asset settings for reflection probes (set it to 1024 or 2048 for instance).

    See the steps below, it's very quick. ;)

    upload_2022-2-20_15-4-22.png
     
    XaneFeather likes this.
  6. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, if you have systems with different orientations, you can easily compensate with an offset, by using the "Additive mode" directly in the Volumetric Clouds settings. This offset is added on top of the Global Wind Orientation set in the Visual Environment.

    With the current implementation of the clouds, they move towards +X. But if you want them to move towards -Z for instance, you just need to input -90, and then control the global orientation only with the Visual Environment.

    upload_2022-2-20_15-15-18.png
     
  7. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    With the changes from the great @auzaiffe you'll get much cleaner results (= less flickering/shimmering), without having to increase the number of primary steps. Older presets were more likely to shimmer because of the LUT-based approach we had with some presets not using the full height of the LUT and we had to use a shared 8km height for all presets.

    The new curve presets have a lot more vertical information and this provides more detailed results.
    upload_2022-2-20_16-29-56.png
    upload_2022-2-20_16-29-51.png

    The much reduced altitude range also gives us more stable results overall, and we have a lot less or no more "missed" areas (= horizontal "lines") with the default number of samples (before/after):
    upload_2022-2-20_17-2-29.png upload_2022-2-20_17-2-32.png

    Finally, the new presets are even a tad cheaper than the old ones (at 1080p on a 2070):

    Cloudy Before/After: 0.41ms -> 0.38ms
    Overcast Before/After: 0.4ms -> 0.37ms
    Stormy Before/After: 0.43ms -> 0.37ms

    Notice: the new presets all share the same Shape Scale properties, to allow for seamless blending between presets. The "Cloudy" preset was used as the baseline for these settings, so this means the other presets will have a slightly different distributions of the clouds, but the overall cloud cover isn't going to change radically.

    TLDR: more stable, more detailed, cheaper

    Another little video to show how the blending works, with different wind speed/orientation too:
     
    Last edited: Feb 21, 2022
    wm-VR, LooperVFX, hippocoder and 13 others like this.
  8. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Hey, for #1, the shadows are moving as the clouds (in the cloud layer) are moving. The visual can be wonky because of how the distortion / flow map makes the clouds move but at least in the recent version shadows do move. (If not, please tell us your Unity / HDRP version)

    For #2 and #3, it has indeed been thought about, and it's not totally out of the question.
    I have logged something on our side and it will be evaluated.

    The idea is that, to be able to have #2, you need to have the same behavior for shadows in both overrides (volumetric clouds and cloud layer). Before doing that, we need to be sure that's what we want, since the two system are different by choice at the begnining (like it does make sense to have some tiling for cloud layer but not for volumetric clouds.. etc)
     
    LumaPxxx likes this.
  9. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    Thank you for reply!
    for #1, I did some tests again.
    It's true the shadows from Cloud Layer were moving.
    i noticed the reason i thought the clouds were not moving.
    the shadows from Cloud Layer move much slower than it should be.
    you have to give it a very fast speed to see some movements of shadows.
    you can see the comparison of volumetric clouds shadows and cloud layer shadows.
    the Cloud Layer clouds move faster than volumetric clouds,it's very unrealistic already,
    but Cloud Layer shadows still move much slower than volumetric clouds shadows.
    i guess the best way to fix this is adding a new multiplier for shadow speed.
    my unity version is 2022.1.0b8, HDRP is 13.1.5

    btw,i'm not sure why did my cloud layer start to jiggle,
    it looks like a float precision issue.
    i tried to recreate this in new scene, with longer camera clipping planes and bigger mountain and same volume profiles, no luck to recreate it yet.
    i will do more research for it later.

    GIF 2022-2-21 20-30-58.gif
     
    Matjio likes this.
  10. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,294
    That's Cloud Layer, got nothing to do with Volumetric Clouds. I'm still waiting for Volumetric Clouds to work the same way. Cloud Layer is superior in that regard. Unless I'm wrong, then please someone show me how that works. Thank you!
     
  11. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    I talked about how Cloud Layer could help Volumetric Cloud in this thread before, they took it very seriously and the results are super awesome.
    for now these two type clouds could be blended perfectly already in the Github version.
    https://github.com/Unity-Technologies/Graphics/pull/6828
    i guess they will merge these two systems together sooner or later.
     
    ftejada and DEEnvironment like this.
  12. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,294
    Nice. So that works actually now? I've always had the problem that the cloud layers were in front of the volumetric ones.
     
  13. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Kirsche, Gokcan, sqallpl and 2 others like this.
  14. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Technically, the clouds in the cloud layer are not moving anyway so it's a bit of a fake and guess to make speed of the clouds layer and shadows match. Also, if you change the tiling the feeling of the shadow speed will also change.
    But you are right that right now, there's no shadow speed multiplier to "correct it".

    Very recently, with the latest improvement, an altitude has been added. Since now we know how high they are, this will help to calculate a proper speed (that should match better).
    It will also be re-evaluated soon (along the other things I talked about above).

    lastly, For the jittering it looks like this issue that has been fixed a few weeks ago.
     
    LumaPxxx likes this.
  15. DragonRider

    DragonRider

    Joined:
    Jul 19, 2012
    Posts:
    11
    Some feedback:

    Clouds do not show up at all on Windows 7 with DX11 as the graphics API. I had to set Vulkan as the graphics API in order to see clouds. Might want to look into that and update the documentation to mention that changing the graphics API in the Player settings may be required in order for volumetric clouds to appear.

    I haven't tested with OpenGL yet.

    Why are there two checkboxes next to "Enable" in the Volume Override settings? The second one (the one on the right) is the one that actually turns the volumetric clouds on and off. The first one doesn't seem to do anything other than allow the second one to become clickable. So why is it even there?

    Finding and clicking all of the correct checkboxes is a VERY confusing and tedious process. There should be just one button that enables or disables them across the whole scene. The volumetric clouds override should be attached to the sky and fog volume by default (and that should be where the enable/disable master control is, because it's the most obvious place for it to go).

    After several hours of tearing my hair out in frustration and finally figuring out how to change the graphics API in the Player settings, I finally had clouds.

    Visually, the results are pretty nice. Messing around with custom settings is a lot of fun. The effect itself is quite good and I haven't found any problems with the visuals.

    But the whole thing has the aforementioned glaring usability issues that provide a huge brick wall for which the official documentation is no help whatsoever.

    The process of enabling the effect needs to be streamlined and made obvious (a single check box in an obvious location).

    It also needs to be clarified in the official documentation that not all graphics APIs support the effect on all platforms, and that changing the graphics API in the Player settings may be required for some users (along with some brief instructions on how to do so).
     
  16. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, thanks for the feedback @DragonRider.

    Regarding the API support and Windows 7, this could be a bug, but we'd need more details on your hardware, drivers, etc. to help us reproduce the issue.

    For the "Enable" checkbox: In HDRP, you interact with the volume system by overriding specific properties. This is done by ticking the checkboxes on the very left of the inspector. Certain effects are turned off by default (everyone doesn't need or want "screen space reflections" or "volumetric clouds" or "contact shadows" enabled by default), therefore you need to override the property (checkbox #1 on the left), and then explicitly enable the effect (checkbox #2).

    Currently, enabling the volumetric clouds takes less than 10sec when starting from a brand new outdoor scene:


    I wouldn't qualify this as a "brick wall". ;)

    We might be adding a new "Open World" Scene preset in the near future, with volumetric clouds, cloud layers, large fog distances, etc. This way, you won't have to tick anything by default (you'll still need to override certain parameters if you want to customize them though).
     
    ftejada and TerraUnity like this.
  17. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Regarding OpenGL, HDRP doesn't support it. So you won't be getting anything, not just the clouds.
     
    TerraUnity likes this.
  18. thephox1982

    thephox1982

    Joined:
    Jan 21, 2022
    Posts:
    20
    I would love to see volumetric shadows period in 2021.2.12f1, nothing shows up period, clouds show up and work fine just no cloud shadows. I even setup the Y plane to be same as my terrain, no matter what I set anything to, it just doesn't work!
     
  19. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Last edited: Mar 4, 2022
  20. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    If you want to see god rays from volumetric clouds,you have to:
    1.turn on shadows for volumetric clouds and set the shadow opacity to 1,the distance is better more than 10000.
    2.increase the distance of "Volumetric Fog Distance", at least more than 10000.
    3.increase the "Maximum Height" of fog, at least more than 1000.

    MBQCC8V{7)YM)9YE4O1{S)6.png
     
    Matjio and ftejada like this.
  21. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Apart from the obvious ones (like making sure the volumetric fog covers a large area) mentioned in the blog post, there are a few tips if you still can't see them or you need to increase their quality:
    • make sure the cloud shadows are active, and covers a large enough area
    • increase the volumetric multiplier on the sunlight
    • increase slightly the anisotropy in your fog settings
    • optionally, disable the denoising on the fog or use "Reprojection", as the Gaussian denoising will slightly blur the fog results

    I've attached these settings below.

    godrays.gif
     

    Attached Files:

    Last edited: Mar 4, 2022
  22. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, have a look at the scene I just shared above. Shadows are clearly visible on the ground (and are injected into the volumetric fog).
     
  23. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Hello
    I love working with the new cloud system

    one suggestion for improvement is more about the directional light, during cloud design we try to make very colorful and its great.. however, we start to find trouble with vegetation material that uses diffusion profiles as it gets influence from diffuse color / intensity

    In directional light we do have a toggle “Affect diffuse” however it is only on/off. Searching thru shader code (Lit) I don’t find anyway easy way to deal with this locally within a custom shader as shader feature.

    my suggestion is can we add a bias control for “Affect diffuse” rather than a simple toggle

    or even better have a way to add a local bias control in material and diffusion profiles, the goal would be to strongly influence clouds but not blow out diffusion profiles
     
    ftejada, Ryan-Hayle and TerraUnity like this.
  24. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Thanks for sharing your use case. Do you have any screenshots you could share, so that we can understand the problem more exactly?

    Adding biases to diffusion profiles/materials because you greatly tint the sun to get a particular look for the clouds is probably not the best solution and sounds like it could be a management nightmare, not to mention it might not be very robust for different times of day.

    Based on your description of the problem, I reckon that what you might actually prefer is a simpler Sun Color Override/Multiplier directly in the volumetric clouds properties (on top of the already existing Scattering Tint, and Sun Influence multiplier), so that you can keep your sun light as "true" or unaltered as possible for the rest of the environment.

    However, this is not as simple as it sounds, especially when using the physically based sky which alters the sunlight automatically. This is something we will need to discuss internally with @auzaiffe to see if it's feasible at all, for any sky type, and come up with a UX that is acceptable.

    No ETA nor promises at this stage.
     
    TerraUnity likes this.
  25. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    i will send you a test project in private you can use a as a playground to see different influence from sky color into diffusion profiles

    yes agree its not a simple solution and may could need more discussion with different teams
    i just like to draw the attention now to the relationship from sky color and diffusion profile for vegetation and think about how to solve more easily
     
    pierred_unity likes this.
  26. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Hi,
    For more visiblity, when sharing content with us, please log a fogbugz and attach your minimal project and screenshots.
    If it is not a issue related on your scene's setup/content @pierred_unity won't be able to help you and I won't have access to it to see what is happening.
     
  27. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    if the scene i sent link for in private is a problem you could use any scene that has trees and vegetation with diffusion profiles

    this is a free one from unity
    https://assetstore.unity.com/packages/3d/environments/unity-terrain-hdrp-demo-scene-213198
     
  28. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    DEEnvironment likes this.
  29. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    ok i will get something up later today

    chasing a odd bug related to some fog assets for windows 11 users at the moment that seam to get fog sorting issues from scene camera dynamic clipping in api 12.1.5
     
  30. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    Hi,

    @pierred_unity @auzaiffe

    I've got similar feedback as @DragonRider regarding Windows 7 frome one person. Clouds are not visible in build on Windows 7 SP1 and DirectX11 (Nvidia GTX1660 Ti) (Unity 2021.2.0f1). Clouds are visible when forcing Vulkan at launch. Here is part of the log from simple scene created just for testing the clouds:

    The second error is spammed many times so it's probably related to the issue.

    EDIT: I've sent another build with GPU jobs disabled for testing. The 'ShaderProgram is unsupported...' error is gone but clouds are still not visible.
     
    Last edited: Mar 7, 2022
  31. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    BTW. While checking Win7 screenshots that I've got as a feedback (from test scenes that I made to test the clouds) I've noticed that PBS Sky looks different on Windows 7 than on Windows 10. Left one is Win10, the right one is Win7. It's the same build and same scene (fog and clouds are disabled here).

    Looks like Windows 7 uses DirectX level 11.0 while Windows 10 uses level 11.1. Maybe there are some functions/features missing in level 11.0 that cause those differences and prevent clouds from working?

    Of course Windows 7 is not widely used at the moment but Unity still says that it's supported and some people still use it so I'm posting the gathered feedback here.

     
    Last edited: Mar 8, 2022
  32. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Hello
    I asked this before a few months ago perhaps it was missed
    do clouds have a global texture we could grab for the shadows to use in shaders
    I would like to use it as a mask in our custom shaders for rain and other effects
     
  33. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,358
    Hi,

    I do this effect directly on the shader, for both those shader based volumetric clouds and the fully volumetric image effect ones in Sky Master ULTIMATE and ORION in top video, a compute shader is not required for this effect.
     
  34. Deleted User

    Deleted User

    Guest

    I know u guys are also working on water system but when should we expect this???
     
  35. ashtorak

    ashtorak

    Joined:
    Feb 19, 2014
    Posts:
    53
    What is the best way to implement a day/night cycle (moving directional light) when you are rendering to large resolutions? Currently when I change the angle of the directional light every update, I get this result for a screen resolution of 3440 x 1440 on 2022.1.0b13:
    upload_2022-4-12_14-8-14.png

    On the left with static directional light. 11 ms difference in total.
    Updating every x frames gives laggy spikes. Updating every second or so would be acceptable, but only if you don't move the light much, so that the shadows don't jump much. But it would be nice to have a bit shorter than real life days :D
     
  36. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Anis s
    It's not forgotten and it's on the roadmap yes, but it's not a high priority for now. We'll keep you updated on this thread when it's done.
     
    Deleted User likes this.
  37. cLick1338

    cLick1338

    Joined:
    Feb 23, 2017
    Posts:
    74
    What is the ratio of "Shape Offset" to regular (metric) units? Tried some numbers but couldn't match it well. Would it be a setting-dependent formula? Need it for a (fairly basic, ground level only) floating origin implementation.
     
    JKort likes this.
  38. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Many games only update the sun position once in a while rather than constantly (some Assassin's Creed games for instance).

    Also, you might have to check your Physical Sky settings. Maybe your number of bounces is too high, and/or your update interval is too high. If you have for instance 8 bounces and real-time updates, that might be a recipe for disaster.

    (and using DLSS, FSR or TAAU is also good practice to reduce the GPU hit)
     
    ashtorak, Ruchir and Deleted User like this.
  39. ashtorak

    ashtorak

    Joined:
    Feb 19, 2014
    Posts:
    53
    I think I have it close to default settings. Might have to check, if I messed up something. But the bounces are at 3. Clouds Primary Steps 128 and Light Steps 6.

    Yeah, I was wondering, if it's possible without DLSS. It's not a big issue though. I made it optional for the moment.

    That's what I am doing with it btw:

    upload_2022-4-27_18-35-24.png

    It's a sim of some of the new SpaceX stuff. It shows a cam that is flying up with the rocket on a display while the player is still on the ground looking at the display. I noticed that there is sometimes flickering on the clouds when flying high with both cameras on. But I didn't investigate it further yet, as it not important to fly high.

    Here is also a video where you can see it flying through the clouds around the 9 minute mark:


    The clouds look pretty good so far overall. Thanks! Can't wait for further updates! :)
     
    m0nsky and PutridEx like this.
  40. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Hey guys, just want to know, if "Planet Center Position" unification for atmosphere. clouds and water is coming in 2022?
     
  41. JKort

    JKort

    Joined:
    Sep 14, 2017
    Posts:
    9
    I asked something similar a while back, haven't noticed an answer yet.
     
  42. KYL3R

    KYL3R

    Joined:
    Nov 16, 2012
    Posts:
    135
    Clouds disappear when I press play. The come back when I restart Unity. I thought it's a time-thing, but setting wind speed to 99999 and waiting does not fix it. Also there doesn't seem to be a general "time offset" for the wind? Or is that directly bound to the time?


     
  43. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Thanks for the feedback, if you have the Unity Editor version and the HDRP version, that would help us to investigate :)
     
  44. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
    Can we expect some kind of point-light support?
    I would like to simulate some proper thunderstorms, but lightnings need point lights in order to look reasonably good.
     
    ftejada likes this.
  45. KYL3R

    KYL3R

    Joined:
    Nov 16, 2012
    Posts:
    135
    Unity 2021.3.1f1
    HDRP 12.1.6
     
  46. KYL3R

    KYL3R

    Joined:
    Nov 16, 2012
    Posts:
    135
    Another Thought:
    Is the Volume Framework the best way to offer Volumetric Clouds? Clouds are probably always a global Volume.
    Wouldn't it be better to introduce it as a new "Cloud Shadergraph Material Type"? Like SubsurfaceScattering or the new Water type? The "Cloud Material" would be rendered behind everything and be applied to a sky-quad or sphere.

    The big advantage would be: I could create nice shapes and use my own noise-functions (3D Perlin Noise etc.) and even use the "twirl" Node to generate stunning shapes, easily blend cloud formations etc.



    Are there any plans to combine the new Volumetric Clouds with Shadergraph in a way?
     
    Deleted User and Ruchir like this.
  47. Deleted User

    Deleted User

    Guest

    I think they are already working on something like this https://portal.productboard.com/uni.../c/1431-volumetric-material-with-shader-graph
     
    bb8_1 and KYL3R like this.
  48. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595

    The other approach is leveraging the volume framework.
    Since this could integrate into bigger systems like, TOD /seasons and weather.
     
  49. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Having shader/shader graph support would be great.

    I know there is work going on for a volume shader for the shader graph.
    I don't know if this will also open the gates for it to be implemented with the volumetric clouds as well.
    There are custom clouds mentioned in the description but I think that's just for single objects/volumes of a cloud, to art direct a shot.

    Maybe we can ask for it there?

    https://portal.productboard.com/8uf.../c/1431-volumetric-material-with-shader-graph
    upload_2022-5-16_18-20-1.png
     
    KYL3R and Deleted User like this.
  50. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Thanks, on my side couldn't managed to repro, would you be able to report an issue in the editor and/or provide a simple repro project so that we can have a look?
    Thanks.