This post will show you how to create water with a custom mesh, adjust the settings and gain some artist insight into making water look nice. To keep up to date with the latest tech this post will primarily concentrate on new Pro water stuff, but later on there are some general tips which should be useful to all.
Hydrogen & Oxygen
There are many different types of water you can create or use from prefabs. To take advantage of the latest water effects and scripts I will be concentrating on the Water4ExampleSimple assets which are essentially a couple of 3D meshes representing your water surface, with:
An empty object indicating the world space placement with:
The simplest way is to drag the prefab into your scene, and assign your custom mesh:
Once you have your mesh as water you can begin to play with the settings. Select your Water4ExampleSimple node, and check the parameters in the inspector.
This script is for enabling/disabling realtime planar reflections. Reflections are claculated in relation to the height of the parent mesh that has this script attached to. So the local Y transform of child meshes should be 0. Here you can also enable the reflections to include (or not) the skybox.
You can adjust the specular power from here and drag'n'drop any transform to indicate a specular light source. This can be your directional light transform or any other game object (doesn't need to be a light).
Here you can adjust the settings for the wave generation created by the Gerstner waves generation algorithm.
Next time > Water 4 Advanced is the same tech but with foam and depth extinction.
Is this article helpful for you?
Thank you for your feedback!