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:
Before we start with creating the shaders, let's prepare the ocean scene:
Start Blender and switch to the Cycles rendering engine. Select the default Cube, delete it (press X), and add a Plane (with the mouse arrow in the 3D window, press Shift + A and navigate to Mesh | Plane). In Object Mode, scale the plane smaller to
0.300
. Don't apply a size.Go to the Object modifiers window and assign an Ocean modifier. Set these values of Geometry to Generate, Repeat X and Repeat Y to
4
, Spatial Size to20
, and Resolution to12
.Press the N key, and in the Transform panel, set these values for the Plane in Location for X as...