Improved water visuals are available in Unity via new capabilities in the HDRP render pipeline under Unity 2022.2 and Unity 2023.1. There is a package of several sample scenes available that can be included in a project as a basis for customisation, and also a complete “WaterScenes” Unity project with Island, River and Pool scenes
WaterScenes – The Island
This scene use an infinite water surface to simulate the ocean. In addition, this scene uses water deformers and foam generators to improve the visual around the shoreline. There are also examples of how to use custom render textures to generate water deformers.
In play mode a 3rd Person controller is used to visit the island. Keybord controls:
W/Z or up arrow: forward
S or down arrow: backward
A/Q or left arrow: left
D or right arrow: right
A game pad can be used too.
WaterScenes – The River
This scene use instanced quads for the water surface in addition to a current map to simulate the flow. In play mode there are 2 fix cameras. TAB key is used to switch between them.
WaterScenes – The Pool
This scene demonstrate the pool parameters and how to use custom render textures for water deformers. In play mode a 3rd Person controller is used.
WaterScenes: test package with Island, River and Pool scenes – https://github.com/Unity-Technologies/WaterScenes
High Definition Render Pipeline Package – Samples – Water Samples
The package contains a number of sample scenarios to act as the basis for your own projects… Glacier, Island, Pool and Waterline ( with the camera set at water level as the waves lap up and down). The Glacier sample is the most complex and needs a number of Project Settings to be enables. A helpful guide appears on the editor screen to point you at the settings required to be enabled,
Supercar Imported in Unity WaterScenes
My Supercar model in FBX form along with a Textures folder was imported to the Unity project Assets. The model asset “Materials” tab was amended to to extract the textures from the FMX model to ensure the model materials could be edited. Most needed adjustment or to enable transparency (cockpit glass, etc).
Unity Water Project from Scratch
- Using Unity 2023.1* or later create a new project with the HDRP (Core) template.
- Using the Quick Start guidance set up the “Project Settings” necessary to ensure the Unity Water features work. These are under Quality > HDRP > Rendering and Graphics > HDRP Global Settings > Frame Settings. You might add the settings to allow Foam and Water Exclusion at the same time as they may be useful later.
- Add a Water Surface – e.g. Ocean and make any adjustments to customise that.
- Add in your own 3D content. I usually starter initially with a simple platform (extended cube) sat above the waves in the centre of the scene (0,0,0) for testing.
- You might to experiment with adding in a “Water Excluder” to avoid waves appearing through platforms, boats or land areas. See this guide. Set the exclusion zone area using a mesh that is the same as the area to be excluded.
Other Users’ Experience
@BinaryLunar produced this example video…