In this recipe, we will build an ocean surface material, using the Ocean modifier and procedural textures to create the foam and establish a set of nodes to locate it on the higher parts of the waves, as shown here:
Before we start with the shader's creation, let's prepare the ocean scene:
Start Blender and switch to the Cycles rendering engine. Select the cube and delete it (press X).
Add a plane (have your mouse in the 3D window and press Shift + A and go to Mesh | Plane). In the Object mode, scale it to
0.300
. Don't apply size.Go to the Object Modifiers window and assign an Ocean modifier. Set these values: Geometry to Generate, Repeat X and Repeat Y to
4
, Spatial Size to20
, and Resolution to12
.Press N and in the Transform panel set these values for the plane's Location: X -6.90000, Y -7.00000, Z 0.00000.
Be sure to be at frame 1 and place the mouse in the modifier's Time slot, press I to add a key for the animation. Go at...