Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Water System for the High Definition Render Pipeline

Discussion in 'High Definition Render Pipeline' started by auzaiffe, Nov 26, 2021.

  1. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Hi,

    Over the past few months, we have started an effort to provide an out of the box Water System solution for the High Definition Render Pipeline. With this message, we want to centralize future feedback about this system.

    The feature is still in an early experimental phase and we are aware of its many limitations. In the upcoming weeks and months, we will work towards providing a robust tool our users can rely on to achieve high visual quality.

    This solution aims to solve Oceans, Seas, Rivers, Lakes, and Pools rendering, while minimizing the cost.

    The first iteration of the solution can be found in the following PR:
    https://github.com/Unity-Technologies/Graphics/pull/6109

    Here are two short videos of the feature in action:



    Here is a list of the most important features we have, lack, and plan to add to the system.

    Supported:
    • Multiple simultaneous water surface
    • Simulation of flat water on a quad, infinite plane (with Earth Curvature), or custom mesh
    • Realistic lighting scattering
    • Multi-band amplitude
    • Surface and underwater foam
    • Caustics
    • Support for wind and current.
    • Support for all light types
    • Shader graph integration for customization
    Known limitations:
    • No support for underwater situation (no fog, no water line, etc.)
    • No water rejection (e.g. water leaks in dynamic objects such as boats)
    Incoming improvements:
    • Improved parametrization and UI, with easier control for wave height control, and presets
    • Reduced large scale visual tiling
    • Underwater scenarios
    • Water rejection
    • Contact Foam (and better foam in general)
    • Support for decals for foam and normal alteration
    • Performance
    • Water physics
    Thank you!
     
    Last edited: Nov 27, 2021
  2. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @auzaiffe videos links seems broken
    out of curiousity, why not push it to master and marked it as experimental like the cloud system?
     
    Last edited: Nov 26, 2021
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Certainly looks interesting. I am going to guess it somehow depends on HDRP features as it's not for URP as well?
     
    NotaNaN and DMeville like this.
  4. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    340
    I saw it on twitter, It already looks super awesome!

    now i just wonder the performance cost of it.

    and i hope the foam solution could include at least two ways:

    1.shader depth based one.(for performance scene)
    2.projector based one.(for detailed scene)

    https://twitter.com/Auzaiffe/status/1464271161848733700
     
    Last edited: Nov 26, 2021
  5. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Links are fixed now.
     
    Reanimate_L likes this.
  6. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Foam is a part of our priorities including the ones you mentionned.
     
    LumaPxxx likes this.
  7. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    i'll be soon merged into master and we will iterate on it.
     
  8. Deleted User

    Deleted User

    Guest

    Great job guys!!! Is it built with shader graph??
     
  9. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Some parts of the system are customizable within shader graph yes, more details will come as we iterate on it.
     
    Deleted User likes this.
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    is there gonna be support for integration with VFXgraph for procedural splashes?
    Also what is this artifact on the screen edges?
     

    Attached Files:

    soleron likes this.
  11. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    A suggestion: since Crysis-1 back from 2007 I haven't seen chromatic aberration effect in ocean water refraction - if it's possible to implement please do it :)
     
  12. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Yes, integration with the VFX graph for splash particles is part if the roadmap and the artifacts are simply me capturing the unity editor window, with the edges
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Is there any relation between what is used as a normal and the generated caustics, or are they completely unrelated?

    I think the pool normal map is kinda bad. It has way too much high frequency noise while the caustics are too rounded and calm.

    The refraction looks weird as well, for the same reasons.

    I have less to complain about the ocean: it looks like a bit of an improvement from what Scrawk's Ceto ocean had achieved 5+ years ago, which I guess is above what I typically expect from Unity.
     
  14. barbelot

    barbelot

    Joined:
    Jul 18, 2017
    Posts:
    38
    This is great news ! A high quality built-in water system is definitely lacking right now.

    However Crest has been an existing asset for a while supporting built-in, URP and HDRP, and implementing a lot of the features you mention already. I'd be curious to know how your solution would compare to this asset and if you could improve (or speed-up) your development with their expertise or if you have to redo everything from scratch.
     
    celeronpm and nehvaleem like this.
  15. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    340
    In fact,all available water assets suck right now.

    Crest Ocean,you don't have shader depth based foam,you have to bake every shoreline in many huge textures to get a "not very blur" foam line in big game scene.
    and you don't have rivers and lakes support for sure in Crest Ocean.

    KWS water system looks good and have rivers support ,but when you use it you will notice the performance drops fast.
    and it dose not have shader depth based foam as well.

    R.A.M got good performance and shader depth based foam support.but you don't have infinite ocean solution in it.

    so the water system in HDRP really needs "one solution for all" right now.
     
    Ruchir likes this.
  16. Lymdun

    Lymdun

    Joined:
    Jan 1, 2017
    Posts:
    46
    Very cool job, such system was really missing. Will you use splines package for rivers? Would be awesome!
     
    cunibon likes this.
  17. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    331
    Great news! I appreciate your work guys. I would love to see the possibility of creating larger waves. Rarely any ocean system ever can deliver in the "angry ocean" department.

    Plus splashes and ripples for interacting non-kinematic rigidbodies. Not just point splashes, but interactions with complex, even large colliders.
     
  18. D1234567890

    D1234567890

    Joined:
    Aug 11, 2019
    Posts:
    61
    Crest does support rivers and lakes (in preview). :^)
     
    LumaPxxx likes this.
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @auzaiffe say can we inject flow map to the water system? either via decals or render texture?
     
  20. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Yes both decals (part of the next iteration) and render textures (already possible) to alter water surface properties such as the normals, foam, smoothness, etc.
     
    ftejada, LumaPxxx and Reanimate_L like this.
  21. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Alright that sounds great. I'll wait until it's on master then before trying to compare it with other water system, well i'm pretty sure you know which water system i'm currently trying to compare with :D
     
  22. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    A lot of deaths in that second pool :eek: heh.

    Great job guys keep it up! This would go along nicely with V&L Clouds as development continues.
     
    Lex4art and Deleted User like this.
  23. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Any chance we will have a spherical water option (like atmosphere has) for space simulators or games like Outer Wilds?
     
  24. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    469
    You can use custom mesh for this?
     
  25. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I think this is actually already in. Unless my memory is failing me.
     
  26. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Looks super cool. I've been working on my own little water system (for URP), just exploring look and techniques for a project, and one of the major reasons was that I wanted to support some really nice foam. I really like the features (current and planned) and can't wait to play with them. Will be watching this very closely!

    I found that using animated flipbook decals (rendered from Houdini simulations) projected onto the surface seems like the best way to achieve some nice foam and tying that together with normal-map decals to adjust the flow works great for things like adding disturbance around rocky riverbeds, or at the base of waterfalls. Very excited to try these effects out with this beautiful looking water system (and finally dip my toes into HDRP)

    Animated foam decals: https://twitter.com/DMeville/status/1463318546876755974?s=20
    Normal-map flow decals https://twitter.com/DMeville/status/1462540840060944388?s=20

    Question about River -> Ocean transitions. Has any thought been given in how to make these transitions look nice? Usually this would be done with two separate meshes (one river, one ocean), have the river mesh overlap the ocean and spread out and maybe paint opacity into vertex colour. This simply works UNTIL you add refraction to the mix. Since no "stackable refraction", the river mesh on top doesn't "see" the ocean below since the ocean isn't rendered into the "grabpass" used for refraction, causing this kind of situation and not being able to layer/blend two water surfaces together https://twitter.com/DMeville/status/1453116752297033732?s=20 Will there be some kind of solution for this?

    I am also curious about this too!
     
    Last edited: Nov 30, 2021
  27. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Well, firstly, the planet center position should be moved from the PBS Sky to Visual Environemnt for this to work. As far as I now this was not yet implemented. But I didn't checked latest Unity build yet.
     
  28. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    When I look at the water surface at certain angles, it turns to black for some reason:
    upload_2021-12-2_11-27-57.png
     
    Lahcene likes this.
  29. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Also, not gotten the transparency to work with the water till now. I changed the water material to transparent but still looks opaque.
    upload_2021-12-2_11-32-45.png
    upload_2021-12-2_11-32-48.png

    Is there a setting I am missing?
     
  30. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Although the overall patterns look really good:
    upload_2021-12-2_11-42-45.png
     
  31. DrSeltsam

    DrSeltsam

    Joined:
    Jul 24, 2019
    Posts:
    100
    This looks extremely promising, kudos @auzaiffe and HDRP team! :)

    I'm glad to see that custom meshes will be supported! Are there any limitations when using custom meshes compared to infinite planes (i.e. certain features not being available)?

    Will it be possible to have a water mesh with different elevations, e.g. a slope?
     
  32. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oooh. . . it's on master now. . . .gonna wait for the next release then :D
     
  33. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    A small overview of the upcoming improvements (SSR support, better caustics, etc):
     
  34. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Not really, you just get the geometry you pay for!
    Slope: yes it is planned.
     
    sqallpl and DrSeltsam like this.
  35. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    That is weird, can you file a bug if you find a good repro? Thank you!
     
  36. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @auzaiffe oh btw in which unity alpha version that gonna include the water system in HDRP?
     
  37. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    331
    If you need it anytime soon, then simply use Crest, which will be superior for a long long time.
    In the meantime, be glad there will be one more thing with an out-of-the box solution.
     
  38. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    We always appreciate constructive feedback.
     
    SkandYxyz and hippocoder like this.
  39. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    It will be available in 2022.2 as an officially released version, releases process are very consertive at Unity to ensure that the end user gets the best possible version.
     
    hugokostic and ftejada like this.
  40. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789

    Is this update available in the water branch or it's now being developed only in master after the merge?
     
  41. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,115
    Can we not skip out on water interactions in case that is not at the top of the list?

     
    TiggyFairy, NotaNaN, Ruchir and 2 others like this.
  42. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    i assume it will be on the next a17 or a18?
     
  43. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    'Officially released' would mean at least tech stream versions, so Beta not alpha so Q2 ~Q3 maybe
     
  44. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    ah i see, gotcha.
     
    HIBIKI_entertainment likes this.
  45. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Still very interested in this.
     
  46. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    469
    Do you have plans to make water interaction system so we can get nice dynamic waves and ripples from objects and characters? Would be even cooler if this system will be shadergraph based. This will open us possibilities to add ripples to our custom materials like vertex blended puddles or decal puddles. Nice example from des remake

    P.S. would be nice to have this thread pinned
     
    Lahcene, TerraUnity, soleron and 3 others like this.
  47. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Sure.
     
  48. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    So you can already override the local displacements with your local water simulation in the current state using shader graph. That said, we plan to offer an out of the box way to do it so that you just have to inject perturbations
     
  49. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    It is already kind of the the case, you can specify the radius of the planet on the infinite water surfaces that said for water right now it is purely visual (which mean that it is a round planet that follows you and we plan to unify the planet settings somewhere in the future.

    (old video, don't mind the rendering, just to showcase the spherical earth)
     
    soleron, ftejada and valarnur like this.
  50. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    880
    Thanks!