Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Feedback Volumetric Clouds

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

  1. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    I just bought expanse(asset for volumetric clouds in HDRP)

    It has some settings that I think are really interesting and default clouds could greatly benefit from.

    Look at the 38 min mark, he shows the different noise layers that are used by this asset, and it does have a lot more variety than the current system. especially the wispy kind of clouds.
    The system also has a very good way of handling multiple celestial bodies along with multiple layers of the atmosphere. I think unity could use something similar.


    Atmosphere:
    upload_2021-11-15_14-40-59.png

    Celestial bodies:
    (Sun) upload_2021-11-15_14-35-37.png (Moon) upload_2021-11-15_14-35-52.png

    The cloud settings:

    upload_2021-11-15_14-37-41.png

    This does really offer much more creative freedom and looks better than HDRP's default clouds currently.
     
    Last edited: Nov 15, 2021
    PutridEx and Lex4art like this.
  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,122
    Expanse is indeed amazing, seriously
    The latest update improved the lighting of the clouds. It's the authors personal work now, not following any papers etc.
    Has quite an amazing look, plus settings to model, improve performance etc. And the fog is really nice too, big improvement last update. Although HDRP's fog is also pretty amazing, i just wish there were more fog options, like height-fog, distance fog.. currently I make it up using an asset like atmospheric fog to apply fog to distances at a certain distance far away from the camera, which HDRP fog can't do. The atmospheric fog asset isn't volumetric though, so still hoping HDRP will add it oneday... It's also really important as a feature. Countless games use it and without it would look pretty bad. (satisfactory, Road 96 (built with HDRP, uses the asset I mentioned) etc).

    Although expanse is awesome, performance is a bit problematic in OLD GPUs, like GTX 1070.
    It performs very well on something like an rtx 2070 which in it's own right is somewhat old.
    Although honestly it's not bad that you can't use it even on these old GPUs, it just takes a bit more to do it's work -- depends on your project GPU, project scale, GPU budget and audience target.

    Although to be honest, I look forward to the improvements to unity's volumetric clouds in the future, which are currently pretty good with amazing performance, but there's still some work to do to improve the look of the clouds.
    In particular with stratus and cumulus clouds.

    Hopefully there's still improvements to the visuals though and this isn't the end :D
     
    Last edited: Nov 15, 2021
    Lex4art and Ruchir like this.
  3. andylewisart

    andylewisart

    Joined:
    Nov 4, 2013
    Posts:
    18
    Has anyone attempted to utilize Unity's HDRP volumetric clouds in VR? I can get them looking good in scene view. Once I view them in VR, they turn blurry, lose color, and are basically unusable.

    In scene view:
    upload_2021-11-15_22-56-2.png

    In VR:
    upload_2021-11-15_22-56-38.png
     
  4. Deleted User

    Deleted User

    Guest

    Yes expanse really looks great and seems to have more cloud presets
    Look at this video!!... I thought this was real life!!!

    Seems like its using different more advanced wind pattern
     
    PutridEx likes this.
  5. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    Careful what you wish for. To make an educated guess about visual quality, you need to compare apple to apple, with similar GPU costs at a given resolution. With the HDRP clouds, we're trying to mix high performance, low cognitive load, and ultra-fast setup.

    For someone targeting 60 fps or 144fps, the claimed 1ms with Expanse on a 2080 TI (13.5 teraflops) is very high, and will already require several optimizations for reprojection and sample count that affect visual quality. For comparison, with a 2070 Super (9 teraflops), HDRP's clouds below (tuned custom mode with default quality settings), cost roughly 0.35 ms at 1080p (and 0.93ms at 4K!), so you can appreciate the performance difference hopefully.
    upload_2021-11-16_16-20-51.png
    [I've tried to match the cloud cover used in the optimization video for Expanse, so that the comparison is as fair as possible.]

    The frame above is trice faster than 1ms. Is it looking 3 times worse? I'll let you be your own judge, especially when comparing it to the 0.3ms with Expanse on a 2080 TI (and potentially having to use "low" or "potato" noise quality for lower-end GPUs).

    Expanse is a fantastic asset, especially for time of day simulations, its creator is doing a great job. HDRP doesn't offer a similar feature set just yet. Just be aware of the performance implications when you pick ANY solution and profile your project to validate your use case! Obviously, if you don't care about performance, that's a moot point.

    Eventually, we'll add support for multiple layers and more noise levels and types for high-end platforms, and improve day/night cycles (we're already working on smooth cloud transitions, as shared a few messages ago). See the list of future improvements at the end of the blog post (and we've already communicated several times to you about it, so nothing new there hopefully). ;)
     
  6. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    Btw, that's me spending literally 40 seconds on the Volumetric Cloud overrides, trying to match the reference from the video you shared above:

    upload_2021-11-16_16-55-1.png


    Here's the ref from the video:
    upload_2021-11-16_16-55-52.png

    It's very versatile, and this was just 0.28ms at 1080p due to the lower cloud cover. ;)
     
    Last edited: Nov 16, 2021
  7. andylewisart

    andylewisart

    Joined:
    Nov 4, 2013
    Posts:
    18
    Can I bump this? I really want to know if anyone has successfully used these clouds in VR.
     
    Deleted User likes this.
  8. SamTheLearned

    SamTheLearned

    Joined:
    Jun 23, 2021
    Posts:
    84
    How are people getting the sunrays shining through?

    I've read the blog post on the volumetric clouds and made sure my volumetric fog was enabled and working. I did what it said to do with 2 options, I think it was max height and distance or something, but could not get actual sun rays to appear.
     
  9. three-ms-creative

    three-ms-creative

    Joined:
    May 5, 2021
    Posts:
    10
    Hey guys, just wanted to chime in and say I'm happy to see Expanse being discussed here! I do agree it's not an apples to apples comparison---HDRP's built-in clouds take the cake for performance, so when you compare the Expanse demo reels (typically captured in 4K on very high settings) to live demos of HDRP's clouds, always keep that in mind.

    I will mention that the 1ms figure is supposed to include volumetric fog, celestial bodies/stars, and the sky---the actual full-screen cloud rendering takes about 0.4-0.6ms. Though that's on pretty crunched settings, haha.

    Pierre, big fan of the work you guys are doing and super impressed with the results. Excited to see how this continues to evolve!

    EDIT: This is Brad from Expanse. I have no idea how to change my username from the garbage it is now lol.
     
  10. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    552
    Ah, if it isn't C-3PO's good ol' lost cousin C-903 the garbage beborp :p

    Good to see your input here Brad.
    Edit from Pierre: https://id.unity.com/ < --- to change UN
     
    Last edited: Nov 17, 2021
    three-ms-creative likes this.
  11. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    I'll look into it
     
  12. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    I wasn't able to easily repro. Can you log a bug with a simple repro so that i can tackle it?
    Thanks
     
  13. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    When the cloud is in thick fog it looks like it has some sorting issue I think:
    upload_2021-11-17_20-32-52.png

    upload_2021-11-17_20-33-6.png
     
  14. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    Hey, you most likely don't have the volumetric fog pushed far enough. These distances are in meters, so you'll need to input several thousand meters for height and distance. Have a look at these settings for instance for fog:
    upload_2021-11-17_15-1-40.png

    Sunshafts will be more visible in situations where the sun is lower, with dense fog, with higher anisotropy, with higher volumetric intensity on the light itself, in high contrast situations (dark clouds + bright light), etc.
     
    SamTheLearned likes this.
  15. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,122
    Hey,
    how would the advanced & manual cloud controls work? How do you create the textures, and what are they exactly for the two modes?
    I've never really done something similar, and I'd really like to go beyond just the 'custom' preset. Tough to get the right look sometimes.
     
    Lex4art likes this.
  16. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    HIBIKI_entertainment likes this.
  17. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    552
  18. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    Fog in HDRP (and in reality) is a "terrain-connected cloud", so if you want to simulate these within other clouds at high altitudes, then you should just rely on the clouds system only, rather than mixing 2 different systems. In normal conditions, the height of your fog should be roughly where the bottom of the cloud volume starts, or slightly higher. For instance, it's very rare to find cumulus clouds within that much mist.

    For now, the workaround is to increase the fade-in distance with the manual mode, or use the automatic mode and the sorting issue will disappear (by culling the nearby clouds more or less). I'm being told there is no solution for now if you want to keep a fade in distance at 0, as it's far from trivial (different passes).

    Volumetric fog and clouds interact well together within the limit they are designed for (= clouds on top of the fog, like in reality), having that much fog within clouds isn't a recommended use case, yet it will still work fine with the workaround mentioned above, but the drawback that the clouds won't appear as close to the camera.
     
    Ruchir likes this.
  19. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    Prepare your virtual brush. ;)

    upload_2021-11-17_20-18-28.png


    A pre-existing LUT can be found in the package, named CloudLutRainAO.png, you can use it as a starting point, but you'll most likely want to do your own LUT.

    Then it's up to your creativity, the most important bit is to understand how the LUT and the Blue channel of the cloud coverage map interact together. It should be pretty clear with the image above.

    And that's the doc, for all the other texture channels:
    https://docs.unity3d.com/Packages/c...-Clouds.html#cloud-map-and-cloud-lookup-table

    [the LUT is flipped horizontally, we'll fix that]
     

    Attached Files:

    Last edited: Nov 18, 2021
  20. SamTheLearned

    SamTheLearned

    Joined:
    Jun 23, 2021
    Posts:
    84
    Thanks for the response! I just realized I don't even have the anistrophy option on Fog. What Unity version should I be using for the options you say to tweak?
     
  21. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    SamTheLearned likes this.
  22. SamTheLearned

    SamTheLearned

    Joined:
    Jun 23, 2021
    Posts:
    84
  23. RodGreen

    RodGreen

    Joined:
    Jan 11, 2020
    Posts:
    13
    @pierred_unity
    I found a few issues with the clouds
    1. The system uses a 'first' directional light shadow caster for lighting. Which means when doing any kind of time of day and including say a Moon switch there's a lot of hacking values to get the lights to switch. Had to dig to find this as it's undocumented and would be better if we could tell the cloud system what it should use as the dominate light source.

    2. it looks like the lighting calculation doesn't take into account the intensity of the light into the calculation, just the color and direction which again means when doing a sunset we have to hack the lighting on the clouds to get it rendering correctly. It also doesn't take into account the lights resulting intensity as it's modified by the skybox atmospheric rendering.

    3. When the dominate camera is switched the clouds reset their state (as far as offsets from wind etc) and we have no way of forcing an offset. So every time the camera switches the clouds return to their default starting positions breaking the realism. Please add a manual query / override to the offset so we can recover the state.
     
  24. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    For these kind of question, you want to be adressing me as @pierred_unity is an artist will be able to help you on the edition workflows, viual quality, etc. Not the APIs, performance or technical details, etc.

    1 - That is how HDRP works unfortunately. We have no plan to add the support of multiple directional lights in the near future. "Dominating light source" doesn't make any sense , otherwise the sun would always be picked. The unique or directional light that cast shadows is what the the main light. I invite you to use that to define which light should be used to shade the clouds.

    2- The "lighting calculations" does obviously take into account the intensity of the light otherwise nothing would be working. The attenuation for the directional light is not auto-magic, you should be using the physically based sky, which handles the atmospheric absorption that simulates the directional light attenuation based on the location of the point to shade in planet space with the light being lower in the sky otherwise you will get poor results.

    3- You have all the necessary offset in the volume to define your starting point and the simulation will run from there. In the current state of the system, we have no plan to expose the internal simulation data as they will break the accumulation if changed from script.
     
    Last edited: Nov 19, 2021
    elbows likes this.
  25. RodGreen

    RodGreen

    Joined:
    Jan 11, 2020
    Posts:
    13
    My apologies - I will address to you in the future.
    These were linked issues when I was trying to fix the rendering bugs we were seeing in the clouds. To confirm we are using physically based sky. And after your message I took another run at it to see and it looks like it's connected to an issue where the clouds aren't taking the skyexposure into account. Which made it seem like the sun intensity wasn't being used.
    We dim the exposure to transition to night and it causes the clouds to become super bright - in relation to the skybox.

    I don't see any settings to translate the clouds? Adjusting the x and z of the clouds shape offset has no effect, how would we transpose the simulation? Any way to query the current offsets?
     
    Last edited: Nov 19, 2021
  26. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    Is there a way to do something like this: (this is using unistorm)
    upload_2021-11-19_12-15-56.png
    This is what I have been able to create for night scene till now:
    upload_2021-11-19_12-18-0.png

    Is there a way to make the cloud's shape look more defined/increase the contrast?
     
    PutridEx likes this.
  27. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Indeed the exposure of the physically based sky is not going to have the effect you are looking for. The clouds have two lighting terms:
    - Direct lighting (Sun) that is affected by the intensity of the light.
    - Ambient probe (Sky) that is affected by the ambient probe (that matches the sky if correctly set up). That said, in a normal set up, most of the lighting comes from the sun and the ambient term is (as the name describes it) ambient, so with very little details.



    There must be something funky with your setup:

     
    Last edited: Nov 19, 2021
  28. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Right now, you will to replicate the current setup in the custom mode and increase the Density multiplier to achieve that.
     
    Ruchir likes this.
  29. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    shikhrr and Ruchir like this.
  30. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    I guess I could add a function that returns the offsets that match the current simulation state yes.
     
  31. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    upload_2021-11-19_12-46-10.png
    I was able to get this look, thanks a lot.

    The things I modified (for anyone in future):
    Increase sun's lux value and then decrease it's intensity slider (To get the highlights):
    upload_2021-11-19_12-47-9.png
    Decrease PBS sky's exposure to counter increased sun's brightness (there should be a sunlight dimmer slider just like clouds for sky as well):
    upload_2021-11-19_12-48-18.png
    and increase cloud's density as suggested above:
    upload_2021-11-19_12-49-8.png

    I have one suggestion though:
    All of this could be avoided if the sunlight dimmer value could be increased above 1 for the volumetric clouds:
    upload_2021-11-19_12-50-18.png

    This would save from changing setting of every other effect relying on sun's intensity. :)
     
    PutridEx likes this.
  32. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    Also, wouldn't it make more sense to change it to "Sun Light Multiplier"
    Doesn't dimmer sound counter-intuitive? :p
     
  33. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    Not the best-looking scene but still looks good to me :D

    upload_2021-11-19_21-12-25.png
     
    Lex4art likes this.
  34. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    It is against the our coherence strategy to add multipliers everywhere. You can attenuate it for artistic reasons, but that is it!
     
    Ruchir likes this.
  35. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    I guess at some point we will add a third level of noise...
    I need to find a better way to damage control performance
    upload_2021-11-19_21-10-4.png
     
  36. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    552
    I've probably spent most of the last 2 months looking up now, oooft.
    That third level is certainly a good max if you can get around that.

    i did find from references there we still many cloud formations that were softer/smoother.
    I seemed to have noticed in particular this definition was higher with larger Cumulonimbus clouds IR,
    so i still think you're within a pretty good range so far while you steadily transition into a third layer.

    I'm guessing at this point tuning the Quality steps from the first still wouldn't get you any closer to the 3 noise level there?
     

    Attached Files:

    sqallpl likes this.
  37. MrR4v3n

    MrR4v3n

    Joined:
    Jun 13, 2017
    Posts:
    1
    These clouds are looking awesome, but I have this problem with transparent objects like the sea, any fix for this?

    Also it would be great if clouds could interact with point lights
     
  38. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    I'm not sure if this is the right place to ask this but any idea on how to get a dynamic aurora borealis effect?
    Should I create a new sky component with this effect built in it?
     
  39. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    We are currently aware with the problem with clouds and transparent, not solved for now unfortunately. Will keep you posted when we've tackled it. You will probably have to wait for our water solution that will handle it as it's very very tricky to hande properly otherwise
     
  40. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,689
    Hi there,

    Testing Volumetric clouds in HDRP, for the most part they work and look good so great job! however they render of top of everything else in my scene:



    Does this issue ring any bells? Maybe I'm missing something?

    Just in case, running 2021.2.1f1 and HDRP 12.1.0 on OS X 10.15.4, Metal, Dual AMD Fire Pro.
     
  41. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,122
    This looks like cloud layers, not volumetric clouds.
    Cloud layers (2D clouds) are currently bugged and render on top of things, it's fixed but patch is not yet released. Probably the upcoming one or the one after.

    Volumetric clouds are enabled from the HDRP asset, global settings & camera frame settings.
    Then you enable them by adding them as an override to a global volume, they're a part of the list.
     
    arkano22 likes this.
  42. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    552

    This is indeed - as PutridEx mentioned, Cloud Layers and not the Volumetric Cloud component.
    FYI the latest tech stream update fixes Cloud layers doing this.
     
    arkano22 likes this.
  43. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,689
    Thanks to both of you! :)
     
    HIBIKI_entertainment likes this.
  44. andylewisart

    andylewisart

    Joined:
    Nov 4, 2013
    Posts:
    18
    I get a lot of flickering when trying to view these clouds in VR.

    In addition to this existing scene where I see the issue, this also happens to me when I create a new scene, place my VR avatar in there, and bring in an existing volume profile containing volumetric clouds only. When I toggle XR Rendering off in the camera, the problem stops. I'm using the Oculus plugin. Single-pass instanced.
     

    Attached Files:

    Last edited: Nov 29, 2021
  45. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Hi,

    As mentionned in my answer. I was not able to repro your issue naively. Can you please fill a bug so that I can have a precise repro?

    Thanks
     
  46. andylewisart

    andylewisart

    Joined:
    Nov 4, 2013
    Posts:
    18
    Sorry - I tried to repro in a fresh project and found that I couldn't. This led me to find that the issue was with a plugin I was using: Enviro. Specifically: a property called 'Exposure' in a Volume override called Enviro Skybox. I should have done tests in a fresh project earlier. Thanks for your patience!
     
    Last edited: Nov 30, 2021
  47. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    @auzaiffe , I think the blending near the edges of clouds has some issues.

    upload_2021-12-10_10-34-34.png
    This is from the HDRP template (standing on top of the glass box).
    You can see that the dark silhouette of the cloud creates an unrealistic outline around the cloud in overexposed situations.
     
  48. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Yes we are aware of this limitation, it is the counter part of more pleasant blending between the sun and the clouds.
     
  49. Skyler_Hawkins

    Skyler_Hawkins

    Joined:
    Aug 18, 2016
    Posts:
    32
    Has anyone been about to Access the Cloud Preset on runtime? I really like the Presets and would love to be able to switch back and forth between them via Script, but can't seem to access the Volumetric Cloud override of the Volume.
     
  50. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    143
    @Skyler_Hawkins yeah, you can use Volume.sharedProfile.TryGet<VolumetricClouds>(out yourVolCloudsVariable); and then set presets or other variables..
     
    MrR4v3n likes this.