52

I'm creating a scene with large amounts of water that will be readily visible, containing refraction and at various angles. The scene is an indoor long-course swimming pool, about 50 meters, all of which would be seen by a camera above 5 meters above the water's surface. This is being fluid-sim'd, but there are no quickly-moving objects or people, so any water movement is slower and in bulk. The "remove bubbles" option is enabled.

I've tried using a Mix Shader of Refraction BSDF and Reflection BSDF with the factor coming from a Fresnel node, but the results appear either too glossy or too transparent and overly colored. How can I make the water appear realistic? Changes to shaders (refraction to glass)? Or is tweaking colors sufficient?

wchargin
  • 9,452
  • 5
  • 41
  • 66
nanofarad
  • 2,906
  • 3
  • 22
  • 33

8 Answers8

27

It is very important to add some small scale displacement to the water surface. This small scale detail is present even in closed spaces due to minor drafts of air, especially in large pools of water. My personal experience is that for best results you can use a combination of animated voronoi textures, like perlin noise does.

This small detail makes it possible to have areas of water that are slightly more refractive or reflective than others. To separate the refraction and reflection parts, you use a standard fresnel factor connected to a mix shader node.

This is my example shader:

(play with index of refraction to achieve a different ratio of refraction to reflection depending on the angle of viewing)

Water with displacement

And this is the resulting water:

water displacement result

Of course on indoor scenes you will need many samples or clever lighting to avoid too many fireflies.

Ray Mairlot
  • 29,192
  • 11
  • 103
  • 125
Antony Riakiotakis
  • 1,072
  • 7
  • 8
  • 6
    Could you provide a blend-file pls? I fail to reproduce your example in blender 2.75a. The water is black and the stuff which is behind the water doesn't shine through. Thanks! – Hamburml Aug 05 '15 at 19:02
  • Hey, just to inform you that the pictures used in this answer are not visible. – softyoda yoann Jun 15 '16 at 14:11
23

enter image description here

I've found that using a simple glass glass node works. Also it would help to mix in a refraction node and set the IOR to 1.333, which is the IOR of water. If you want foam use a voronoi crackle texture node and invert the alpha so that the "crackles" give the reflection as white and it looks foamy. You will have to tweak the setting to get it looking the way you want it. The look of your water also depends on your lighting. Always Model, then Light, then create your materials and texture, and finally post processing.

iKlsR
  • 43,379
  • 12
  • 156
  • 189
Owen Patterson
  • 3,257
  • 7
  • 21
  • 28
17

Large scale water (almost opaque) looks very different than small scale water (very transparent). Fast water(whiter, low reflectivity) also looks very different than slow water(clearer, high reflectivity). So unfortunately there isn't a simple answer.

Since water is transparent, the lighting and environment which it's in is very important. A drop of water in a blank world is going to be invisible. So realistic lighting and proper environment for it to reflect off helps a lot.

Mike Pan
  • 11,990
  • 1
  • 37
  • 58
  • If you're doing a fluid sim, fast/slow won't matter; the reflectivity changes (at least in Blender) are due to the presence of additional surfaces within the water, with the gaps between them causing refractions as they rush past. – Kyle Willey May 23 '13 at 15:53
12

Here is another example for a lake water with very deep and strong reflection; Nodes: Nodes Result: result

I did not let it render much samples(only 3) so the image is low quality, but you can see so water shader looks amazing;)

Hope this answer helps you to make lakes and rivers;)

Adrians Netlis
  • 1,794
  • 18
  • 29
5

The Glass BSDF node offers essentially everything that you want.

The IOR you will want to use is 1.333 (from a Blender Artists post), and you'll pretty quickly get a good look for stationary water. If you want foam, you'll have to get a little bit clever with your implementation, but water by itself works pretty well just with the single shader.

If you're using the newest version of Blender, it is also possible to do SSS to mimic the effect of light in water.

Example: My attempt at making a standard water.

Standard Glass BSDF

Here's one with SSS; it's not realistic, but could be helpful for portraying deep water (i.e. oceans).

Glass SSS BSDF

In short, I'd strongly recommend using a simple Glass BSDF for your water, and if you run into issues trying to work around it, rather than trying to build the water from scratch using reflection/refraction. Cubes aren't the best way to show this; I put mine inside a "container" because otherwise you get to see the glass reflecting on itself, but this shouldn't be an issue with a more complex model.

Note that the second render got more samples, so any quality discrepancies are likely due to that.

Kyle Willey
  • 1,943
  • 1
  • 14
  • 20
4

The Glass BSDF shader in Cycles should work pretty well. Change the IOR: value (index of refraction) to 1.333, and you should get perfectly clear water. If your looking for a murky type look, use a Mix Shader to mix the Glass BSDF with a Diffuse BSDF.

Shady Puck
  • 8,847
  • 6
  • 34
  • 61
CharlesL
  • 15,316
  • 7
  • 53
  • 88
1

preview nodes

Here take mine. Added stuff from above. Btw. I use EEVEE

Someone
  • 111
  • 2
  • 1
    Your answer would be much more useful if you explained the nodes. Just dumping a picture of the node tree, while helpful to some people, is really not the best. – David Jul 13 '19 at 14:32
0

Glass shader and transparent shader goes to mix shader and IOR in glass shader to 1.33. Remember to crank up the transparent value in render setting to around 8 minimum and light bounces to 4 minimum.