Search Unity

Feedback Volumetric Clouds

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

  1. FriendAndFoeInfo

    FriendAndFoeInfo

    Joined:
    Jul 3, 2018
    Posts:
    1
    100%! Being able to author/place individual cloud volumes would be really cool, it would help a lot with compositing level design, like having mist around mountains, space nebulas, etc.
     
    Ruchir and PutridEx like this.
  2. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    We'll probably look into multi layer clouds and/or individual clouds at some point in the future.

    For now, you can already achieve it somewhat with the Advanced or Manual mode. Create your own cloud coverage maps and you get to place clouds wherever you want. Then you can tile them and offset them as you like. You can even feed it a render texture iirc, so the possibilities are huge.

    So indeed it is a texture-based approach and not yet a GameObject-style manipulation for each individual cloud, but with a bit of elbow grease and understanding that ultimately you deal with a single large volume rather than an infinite number of small cloud volumes (think about the cost), it's still doable, especially if the use case is to "have many clouds on the edge of the playable area". For instance you could paint a black circle on a white background as a starting point for your cloud coverage map and iterate on it.

    We'll provide more examples for the Manual and Advanced modes in the upcoming months, as they require more time and also artistic sense to set up than the quick presets offered in the Simple mode.
     
    Ruchir and FernandoMK like this.
  3. MarcelArioli

    MarcelArioli

    Joined:
    May 31, 2014
    Posts:
    28
    Thanks for the detailed answer!

    It sounds indeed like a temporary workaround that might work. I'll give it a try once I don't have entity-package compile errors regarding subscenes after porting my project to 21.2 ;)

    My concerns would be though, that this workaround is quite limited (I totally get the performance argument of course) in terms of flexibility (what if I want to open a section ? I woud have to do a texture swap and design all these textures i guess...)

    Another concern is the height flexibility. The textures are 2D right ? my game would require more of a 'sphere' inside a cube 3D texture than circle on square. (In general, setting the height of cloud areas would be quite the feat for me)
     
  4. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, the height profile of the clouds is controlled by the cloud LUT in the manual mode. If you paint a LUT that looks like a "U" that fell on its left side, you can create exactly that sphere effect you're after, while still having other types of cloud that you can define on the left part of the LUT.

    See the doc for the LUT: https://docs.unity3d.com/Packages/c...n@12.0/manual/Override-Volumetric-Clouds.html

    There are a couple of LUTs available in the package, you can experiment with them. And we'll provide more examples as the release of 2021.2 approaches.
     
    MarcelArioli likes this.
  5. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Where are the LUTs located? I wasn't able to find them :p
     
  6. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    Yeah, I feel dumb for asking.. but I can't find the LUTs either. I also saw a previous post that said there were some default noise textures too, but don't know where those are either.
     
    Ruchir likes this.
  7. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I think unigine 2 has a volumetric cloud System similar to what unity is making and is a good reference point for the user facing controls and the quality settings:
     
    FriendNFoe and Gokcan like this.
  8. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Look for the LUTs in the package. Or look for them on your harddrive with a proper search program, like Everything.
    upload_2021-7-20_14-37-25.png
     
    Ruchir likes this.
  9. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    71
    upload_2021-7-21_3-45-28.png

    Should help finding those built-in textures :)
     
  10. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,293
  11. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Why not use the HDRP template? :)

    upload_2021-7-21_12-13-39.png
     
  12. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,293
    Because this is the 4th iteration I've been using this in different Unity versions and the volumetric clouds have a severe usability / accessibility problem. Here's how it looks when I create a new scene and add the volumetric clouds:

    clouds.jpg
    By the way it would be super awesome to have a button with which the required volumetric clouds settings are activated instead of having the user find out the 2 locations where he has to set them manually.

    Edit: I fiddled around some more and this is how it looks now:

    c.jpg
    However it would be nice to have a reference project just to see how it's supposed to look like.
     
    Last edited: Jul 21, 2021
  13. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433

    Looking at the default value in the inspector, you're on an older version of HDRP (relative to the github repo we use). If you want to be up to date, you'll need to grab the graphics repo from github, otherwise, things might be slightly broken/inconsistent. ;)

    Within the next couple of months, the situation should be more stable, as we push less drastic changes to the system, for the final release of 2021.2 sometime by the end of the year.

    The clouds are active by default in the frame settings now, so the only place you have to enable them is in the HDRP asset. We don't want to have them on by default, as they are many projects that don't want/need them, and this would add an unwanted overhead.

    The latest HDRP scene template (on Github) has the volumetric clouds enabled. Though indeed the presets are not necessarily up to date in recent betas. This will trickle down in the public betas eventually.
     
    Last edited: Jul 21, 2021
    Ruchir, Rowlan and sqallpl like this.
  14. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    @pierred_unity

    Sorry for bumping my own question again (maybe my post was missed in action or you don't have any ETAs yet) but as you are talking about the final release I'm very curious about environmental lighting and reflection probe support. I've quoted my post with these questions below. Any info would be much appreciated.

    Thanks.

     
  15. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    We're currently working on it (baked reflection probes and global ambient probe).
     
    sqallpl and Ruchir like this.
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    dynamic volumetric clouds and baked reflections probes? better than nothing but not really 2021.2 i think :)
    we have a full time of day and various weather conditions.
    it also would be nice to add the possibility to add one or two more noise samples to make the clouds catch up with expanse. the clouds from expanse just look so nice but are so expensive. and it is not the ramarching but all these extra passes it performs to combine its atmosphere and the clouds with the sky.
     
    Ruchir likes this.
  17. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,293
    Just to get my point: It would be very helpful if you guys could provide example scenes. Good ones. It took me a while to find out how to make a scenery like this with the clouds layer and lighting settings:



    Even small values in the settings make a huge difference and make eg the godrays work or not work. I don't want to spend time yet again to find out how to make such a scenery with the volumetric clouds when you guys already know how to do that :)
     
    koirat, sqallpl, Lex4art and 2 others like this.
  18. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    The 2D cloud layer just doesn't react to Sky's ambient light at all, I wasn't able to see any change in its color when rotating the sun (like in sunset scenes) and it always has a weird glow to it making it impossible to get a dark scene at night (Or I have to change the exposure values to force it to be dark which doesn't look good at all). So, the only scenario I can use the clouds is when the sun is high enough to be completely white. Also, when I enable the lighting toggle, all it does is that it adds shadows to the clouds which are also present when the sun is no longer visible.

    Are there any plans on improving the Shading techniques for this cloud layer?

    Although can you please share the settings you used in this video (it looks pretty good :))
     
  19. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    Great to hear that. Thanks for the reply.

    Looks like real-time reflection probes will be supported too:

    https://github.com/Unity-Technologies/Graphics/pull/5192
    >This PR adds the support of volumetric clouds for baked and real-time reflection probes.
     
    Last edited: Jul 22, 2021
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,293
  21. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    There is another batch of improvements coming soon:

    - Realtime/baked reflection probes and global ambient probe support
    - Reduced ghosting in certain situations, notably when flying through them
    - Improved erosion noise details in all presets, with a lot more natural look, and less bulbous/cartoony look

    (the former erosion noise is still available in the Custom Mode and all the "pro" modes if needed, maybe for more stylized usage)

    Here's the erosion noise before/after the change:
    noise.gif
     
    BATTLEKOT, Ronsu900, Kirsche and 11 others like this.
  22. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,293
    How does fly-through look? I have a big dragon that urges for diving through a sea of clouds :)
     
    Ruchir likes this.
  23. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    A small sample of what's to come.

    The latest improvements on the noise are certainly paying out. We're now reaching a very reasonable level of quality, given the very low cost of the system.

    All these shots below are using the "simple" mode, so it's just a few clicks to set these up thanks to the presets ("Cloudy", "Stormy" and "Custom" to be exact).

    Screenshot1.jpg Screenshot3.jpg Screenshot5.jpg Screenshot9.jpg Screenshot11.jpg
     
  24. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Also, the "Overcast" preset has been updated, so that you can get a lot of variation, by just tuning the thickness of the cloud volume. From very thin wispy clouds, all the way to very thick and dark overcast clouds, with just one slider.

    Screenshot10.jpg Screenshot4.jpg Screenshot7.jpg
     
  25. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    These look really good :).

    I have a question, Are there any plans for handling mixing two cloud volumes.
    What I mean is maybe I transition from a stormy cloud volume to sparse volume then would there be some kind of mixing/morphing available to smooth out the transition?:)

    Currently they just suddenly change on basis of which volume's weight is higher. It would be good if some kind of transition is implemented as it would help with cinematics/maybe could be even part of gameplay and the only other way to achieve this currently would be to create custom atlas textures for the transition or maybe a custom compute shader to act as coverage and rain maps.
     
    pierred_unity likes this.
  26. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    You can already blend between volumes that use the "Custom" mode. You can reproduce all the sparse/cloudy/stormy/overcast presets with the Custom mode. :)

    The volume system doesn't offer yet curve blending between volumes, but this will be looked into at some point in the future. In the meantime, it's super easy to just blend/animate the altitude/thickness/shape/erosion/density/wind/... values. You can already create countless variations with these.

    A pro user could also use a render texture with the manual mode, and just input whatever cloud coverage texture they need on the fly, for whatever transitions they need to create.
     
    Kirsche, rz_0lento and Ruchir like this.
  27. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    In that case, it would be helpful if we could view the settings that are set by current presets, currently the option just become invisible, you could make it so that the options that are adjusted by the presets are grayed out instead of hiding them.

    It would really help understand user how each value impacts the clouds as well (basically act as documentation in itself)
     
  28. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    289
    We are getting close to rdr 2 day by day:) Thanks
     
  29. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    It's already better (performance cost, authoring, ease of use, flexibility...). :)
     
    Last edited: Jul 23, 2021
    JamesArndt, Kirsche and Ruchir like this.
  30. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
  31. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    That's not possible, the presets are not curve-based, they use a handmade LUT and a simple procedural density map.

    But again, it's a matter of seconds to create cloudscapes. ;)

    curve.gif


    For SIGGRAPH, I'll be presenting the system in more details (as well as Lens Flare and Light Anchor) during the dev days. You can register here: https://unity.com/event/siggraph-2021

    The session is called New Lighting Features in Unity 2021.2: Volumetric Clouds, Lens Flare and Light Anchor.
     
    BATTLEKOT, Kirsche, Stardog and 8 others like this.
  32. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Hey Ruchir, thanks again for bringing this issue here. A solution has been found by this recently merged PR.
    That should fix the pixelated pattern you saw with DLSS.
     
    Ruchir likes this.
  33. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Would something like this would be possible:

    The only way I see is having to create compute shaders to modify custom render texture with compute shader
     
  34. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    In the absolute sense, I don't see something that could prevent you from doing what you suggested yes.

    If you like challenges and adventure, I also suggest you try this public branch.
    This is a slightly different approach by using fog instead of clouds. The idea is to provide the possibility to users to feed data to a local volumetric fog (AKA density volume) via a compute shader.
    In theory, you should be able to do something along the lines of your video with it.

    However, keep in mind that it's still in development, there's currently no documentation and there will be no support for it here for now. (hence the adventure)
     
    PutridEx and Ruchir like this.
  35. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    One thing that could be improved upon a bit, in my opinion, is how currently clouds are blended with background near its edges, Currently, it looks like a really hard edge when passing through them and is exaggerated by the high "near clip" distance:
    upload_2021-7-26_23-44-41.png

    If the clouds faded away instead of abruptly ending and having a harsh edge then the near clip won't be that noticeable and just be considered that the cloud density is low.

    Normal:
    upload_2021-7-26_23-46-30.png
    Clipped:
    upload_2021-7-26_23-46-46.png

    It maybe doesn't look that bad in the screenshot but is more severe when in motion

    Edit: Video


    P.S:This is the latest GitHub version btw
     
    Last edited: Jul 26, 2021
    Lex4art likes this.
  36. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    I agree with your feedback but It's a known limitation.
    Hopefully really close clouds will get more love in the near future.

    However, just to clarify, we are not talking about the near clip value of the camera, changing this value won't change the distance at which the clouds will start to be culled in front of the camera.
    There's an hardcoded value in the cloud system where if the distance between the clouds and the camera is below a minimum, it just won't get displayed.
     
  37. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I understand that (as explained in a previous post as well), what I am suggesting is having a fall-off distance over which density of the cloud is lerped/transitioned to zero instead of just a hard cut-off near-clip and exposing this fall-off distance as well as near clip distance (which is hard-coded right now) as parameters. This should solve the problem with reprojection as well as help with the hard-edge issues for now.
     
  38. camerondus

    camerondus

    Joined:
    Dec 15, 2018
    Posts:
    52
    how did you get the god rays with the volumetric clouds? im playing around with it and cant get a similar result
     
  39. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    146
    @camerondus you can combine cloud shadows with volumetric fog to achieve that effect. mostly make sure that fog can reach up to a decent height and adjust the anisotropy value
     
  40. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    We've added the ability to increase the influence of the wind at higher altitudes, to distort/skew the clouds, like in real life (wind usually travels faster the more you climb).

    The parameter gives absolute control on the level of distortion you need, regardless of the wind speed (very useful for static shots that need a speed of 0 km/h).
    2021-07-28_12-58-40.gif
     
  41. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Just wanted to point out that this still happens in the latest GitHub versions.
     
  42. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    It's really nice to see new features and improvements regularly. Great work.

    Any plans to add more cloud types in the future? Or maybe actual set (cumulus, alto-stratus, cumulonimbus) is sufficient and can be used to act as other cloud types so other 'built-in' types are generally not needed?

     
  43. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Can you please report this bug using "Help > Report a bug" in Unity?
     
  44. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    See my previous answer ;)

    https://forum.unity.com/threads/volumetric-clouds.1078811/page-5#post-7332196

    Btw, for cirro-clouds, you'll want to look into the background "Cloud layers" instead:
    https://docs.unity3d.com/Packages/c...inition@12.0/manual/Override-Cloud-Layer.html

    Raymarching is not really efficient when dealing with very thin clouds over such large distances. That's why in the "Advanced" mode we already offer the cumulus, stratus and cumulonimbus.
     
    Last edited: Jul 28, 2021
  45. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    But currently, they aren't really up to par with the volumetric cloud system, they really don't react to lighting and really blow out the scene in default exposure, if I try to lower the exposure to make them fit in a day scene then they become pitch black in others. Also, sunset scenes look really bad with them sadly :(
     
  46. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    See them as an HDRI, nothing more. This means they'll need a lot of manual tuning. The lighting applied to them is rudimentary.
     
  47. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Still, I feel there should be better shading applied to them by default
    I have attached a video showing the problem:

    These are my settings:
    upload_2021-7-28_21-15-51.png
     
  48. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I submitted one :) (Case 1353955)
     
    pierred_unity likes this.
  49. camerondus

    camerondus

    Joined:
    Dec 15, 2018
    Posts:
    52
    seems cloud shadows arent even working for me at all. do i have to enable them separately somewhere? i have them enabled on the fog override
     
    Last edited: Jul 29, 2021
  50. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Not a bug, our volumetric cloud system needs a directional sun to work. You need to create one, please do not report.