I’ve made a lake using a plane with a Solidify modifier. For texturing I’m using a mix of Glass and Glossy for the surface and Scatter and Absorption for the volume.
Rather than a procedural texture for the movement, I’m using a displace modifier so that the water moves against the shoreline. Here’s an example:
As can be seen from the video, the problem is that along the shoreline, the water looks more like oil because of the glossiness and lack of transparency. So I’d like to find a way to factor the mix shader, saturation, value etc. all according to the apparent “depth” of the water.
But of course the water is really all the same depth!
So I can see basically two choices:
Get a measurement of the distance between each vertex of the water and the nearest vertex of the landscape its sitting in. In this thread (https://blender.stackexchange.com/questions/7745/cycles-node-to-tell-distance-from-an-empty) there are two methods shown of using distance between objects to affect materials nodes; however I’d like to know if it’s possible to get that information per vertex.
Change my water object to a cube and actually shape it to sit in the landscape using a Shrinkwrap modifier. Then I should be able to use a Fresnel input to at least make the water clearer nearer the edges.
The first option, if it’s possible, should be more realistic. There are some parts where there is a very steep drop into the water, while others are more gentle, so simply making the water clearer at the edges is very much a fallback option.
So my question is: Is there a way to use Drivers, Texture Coordinates or something else to get per vertex distance information?