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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Animating HDRP volumetric clouds to change weather

Discussion in 'High Definition Render Pipeline' started by akent99, Jul 27, 2022.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    496
    I am creating videos (not games). I was wondering the best way to achieve a few effects using volumetric clouds with HDRP.

    The first simple case is over a series of shots I want to change the clouds to get gradually darker until it starts raining. I assume I create a new volume asset per shot and try to make the clouds thicker/darker per volume I create. Can you convert the "simple" presets to "manual" settings so its easier to adjust starting from decent starting point? (At the moment when you change from simple to manual etc, it loses all the old settings.)

    The second case is if I want clouds to blow across a single shot and make everything darker (a cold front is coming through), I assume I cannot use animation tracks in a timeline to animate volume properties (I think you can only animate properties of objects in the scene). I was wondering about a "local volumetric fog" that I animate to move across the screen. Is there a better way? (Crude example: https://episodes.extra-ordinary.tv/episodes/ep1/ep1-20-020.mp4 )

    Thanks for any tips!
     
  2. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    423
    Hey, if you're using a more recent version of Unity and HDRP, you will have access to all clouds settings directly from the preset. For instance, in the image below, I'm using Cloudy, yet I can edit all the curves and values that are used to generate the clouds ("Cloudy" will then become "Custom" once any of these properties are touched):

    upload_2022-7-28_12-35-1.png

    And because we now support curve blending, you can smoothly blend between multiple volumes, to create seamless weather transitions:


    (these videos are fairly old already, we do have higher quality clouds out of the box now)

    Then, to create a moving front and a darkening of the clouds, I can see 2 ways:

    1. Easy way: You have 2 global volumes (one for "clearer sky" and one for "darker sky" with overrides for Volumetric Clouds, Fog, Sky, etc.), and animate their Weight value using Timeline or Script. However, all these effects are camera-based, and therefore the lighting/fog/clouds will change everywhere identically wherever you look. You won't have a "localized weather front", but it'll be very quick for you to iterate with our curve-based preset system.

    2. Hard way: You can use the "Manual" mode for the clouds, to feed your own cloud map and LUT:
    upload_2022-7-28_12-41-27.png

    You can have a look at this post to understand how the cloud map and LUT interact with each other. However, it's a more manual process, that requires a lot of back and forth between Unity and Photoshop for instance. But it'll let you create very specific types of clouds and you can place them exactly where you want by painting these 2 textures (and then have the whole map moving in the direction you please by using the wind settings), with the addition of moving local volumetric fog if needed.
     

    Attached Files:

    shikhrr, ftejada and akent99 like this.
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    496
    Aaahhhhhh!!!! Thank you! That was the bit I was missing. You don't animate the volume properties, you animate the weights between volume profiles. (I am going to give that a go with Exposure as well - I was creating a new exposure volume per shot (in Sequences package) to get the lighting right, which was a pain when copying between shots. Instead I can share the exposure profile between all shots and change its weight in the cloned volume game object pointing to the exposure profile).

    Regarding the other "cloud front", I will give that a go! Thanks for the pointers. Yes, I would much rather a cloud front with wind than make the whole sky go uniformly darker. (Its funny how a few seconds of video can take a disproportionate amount of time, but the end result does look better because of it. The audience may not recognize it, but it signifies a change of fortune in the story line.)

    Basically I am trying to work out how to do all the environmental changes and visual effects to support storylines. I think I have got rain worked out again in HDRP, clouds now look doable (I am upgrading from built in render pipeline to HDRP). I need to learn how to do dark clouds (particle effects) as that broke upgrading to HDRP (angry person has comical dark clouds around their head - little sparks/lightning bolts in the clouds a future goal). My old solution for dark clouds was pretty crude, but learning to crawl/walk/run!

    upload_2022-7-28_10-12-34.png

    HDRP is looking nice overall! But it makes the short cuts look out of place now, so need to lift the game everywhere! ;-)

    upload_2022-7-28_10-14-58.png
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    496
    For fun, here is where I ended up. Trying to indicate the passing of time and changing of weather. Using 2022.2b8 with blending from sparse to overcast.



    (I wish there was a "blue sky/clear" preset, as blending from no profile to sparse does not work sensibly and my attempts at a blue sky profile then blending to sparse came out weird - https://forum.unity.com/threads/add...-volumetric-sky-option-for-2022-2-b8.1337360/)