Using the Ripple Shader

By Rodrigo Duarte on July 27, 2012

The Ripple shader is a great tool for creating quick liquid surfaces. We’ll explore some of the options of the shader here, using a pool scene as an example.

The Ripple Shader creates linear, circular or random ripples for use as ripples in the surface of liquids (or bump for fabrics or any other use we may think of).

It has several unique controls that make it a somewhat nonstandard shader, and it is fun to play with.

We will use a simple pool scene (don’t look at the hedges, please) to illustrate the different possibilities that this shader offers.

This is the base scene:

On top of the water texture, we’ll add a Ripple shader.

Mapping

Before playing with the texture, a word on mapping.

The suggested mapping is Decal, to prevent unwanted ripples from appearing in the bottom of the object.

 

Remember to position the decal mapping close to the surface, or in any case, above the middle of the water object to apply the Ripples to the surface only.

The Texture

The texture dialog is different from other shaders.

  • With the Add Ripple button we add new ripples.
  • With the Delete button we delete the selected ripple.
  • We select ripples with the Selection drop down menu.
For each individual ripple we have several options.
Position: We can position the ripple by hand, dragging the blue cross, or by typing numbers in the u and v fields.
Ripple Type: The available ripple types are:

Linear

Linear ripples are like waves on a beach, without any breakers, of course.

 

We can control the direction of linear ripples with the circle control. If the ripple type is not Linear, the control is dimmed. When the Ripple Type is Linear, we can drag the black wedge to define the ripple direction.

Circular

We’ll want a square texture size in the mapping for circular ripples.

Random

Random ripples are non-directional.

Frequency: defines how closely spaced the ripples will be.

Amplitude: defines the bump amplitude for each ripple.

Speed: this is used when animating, defines the ripple speed.

Age: the age of a ripple is important in linear and circular ripples, as it controls the expansion or advancement of the ripples.

We can combine ripples of different kinds in a single shader. Doing this will often result in more realistic liquid surfaces.

The image above shows a single linear ripple.

The image below adds a circular ripple

Finally, a random ripple in the same shader.

Finally, an animated view. The Speed of the ripples varies between 0.1 and 0.2.