Graphics Programs Reference
In-Depth Information
5. Connect the
Multiply
node output to the
Color1
input of the
Burn
node.
Connect the output of the
Burn
node to the
Fac
input of the
Mix Shader
node, as shown here:
How it works...
This material, which looks quite complex, is actually easy to understand by splitting
the entire process in three stages corresponding to the three group nodes:
•
The first stage
: Here, we created the basic ocean water shader by mix-
ing a
Glass
shader with a
Transparent
shader on the ground of the
Fa-
cing
value of the
Layer Weight
node, and then with a
Glossy
shader
driven by the water index of refraction (the
IOR
value of the
Fresnel
node, which for water at 20° C is of
1.333
). In short, this means that the
ocean surface is nicely reflecting the environment, but for the faces look-
ing towards the camera (the
Facing
factor), it is transparent and lets the
"underwater" show through. Very important is the bottom ocean plane,
used to mimic the water volume, the underwater perspective, and also
emitting light to enhance the effect of the sun bouncing from the ocean
surface to any floating object:
•
The second stage
: This is where we worked on the material for the foam,
a simple white
Diffuse
shader. In fact, the peculiarity of the foam shader