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

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:
    3,133
    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:
    496
    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:
    122
    Is the water system also compatible with Unitys path-tracer?
     
  4. chap-unity

    chap-unity

    Unity Technologies

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

    VRS3DGuru

    Joined:
    Sep 21, 2017
    Posts:
    5
    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:
    496
    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:
    315
    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:
    315
    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:
    315
    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
     
  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:
    496
    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:
    496
    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:
    3,133
    @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:
    496
    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:
    49
    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.
     
    chap-unity likes this.
  20. NightElfik

    NightElfik

    Joined:
    Oct 27, 2014
    Posts:
    20
    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:
    496
    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:
    20
    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:
    496
    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.