There are three types of water shaders that come with Daz Studio Iray – water, water dispersive, and water thin. I started learning about Iray water shaders by creating a very simple scene – just a girl wearing a swimsuit, who is standing in water.
The image below is the finished product of my water shader experiment. In this tutorial, I talk about the different parameters of the Iray water shader, and what I focused on to create my pin-up render.
1. Water Shader
I create the scene as I normally would. Here I am using FWSA Gillian HD and LF Sorbet Swimwear, which fits in very well with a water pin-up scene. The only extra change I made here, is to make her skin appear more wet by increasing Glossy Reflectivity to 0.9, and decreasing Glossy Roughness to 0.4, for all skin surfaces.
Once I am done, I make a plane primitive and apply the Iray water shader to it. When I look at the surface properties of my water plane, there are two key properties – reflection and refraction.
To get a good reflection on my water, I want to pick a good environment map and rotation angle. I like the Barcelona Rooftops HDR that I got from sIBL Archives, so I use it here, starting with zero rotation. Unfortunately, at this rotation, it is filled with large buildings and palm trees, which is not a very pleasing reflection on my water. Therefore, I adjust the rotation until I get an interesting far-away skyline, that I am happy with (rotation = 270 degrees).
Another important aspect of the Iray water shader is refraction. Light travels at a different speed in air than in water. Therefore, when light enters water, it gets bent (at the point of crossing), thereby allowing us to see more of the leg that is submerged. Without refraction, her foot would not be visible.
Submerged objects always appear to be shallower than they are because the light from them changes angle at the surface, bending downward toward the water.
However, because all we have is our water plane and there is no ground plane, her foot looks like it is not standing on anything. To fix this, I duplicate my water plane by going into Edit > Duplicate > Duplicate Node(s). This creates a duplicate plane which I call ‘Ground Plane’. Next, I apply the Concrete Iray shader to my ground plane, and then move it down so that my pin-up girl is standing on it.
Notice that there is now a shadow under her foot, and there are also interesting patterns on the water due to refraction of the ground plane.
You will notice, that there is wind in our render that is blowing out our pin-up girl’s hair. This wind will also create waves/ripples on our water. To add waves to our currently flat water plane, we add in an appropriate normal map. We can do a search for “water normal map” or we can get a normal map from one of our existing environments.
Next, I edit my water plane surface, and load in my water normal map. I can increase the number of Horizontal and Vertical Tiles in my shader parameter, if I want to make my water be more wavy. Finally, I can also color my water plane, for example make my water appear more blue, by changing the Base Color parameter of my water plane.
2. Water Thin & Water Dispersive
The Water Thin Iray shader is just like the Water shader except that it has the Thin Walled parameter turned on. This just means that the water shader is only applied to the surface of the object, instead of the entire volume of the object.
Thin Walled – This property sets the volumetric effects of the surface. Compare a bubble (on) to a marble (off) for example.
~~[Daz Documentation Center]
For example, cornea surfaces are often set to Water Thin. Another great example of a thin surface object are bubbles. In my first bubble image, I have the Thin Walled parameter set to Off. In this example, my bubbles look more like droplets of water rather than bubbles.
In the next image, I have the Thin Walled parameter set to On. As you can see, our bubbles are now starting to look a lot more like bubbles.
Another very cool aspect of bubbles is that they have chromatic dispersion. These result in the many colors we may see on bubbles, in an oil slick, or in a rainbow.
A bubble film is a sort of sandwich: a layer of soap molecules, a filling of water molecules, and then another layer of soap molecules. When light waves reflecting from one layer of soap molecules meet up with light waves reflecting from the second layer of soap molecules, the two sets of waves interfere. Some waves add together, making certain frequencies or colors of light brighter. Other waves cancel each other, removing a frequency or color from the mixture. The colors that you see are what’s left after the light waves interfere.
That is what the Water Dispersive Iray shader addresses. It has an additional parameter called Abbe.
Abbe is a conatant chromatic dispersion. Lower numbers (but greater than 0) give more dispersion on the surface, and the higher the value, the less dispersion. This works on surfaces with volume, not on Thin Walled surfaces.
~~[Daz Documentation Center]
Note that Abbe does not work on Thin Walled surfaces. Therefore, to test this out, I need a double layered bubble (i.e. a bubble that is geometrically represented by both an outer and inner layer). I found such a bubble in the 3D Bubbles product by MindVision G.D.S.
Chromatic dispersion works here. However, the two sided bubbles look a bit too substantial for bubbles, and ends up looking more like glass. Personally, I like the Thin Walled version best.
3. Under-Water Scene
There are two important aspects in an underwater scene, volumetric or atmospheric effects and caustics. I achieve my underwater atmospheric effect by using AtmoCam for Iray by Marshian. We can also set up our own volumetric cube by following some of the guidelines discussed here (in the Daz3D forum).
In optics, a caustic or caustic network is the envelope of light rays reflected or refracted by a curved surface or object, or the projection of that envelope of rays on another surface.
In water, cool caustic patterns are made by the curves of surface waves. To generate these caustic patterns in my underwater scene, it is easiest and most time effective to fake it using a Gobo light.
- I first did a search for “water caustics texture” and download some patterns that I like.
- Then, I placed a spotlight up high up in my scene, and point it down at my focus area. I want it high enough so that it casts a bunch of almost parallel rays into my scene.
- Next, I create a plane and apply my water caustics texture to the Cutout Opacity parameter of the plane. White represents opaque and black represents transparent. Therefore, I want my caustics lines to be in black and all the rest to be in white. If necessary, I can invert the image using the Layered Image Editor.
- Finally I position the plane in front of my light so that it casts the proper shadows onto my underwater floor plane.
Another way to achieve caustics is to do it for real by setting up an appropriate scene with appropriate shaders, and then letting the Iray renderer physically generate the water caustics pattern. This will take much longer to render, but will create more realistic looking results.
It was a big challenge for me to get Iray to generate caustic patterns in my underwater scene. I was finally only able to do it by using Overcomeon’s underwater caustic test scene.
Remember that the caustic patterns are formed by reflection and refraction off the curved surface of waves, on our water. Therefore, we will need waves on our water plane. In addition, reflection also plays a very important role to bounce off our light rays, thereby increasing the area where the patterns are created. To get caustics in my scene, I needed to place several large planes around my scene to bounce off my sunlight.
Finally, we also want to go to Render Settings > Optimization and turn ON the Caustic Sampler parameter. This will hopefully increase render efficiency of caustics in our scene. Note that this is just an optimization or render efficiency setting.