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

How to set up the new Water System

Discussion in 'High Definition Render Pipeline' started by Rowlan, Apr 6, 2022.

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    I've been trying to find out how to set up the new water system that came initially with 2022.2.0a9. It wasn't that straightforward, so I thought I'd make a post for others.

    * Project Settings > Quality > HDRP > Rendering > Water

    s1.png
    * Project Settings > Graphics > HDRP Global Settings > Water Rendering

    s2.png
    * Hierarchy > Water Surface > Ocean

    s4.png

    In case everything is white like it was for me, adjust the Exposure in your Sky and Fog Volume.

    Looks like this then:

    game.jpg
     
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    In case nothing is showing with all those steps, make sure that Water is enabled under
    Graphics > HDRP Global Settings, Frame Settings (Default Values) in the "Rendering" Foldout upload_2022-4-6_10-35-45.png


    Also, for the Water Rendering override, you can just add it in a volume to your scene like any override.
    You don't HAVE to use the default volume profile asset in Graphics > HDRP Global Settings.
     
  3. wm-VR

    wm-VR

    Joined:
    Aug 17, 2014
    Posts:
    123
    Is the water system also compatible with Unitys path-tracer?
     
  4. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Nope, sorry :)
     
  5. VRS3DGuru

    VRS3DGuru

    Joined:
    Sep 21, 2017
    Posts:
    12
    How do you add this into 2022.1.7f1 manually?
    Is there a specific preview package we can add to start working with it before 2022.2.1 is released?
     
  6. Ad

    Ad

    Joined:
    Aug 16, 2012
    Posts:
    11
    Hello,
    I've followed the above and still have no water rendering.
    You mention Project Settings > Quality > HDRP > Rendering > Water
    There is no option for CPU

    https://imgur.com/a/zGaFwtc

    all other options regarding water are ticked.

    Sys spec : ryzen 5 3600 CPU
    AMD RX480 8GB GPU
    using windows 10 home edtion.

    Any help would be appreciated thanks.
     
  7. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    If you already checked, Frame Settings, HDRP asset, Volume Override (which technically should be enough), you can try two other things.
    • Try reimporting HDRP (Right click on Packages/High Definition RP folder and reimport), sometime some shader can be corrupted and prevent some effect to be working properly
    • Close project, delete library folder and re-open.
     
  8. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    I am using Unity 2022.2 beta, and doesnt work, i have all water options activated, i create an Water surface object and no water is rendered. I dont have some of the options shown, also can't find anywhere the Volume override mentioned in last post. I reinstalled hdrp as mentioned in last post and that just made the project not work at all, there is not global settings for hdrp and get lot of errors.
     
  9. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    I removed the project, created a new hdrp project and just activated water system in hdrp global and in quality hdrp, then created a Water surface object of ocean type, pressed play and no water is rendered
     
  10. Marked

    Marked

    Joined:
    Feb 24, 2015
    Posts:
    32
    did you added Water Rendering to your global volume ?

    upload_2022-8-29_8-28-51.png
     
  11. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    Yes, found the problem some days ago, the problem is that besides that you need to add water as one more volumetric effect ins hdrp settings
     
    buc likes this.
  12. alias

    alias

    Joined:
    May 14, 2013
    Posts:
    11
    i followed all your steps and i also didnt get a water surface only the icon.

    then i added a global volume to the project, and add the water component checked all the boxes.
    and yes there is now visual water
     
  13. alias

    alias

    Joined:
    May 14, 2013
    Posts:
    11
    anyone knows how too get buoyance on like boats? like they move with the waves?
    i know there is 2d buoyance. but i couldnt anything like this for the new water system.

    which looks really good. with the caustics and underwater settings.
     
  14. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Depending on which version you are, the WaterSurface script, there's an API to query the projected position of the current water surface at a specific position (basically to make an object stick to the surface).
    After that, it's up to users to create the buoyancy system depending on their needs !
     
  15. alias

    alias

    Joined:
    May 14, 2013
    Posts:
    11
    Depending on which version you are, the WaterSurface script, there's an API to query the projected position of the current water surface at a specific position (basically to make an object stick to the surface).
    After that, it's up to users to create the buoyancy system depending on their needs
    --------------------------------------------------------------------------------------------------------------------------------------------

    Im on 2022.0b4 beta.

    too bad it isnt a physic droppdown option.
    like you have with the 2d Buoyancy
     
  16. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Then you should be able to query your WaterSurface with this function FindWaterSurfaceHeight()

    Yep, for now it's completely independent on the Physics system.
    This can be revisited in the future but there's still many important work to do on the water system before that.
     
  17. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    @chap-unity Is there some integration or instruction about how to use rivers with the unity splines?
     
  18. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Sadly, no. For now water system is not integrated with any other system. You have to feed it custom geometry if you want something specific.
     
  19. shikhrr

    shikhrr

    Joined:
    Nov 19, 2013
    Posts:
    68
    I hope the unity splines package gets integrated into water and terrain systems like unreal. This is important, a lot of users would love that.
     
    Marcos-Elias, graskovi and chap-unity like this.
  20. NightElfik

    NightElfik

    Joined:
    Oct 27, 2014
    Posts:
    27
    Is it expected that water does not work when MSAA is enabled (forward rendering)? I have spent too much time figuring out why water is not rendering and MSAA was the culprit. Is there any way to get water + MSAA? (Unity 2022.2.0b8)
     
  21. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Hey, sorry about this one. Water is just not compatible with it and right now, it will throw a bunch of errors.
    It has been "fixed" on our side by not being able to enable MSAA if you have water enabled in the HDRP asset (same as raytracing for exemple).

    In the future, maybe a fallback will be made but for now, it's just not supported.

    Edit : This "fix" will be backported to 2022.2 as well.
     
  22. NightElfik

    NightElfik

    Joined:
    Oct 27, 2014
    Posts:
    27
    Thanks for the answer. I am curious what technical limitation causes this? How MSAA interfere with water rendering/simulation?
     
  23. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    It's because the rendering algorithm for water surfaces is only deferred (there's no forward version of it).
    Since MSAA is only compatible with forward rendering.. that settles it.
     
  24. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97
    Is anybody else experiencing this issue where caustics are rendered as triangles?

    This is in a fresh outdoors template in 2022.2.0f1 with nothing but water and a plane underneath it added, HDRP and water surface are on default settings otherwise.

    upload_2022-12-13_9-49-50.png
     
  25. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97
    Talked to a Unity dev on Discord about this issue, as expected it's another easily reproducible issue on AMD GPUs.

    Kind of sad that I'm the first to notice something this obvious since the water system has been in development for some time. This is a pretty tame case since this isn't a crucial feature in an LTS release for once, but still another clear indicator that Unity simply isn't developed or tested on desktop AMD cards.

    At this point not buying into Nvidia has become an actual liability, and I'm feeling more and more like I no longer have a choice unless I'm willing to put up with tons of downtime writing bug reports, looking for workarounds, and potentially missing a deadline over undiscovered AMD-specific issues that may or may not be fixed in time.
     
    Last edited: Dec 13, 2022
    shikhrr and impheris like this.
  26. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    Wow that is really bad
     
    unity_8p6oRXXqiWbRTQ likes this.
  27. Patrudoizero

    Patrudoizero

    Joined:
    Nov 30, 2018
    Posts:
    13
    It works great in Game mode and Editor, but the water does not show in build.
     
  28. jasonrobertnelson

    jasonrobertnelson

    Joined:
    Feb 2, 2021
    Posts:
    5
    What does it mean when "Water" is not under these settings. I've been trying to figure this out for weeks.
     
  29. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    If you can't see "water" under the HDRP default frame settings or "Water Rendering" in the override list, it just means that you are using an older version of Unity where Water is not supported yet.

    For reference Water is available starting from 2022.2 with a limited amount of features. (And we only backports bugs there)
    And the development continue in 2023.1 alphas with more possibilities added.
     
  30. stojic

    stojic

    Joined:
    Feb 11, 2016
    Posts:
    3
    How did you make reflections work , mine only reflects sky maybe
     
  31. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    If by reflection you mean Screen Space Reflection, then since water is considered a transparent you need to activate SSR on transparent for it to work correctly. There's 3 things to do:
    • Check the frame settings
    • Check the setting on the HDRP asset
    • Enable it in the Screen Space Reflection override.

    Keep in mind that SSR on transparent have some limitations like, PBR accumulation fallbacks to approximation, reflection is always smooth, no sky... etc
     
  32. Laatikkoz

    Laatikkoz

    Joined:
    Feb 14, 2021
    Posts:
    3
    Why I dont have that water system in my unity settings. I use unity 2022 beta
     

    Attached Files:

    • b'.png
      b'.png
      File size:
      4.3 KB
      Views:
      89
  33. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    You probably use an outdated version if you are still in beta (eventhough it should be there in beta anyway).
    Update to any official 2022.2 release and it should be there.
     
  34. benjamin_flashbulb

    benjamin_flashbulb

    Joined:
    Aug 4, 2020
    Posts:
    25
    Hello. Was the Water system removed from 2022.3 (LTS)/HDRP 12.1.8?

    upload_2023-6-2_9-42-41.png

    upload_2023-6-2_9-42-50.png
     
  35. VOTRUBEC

    VOTRUBEC

    Joined:
    Dec 17, 2014
    Posts:
    106
    upload_2023-6-2_17-47-24.png

    I just installed 2022.3. My HDRP version is 14.0.7. It looks like you might need to upgrade your packages.
     
    chap-unity likes this.
  36. SavageDragon

    SavageDragon

    Joined:
    Jul 7, 2012
    Posts:
    12
    Do you guys know where the HDRP water sample is? It was supposed to be under the HDRP samples but I don't see it.
     
  37. shikhrr

    shikhrr

    Joined:
    Nov 19, 2013
    Posts:
    68
    I think it requires HDRP 16.
     
  38. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Yes, it's available in 23.1 and 23.2. The water in 22.2 LTS is missing some key features (like deformers / excluder) to make the samples works correctly.
     
  39. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    sorry, but are you saying that deformers / excluder are not compatible with the water system 22 LTS?
     
  40. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    It's not really about compatibility (it could work in theory), it has just been implemented later and couldn't be backported since it's a new features and not a fix.
     
  41. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    so, it does not work, then the water system is most compatible or functional on 2023
     
    chap-unity likes this.
  42. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    upload_2023-9-13_19-11-9.png

    I'm getting this issue with the new unity water system on 2023.1.12f1

    Everything seems great accept looking up inside the pool from under the water. As you can see its not rendering the transparency completely underside. Any ideas whats causing this?

    FYI : The unity pool sample does the same thing.

    P.S. From my readings this is done on purpose and called total internal reflection. Can it be disabled?
     
    Last edited: Sep 14, 2023
  43. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    It's Indeed what's called total internal reflection and it's an effect that happens in real life when looking at a a grazing angle, might tends to bounce instead of being refracted.

    Currently, it cannot be disabled in the HDRP Water System.
     
    HIBIKI_entertainment likes this.
  44. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    Ah thank you, I was discussing this yesterday after seeing it in an old game recently and saying that Unity's water system has that, I kept thinking is was the open roof in the first room of the HDRP demo scene. Silly me.
     
  45. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    The main reason why it can look "weird" is currently we rely only on SSR / Raytracing for the total internal reflection of underwater and cannot fallback on reflection probes like the regular HDRP reflection fallback hierarchy (like when you are above water for example). This is mainly why it looks "flat" mostly.
     
    HIBIKI_entertainment likes this.
  46. KLGames8207

    KLGames8207

    Joined:
    Nov 13, 2023
    Posts:
    22
    Shader error in 'Shader Graphs/Water': undeclared identifier '_SurfaceGradientResolveNormal_df1ef2108a5245e3bb0489b02997e1a0_NormalOutput_2_Vector3' at line 414 (on d3d11)

    Compiling Subshader: 0, Pass: GBufferTesselation, Domain program with WATER_ONE_BAND
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: DEBUG_DISPLAY PROCEDURAL_INSTANCING_ON SHADER_API_GLES30 STEREO_INSTANCING_ON UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING WATER_THREE_BANDS WATER_TWO_BANDS _ADD_PRECOMPUTED_VELOCITY _DOUBLESIDED_ON _SURFACE_TYPE_TRANSPARENT _TESSELLATION_PHONG _TRANSPARENT_WRITES_MOTION_VEC

    unity 2022.3.0 hdrp :( water cant see on editor and on game window
     
  47. KLGames8207

    KLGames8207

    Joined:
    Nov 13, 2023
    Posts:
    22

    the water system working under unity 2022.3.0? or just in unity 2023?
     
  48. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594
    2022 lts+
     
  49. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    260
    it's maybe a shadergraph import issue, could you try to open the graph and save it ?
     
    KLGames8207 likes this.
  50. KLGames8207

    KLGames8207

    Joined:
    Nov 13, 2023
    Posts:
    22

    That was the first, but the same