Graphics Programs Reference
In-Depth Information
click on the
Assign
button. Now the ocean cube has two materials: the
transparent water surface and the opaque sides/bottom (a simple white
Diffuse
material). After this, go out of edit mode.
3. In the
Material
window, click on the
ocean_surface_under
material
to select it. In the
Node Editor
window, delete the
Foam
and the
Foam_location
node groups and also delete the two
Mix
nodes. Just
to make things clearer, ungroup (press
ALT
+
G
) the remaining
Ocean_water
node group.
4. For the moment, place the
Ocean water
and the
Mix Shader
nodes
ideally aside. Add a
Texture Coordinate
node (press
Shift
+
A
and go
to
Input
|
Texture Coordinate
), a
Mapping
node (press
Shift
+
A
and
go to
Vector
|
Mapping
), and an
Image Texture
node (press
Shift
+
A
and go to
Texture
|
Image Texture
). Connect the
UV
output of the
Tex-
ture Coordinate
node to the
Vector
input of the
Mapping
node and the
Vector
output of this one to the
Vector
input socket of the
Image Texture
node.
5. In the
Image Texture
node, load the
caustics_tileable_low.png
texture and set the color space to
Non-Color Data
.
6. Add a
Diffuse BSDF
shader and a
Transparent BSDF
shader. Add a
new
Mix Shader
node. Connect the
Diffuse
output to the first
Shader
in-
put of this
Mix Shader
node and the
Transparent
shader output to the
second one. Connect the color output of the
Image Texture
node to the
color input socket of the
Transparent BSDF
shader and the
Alpha
out-
put to the
Fac
input of the same
Mix Shader
node.
7. Now connect the output of this second
Mix Shader
node to the first and
still empty
Shader
input socket of the first
Mix Shader
node.
8. Add a
Light Path
node (press
Shift
+
A
and go to
Input
|
Light Path
)
and connect the
Is Camera Ray
output to the
Fac
input of the first
Mix
Shader
node, as shown here: