Search Unity

Feedback Volumetric Clouds

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

  1. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    adjust the scene camera clipping plane settings
    for GodRays you need volumetric fog enabled, set the VF distance to high value and base height higher. .


    is this included on the latest beta?
     
  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I've already tried that when I started, doesn't seem to help. The clouds are also not set to local clouds so I'm not sure if it needs a high clipping plane, although I did try setting it to local, no luck.

    The volumetric bit was a good point, but I don't think shadows are working on the master github branch.
     
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    I've only achieved that with cloud layer so far:

    https://forum.unity.com/threads/cloud-settings-shared-by-the-community.1145537/

    But not with volumetric ones
     
  4. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    @pierred_unity Hey, I was thinking if someone knows the answer it ought to be you.
    are shadows functioning correctly in the following video?
    I've tried it with local clouds on and off.
    Terrain has shadows on, and shadows work as expected with cloud layers, but not volumetric clouds.



    Worth noting that I also tried increasing the Density multiplayer, which doesn't really help.
    What ends up happening is, other than cloud visual differences, the terrain just gets a bit darker overall, not by dynamic cloud moving shadows though. it's as if i lowered the light intensity.

     
    Last edited: Sep 8, 2021
  5. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    One thing I noticed in these scenarios:
    Clouds don't have any kind of ambient occlusion right now, it is just too bright at the bottom part (I know we could use the dimmer value but it would remove contribution from whole sky not just bottom part).

    So unreal somehow has a method for ambient occlusion for clouds (Not just for noise details):
    upload_2021-9-8_10-7-56.png
     
  6. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, me colleague fixed the issue recently in this PR already: https://github.com/Unity-Technologies/Graphics/pull/5556

    It should be available in the master branch on GitHub later this week. It'll also offer the possibility to increase the shadow resolution even more.
     
    Ruchir likes this.
  7. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    We're also going to provide polished presets (later this week on github).

    • "Sparse", "Cloudy" and "Stormy" have all received improvement to reduce "blobiness" and repetition in their overall shape, they now have more micro details overall and more random details at their tops
    • the "Sparse" preset is now more representative of small altostratus/altocumulus with the correct altitude range (when using the default altitude overrides)
    • the "Cloudy" preset has been greatly improved with better erosion details, and lower and larger cumulus/stratus clouds, to get a more oppressive look
    • the "Overcast" preset now showcase more density variations and looks better from space, and is more versatile when using custom cloud thicknesses
    • the "Stormy" preset is now much more iconic than the previous one that looked closer to a denser "Cloudy" preset
    • repetitiveness for all presets has been nearly eliminated thanks to both code and art updates


    Some quick screenshots showing "Sparse", "Cloudy", "Overcast" and "Stormy":

    upload_2021-9-8_13-17-47.png
    upload_2021-9-8_13-18-14.png
    upload_2021-9-8_13-18-23.png upload_2021-9-8_13-18-59.png
     
  8. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Couldn't wait, so I applied it manually :D Any hint about how to make the Godrays more emphasized and stick out?

     
    Gokcan and Ruchir like this.
  9. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    • Reduce fog attenuation distance
    • Increase fog anisotropy
    • Increase volumetric contribution from the sunlight itself
     
    Rowlan likes this.
  10. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Most openworld/sandbox projects I worked on in other engines only had 1 directional light, and it was possible to do day/night cycles alright. ;)

    For now, you need to handle the smooth fade out, reorientation, and fade-in of the same directional light yourself to handle these transitions.

    We will be thinking about ways to streamline this. No ETA for it.
     
    DrSeltsam likes this.
  11. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    We're also in the process of adding a big improvement to the "lighting smoothness" of the clouds.

    Previously, you might have needed to raise the number of light steps (Num Light Steps in the Volume component) to get smoother results. Now, after the change of @auzaiffe, only with 8 steps (or even less), you get much smoother results and sometimes less harsh results, for a fraction of the previous cost.

    lightstep.gif
     
  12. DrSeltsam

    DrSeltsam

    Joined:
    Jul 24, 2019
    Posts:
    101
    Thanks a lot for your response, much appreciated! :)

    It's still a pity if the clouds will be limited to 1 directional light only, because then you can't really have scenarios where both the sun and moon are visible at the same time. And it appears to be a bit inconsistent with the physically based sky, which supports any number of directional lights...
     
  13. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    You can still have multiple directional lights. But only 1 can cast shadows, and only 1 can affect the clouds. That's what I meant about "the fade-in and fade-out" above, to only have 1 directional light casting shadows.

    2 suns below, only the left one casts shadows and affects the clouds.
    upload_2021-9-9_17-26-10.png


    To be frank, the moon contribution to the clouds, while the sun shines, is extremely minimal, so the need to have 2 directional affecting the clouds at once is fairly limited for a Moon/Sun scenario. Of course for fantasy scenarios with 2 strong suns at once, this won't be supported, for now.


    Btw, regarding this topic, we'd also just added a Sun Light Dimmer, so this can also be used to reduce the influence of the directional light, either for artistic reasons or logical ones.
    9F4A4768-E9C3-443C-A74D-68689132BA62.GIF
     
    Last edited: Sep 9, 2021
  14. DrSeltsam

    DrSeltsam

    Joined:
    Jul 24, 2019
    Posts:
    101
    This is true, but it's currently still problematic at low sun scenarios (i.e. dawn or dusk), where the sun is still visible, but the moon slowly becomes the dominant light...

    However, thanks for adding the sun light dimmer, this helps a lot to create a good transition :) Now if we could also get a way to define the main light (which was mentioned by @auzaiffe in this post), it would be much easier to create proper day-night-transitions which also play nicely with the physically based sky (if such a flag would exist, we could even create a "fake" light which does not contribute to diffuse or specular lighting and solely affects the clouds, giving us quite a lot of control)
     
  15. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    The latest clouds improvements have been merged into master. Here is a teaser of the improvements. image (63).png image (65).png image (66).png image (67).png
     

    Attached Files:

  16. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    289
    I am really happy with hard works of @auzaiffe and @pierred_unity . Thanks Unity Gurus:) You guys should look into unity terrain and water system as well:) These two are really lack for openworld games....
     
    ElevenGame, LumaPxxx, Kirsche and 2 others like this.
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    When you say master. . . on which unity release this changes will be included?
    it's just been a while since the last time i use SRP directly from github :oops:
     
  18. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I hope this helps:
     
  19. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Last edited: Sep 11, 2021
  20. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
     
    Ruchir and Rowlan like this.
  21. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I could be wrong, but I believe worley noise was only recently added and wasn't always there.
    imo it gives better quality/results.

    The ghosting reduction option is awesome, really helps with fast moving clouds. Although if your clouds are moving slowly, you're better off with it off.
     
  22. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    Nah... worley noise is there from day one.
    and i'm not sure how could it give better quality.
    perlin noise looks more like real clouds.
    i'm feeling lucky they added perlin noise.

    P@GMLEQ}JK}SL2)R3O}TKRJ.png 5L(I{(_[@DL`F04%@B8_JA8.png
     
  23. gamedevpeon

    gamedevpeon

    Joined:
    Sep 12, 2021
    Posts:
    6
    I am hesitant to share any of my work that I am tinkering with(just a prototype anyway) because it is not nearly as good looking as the rest of the stuff in this thread. But I made a very basic day/night cycle. Ive just been laying out the framework and will worry about tweaking values here and there later on and adding things like better ambient lighting, better fade in/out, etc.

    Out of the box I think the clouds look great with hdrp, cant wait for them to work properly with DLSS.



    Right now I am trying to render particles behind the clouds (stars on top of the emissive texture) and having a unbelievably tough time. I know alot of it has to do with transparent images being broken in HDRP right now. And I think the solution is going to force me to learn how to write some kind of basic shader.

    But one of the solutions I tried was to change the render queue of the materials that the particles use, but it turns out that the procedural sky and the volumetric clouds use the same render queue number.

    Does anyone know if there is a easy fix for this, or should I just wait for a update?
     
    PutridEx likes this.
  24. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Regarding this, would it be possible to have this control per light as well.
    For example, I was trying to achieve Red/stylized sunset cloud lighting and with another normal sun light for rest of the scene. I have option to disable the Diffuse and specular effects for the stylized directional light but the main light was way too bright and overpowering the stylized light for clouds. Having control for cloud Dimmer would really help with stylized situation or scripted events in my opinion. :)
     
  25. TekHK

    TekHK

    Joined:
    Jul 30, 2014
    Posts:
    37
    So if we are just using the latest beta of 2021.2 and HDRP 12 - what is the procedure to get this latest Git version? We definitely do not want to be moving projects into an alpha version, but we are already doing live projects in 2021.2 beta 11 so happy to give it a go, but I would not quite know where to look for the GIT versions. Can somebody at Unity help with this to make it easier for us to test the latest features?
     
  26. TekHK

    TekHK

    Joined:
    Jul 30, 2014
    Posts:
    37
    @pierred_unity

    We have been using truesky for a while now and it has a nice feature of a timeline approach for creating custom sequences over time and a method of layering your base sky and cloud layers.

    Any chance we could see something like this built into the timeline so we can make our own animated sequences?

     
  27. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    Unity timeline works really well with many many exposed params.
    you can easily tie in layers for specific elements, other timeline assets, signals/triggers, volumes etc. though it's linear at first glance, once you start building your core components in a modular fashion it really becomes quite powerful.

    we use it in general to centralise our PBS ToD/weather systems, much to the same degree with TrueSky albeit it there is no native XY
     
  28. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Also, it doesn't seem to support path tracing currently.
     
    Walter_Hulsebos likes this.
  29. TekHK

    TekHK

    Joined:
    Jul 30, 2014
    Posts:
    37
    Interesting - thanks for your input - that will give us something to consider!
     
    HIBIKI_entertainment likes this.
  30. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I'm trying to get the following clouds thickness/look in HDRP's volumetric clouds.
    The following I did with an asset called Expanse:



    This is my attempt with HDRP's volumetric clouds, using a week or two old SRP master fork:


    The problem is HDRP's clouds are too high. the Y/cloud altitude. In expanse I just lower the Y position of the clouds. Lowering or upping their altitude. I really hope this altitude problem gets an update.

    In HDRP's clouds, the only option I found is cloud Altitude. When set to even 1, it's still way too high. The images have a high thickness value, when the thickness value is very low, altitude parameter works better.

    Tested with local on and off.

    In expanse there's also setting to controlling the bottom thickness of the cloud, and upper thickness.


    My hope is volumetric clouds will still be improved, not just in quality (I understand the performance focus, and it IS quite fast, and the quality now is pretty nice) but especially in modeling the clouds, without having to use any textures.


    The following is expanses modeling menu, completely game object based:
     
    Last edited: Sep 19, 2021
    Ruchir likes this.
  31. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I like like how clean the clouds look, very little noise when the settings are right.
    The temporal denoising 'Num primary steps' does a good job.

    For my clouds, I need it set to around 33 for a nice clean look. Gets rid of most of the noise, but performance goes up a bit. From approx (wrong) 2ms to 2.7ms, which is an acceptable cost for games. :)

    EDIT: actually it's much faster. Around 1.3ms for a GTX 1070!. I was running it on the wrong resolution.


    I wish time of day was easier to do though.
    Please give us an option to lower the clouds further, cloud altitude parameter doesn't help at all when the thickness value isn't very low.
     
    Last edited: Sep 20, 2021
    Ruchir likes this.
  32. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    In the volumetric clouds in HDRP, you can set the altitude of the bottom of the clouds, and then set the thickness of the cloud volume. So you can set the bottom of the clouds relative to the sea level (0m) and then control their altitude range (like 6000m, or whatever you need). As long as you don't want clouds under Y=0m, you can do whatever you please with HDRP's clouds in terms of altitude range.

    As previously mentioned, we will look into planet center/negative altitudes in the future, as more systems share some of these properties.
     
    Last edited: Sep 20, 2021
    Ruchir likes this.
  33. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    Will there be floating origin support in the future?

    for now i have to clear up all clouds in the sky to hide the switching of world origin.

    it's really a pain.
     
  34. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Same question, will floating origin be supported?
     
  35. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    upload_2021-9-23_14-23-54.png
    Shouldn't the sun be hidden by the clouds covering it up? I realize if i Increase the hell out of the Density option it'll do it. But that gives it a completely different look, a worse one in my case.

    Can we do anything about this? Looks seriously off when the sun is showing up as if there's nothing covering it at all.
    Using latest SRP github (1~ day ago)
     
  36. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Also, the clouds never show up in the scene for me to this day. On beta, github master, and alpha.
    Scene camera's Far plane is set to a very high value.
     
  37. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    What you're seeing can happen in real-life too, when clouds are not very dense (and your density is very low, 0.3-0.4 or higher would be more adequate for such dense clouds):
    upload_2021-9-23_14-4-19.png

    However, at the moment the occlusion of the sun disk's pixels is binary, it's either fully occluded or fully visible. So you can end up in situations like this, where there is a harsh cut visible on the sun disk:
    upload_2021-9-23_14-10-22.png

    This will be looked into in a future release, but will most likely be reserved for the higher quality modes we'll introduce, given it has a higher cost.

    In the meantime, you can play with the flare options on the directional light, you can easily soften some of these artifacts but using a higher falloff.

    upload_2021-9-23_14-17-59.png
     
    Kirsche and HIBIKI_entertainment like this.
  38. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    @pierred_unity I found one more issue/bug with how fog is currently handled by non-local clouds.

    When I decrease the Far clip of camera, fog's effect on cloud also decreases (I am talking about normal fog not volumetric fog) so I can't really decrease my camera's far clip to say like 100 units as this almost completely removes the height based fog effect from screen(making the low quality clouds at horizon visible), this doesn't happen with normal PBS sky though when clouds are disabled, so I think this could be fixed.
    As non-local mode was added to reduce the need to increase far clip of cameras, I guess this prevents me from decreasing it to fit my needs in say small prototype levels.
     
  39. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Some screenshots:
    With far clip at 2000m
    upload_2021-9-23_20-25-26.png


    With far clip at 100m:
    upload_2021-9-23_20-25-45.png
    These are my volume settings:
    upload_2021-9-23_20-11-51.png upload_2021-9-23_20-12-17.png

    When Clouds are disabled, normal PBS sky is unaffected by far clip.
     
    Last edited: Sep 23, 2021
    PutridEx and Lex4art like this.
  40. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Thanks, I'll add a bug.

    Basically the clouds are not receiving enough fog in this configuration. We'll look into this.

    In the meantime, decide if you REALLY need 100m, that's quite a low far plane by any modern standard. The default in Unity's scene view is 10,000m when the dynamic clipping is off. ;)
     
    Ruchir likes this.
  41. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Indeed as @pierred_unity said, there is an issue. I'll look into it when I have a moment
     
    Ruchir likes this.
  42. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I actually spotted this when using dynamic clipping in scene view and thought that it was really distracting when I zoomed in on an object (Alt + right mouse button), the fog started disappearing :oops:
     
  43. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Thanks for the info, I'll try your flare suggestion.

    Although, the clouds's thickness is very high. I believe it should be covered up, but in any-case It doesn't look good, realism aside. It looks good when the sun is constantly blocked and unblocked as clouds move. But currently it looks really off.

    But I also see value in blocking the sun completely as clouds cover it up, especially when the clouds's thickness is very high.
    And although the density is low, when looking at it as a player you will without a doubt feel it's seriously off how the sun is showing up so clearly as if there's no clouds.

    Ideally i don't want to reduce the sun's size to mitigate this, because It looks good when the sun is constantly changing along with the shadows of the terrain.

    Looking forward to the disk occlusion bit you mentioned.
     
  44. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    A little teaser of the latest code.

    Quite some improvements compared to the earliest version. :D

    All these GIFs use the "Simple" presets (Sparse, Cloudy, Stormy, etc.).

    GIF.gif GIF_9.gif GIF_2.gif GIF_7.gif
    GIF_8.gif
     
  45. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
  46. cpkcpk

    cpkcpk

    Joined:
    Dec 13, 2019
    Posts:
    48
  47. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
  48. TekHK

    TekHK

    Joined:
    Jul 30, 2014
    Posts:
    37
    That is looking really much improved! - we are testing at the moment too - one thing, can we ask for a Sun controller with Geographic location/time of day on the Sky Volume?
     
  49. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    You can purchase aggregated astrological and geographical time API data that you can integrate into your own connective code in unity from elsewhere.

    otherwise, a good alternative would be building your own database from the already available, as the databases for these are massive and for games, you can create more simplified data based on your project location(s).
     
  50. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    While it's easy to show off sunrise and sunset while camouflaging everything else, I personally prefer the look of bright daylight. That's where any engine really shines. Great animations nontheless :)