Search Unity

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.

What elements make water?

Hydrogen & Oxygen

in Unity?

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:

  • WaterTile script
  • Water shader

An empty object indicating the world space placement with:

  • A Water script which exposes the colours, normal texture and main parameters for the effect
  • A reflection script
  • An optional lighting script for specular effects
  • An optional displacement script

How can I make some water?

The simplest way is to drag the prefab into your scene, and assign your custom mesh:

  • Assets > Import Package > Water (pro only)
  • In the project window open the  Standard Assets > Water (Pro only) folder
  • Open up Water4 folder
  • Drag the Water4Example (Simple) Prefab into your scene
  • Position approximately where you need it
  • Select one of  the tile meshes, go to the mesh component in the inspector > select the round target icon on the right and choose your mesh (must be in your project)
  • Rotate the Water4ExampleSimple parent node 90 degrees, if your mesh comes in at the wrong angle (this can be caused when you export from a 3D app with a different co-ordinate system to Unity)
  • Place your mesh by moving the parent node
  • Remove the second tile 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.

Water Base

Planar Reflection

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.

Specular Lighting

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).

Gerstner Displace

Here you can adjust the settings for the wave generation created by the Gerstner waves generation algorithm.

Water art tips

  • Go and check out some actual water – its always wise to get some visual ref for what you are trying to do. Make a video if you can.
  • Water absorbs red light from the spectrum reflecting back more green and blue rays, in additions to sky, which gives water the impression of being Blue in colour so:
    • You can’t make your surface blue (and you probably shouldn’t)  but if you use green and blue colours on the surfaces below the water such as a pool you can help with the illusion.
    • (I guess this is why Pool designers use green/blue/turquoise tiles).
    • The darker the blue, the deeper water appears – you can use a darker colour on the bottom and tint the refraction darker.

Using blues and greens on the tiles, vs using grey/pink
  • Moderate the effects, subtlety can help suspend disbelief, be sure to experiment but think about moderating:
    • Scrolling speed of normals
    • Reflection
    • Refraction
    • Fresnel and Normal strengths
    • Displacement
  • One useful tip is to turn practically everything off e.g. set sliders to zero and then build up the effects to get the desired impact.
  • If you have a convex mesh (such as water fall/pool lip) add poly detail to the curve to help the water ‘bend’.

Next time > Water 4 Advanced is the same tech but with foam and depth extinction.

15 replies on “Tips for water in Unity”


[…]Unity Technologies Blog » Blog Archive » Tips for water in Unity[…]…

One thing is for sure. You did a lot of research on this. It’s either that or you just have the knowledge. This is impressive

Nice tut but I use a GrabPass for reflection and, with the new version of Unity Player (3.4.2f3), it crashes on Mac OS browsers (except Camino) and works perfectly on Windows. Does somebody have the same problem?

[…] geht es zu dem Artikel, der auf dem offiziellen Unity-Blog erschienen ist. Tweet Posted in News Tags: Design, Effects, […]

This tutorial is not a dynamic fluid surface. It just looks like it.
If a player walks on it,it will not generate waves automatically like natural water.

Before I forget, what would REALLY be helpful is to include tips for optimizing water – it seems that even when it’s barely visible, it can kill performance, and I’d like to know how to make it a less expensive effect – even maybe somehow put some kind of LOD on it so that it’s not always grinding away in the background. Thanks again :)

Thanks, Olly – good tips. I’d always wondered how to use my own mesh for the water – the big disc doesn’t always work so well :) I’m looking forward to the next one on Advanced Water, too.

Comments are closed.