Animated Shoreline – Tutorial

As requested, here is a short tutorial of how to create an animated shoreline with foam coming in to the shore, and going back out again.

Firstly, I looked at a few videos on youtube to get an idea of how the waves break on a shoreline, and how the foam looks at the different stages of the wave break.

This tutorial uses vue 9 infinite, but most other versions after 7 (when the water editor was introduced) should work just as well.

With vue open, the first step was to create a sandy shoreline. This was a simple procedural terrain, stretched out and made quite flat so that it gave the impression that it was just a slight incline onto the beach. Then the water was added.

The water uses the metawater material, “default water”. It is important to use a meta water for this in order to get the proper functions to change the foam later in the process. For the purposes of demonstration, the foam has been set to red in order to clearly see how the foam is changing.

To start the process of animating the water, click the animate button and then close the wizard in order to get the timeline at the bottom of the program.

Before we start to create keypoints on the animation track, we must think about what is trying to be achieved within the animation. Firstly we want to emulate the sea breaking waves onto the shore, the logistics of which we saw in the video earlier.

Typically, the sea moves in one direction… this means that the sea object must continuously move in the same direction throughout the animation cycle to create a realistic animation. When a wave hits the shore the foam increases in size and moves up the shoreline, it then goes back down where it meets another incoming wave and dissipates.

To start this process we need to increase the height of the water slightly so it appears to move up the side of the procedural terrain as a wave would move up a beach.

Firstly, move the timeline handle to 1.5 seconds,

This will add a keyframe here depending on the settings that are changed. Now move the water up and across the procedural terrain so that the water moves towards the shoreline.

The circled dots that appear when you move the shoreline are where the keypoints have been placed for the movement of the sea object.

So now the water moves up the shoreline, but there’s a problem, the foam remains the same width and depth throughout the entire process. This isn’t very realistic.

To counter this we need to change the settings of the foam, this will take place in the function editor. Open the material editor, then with the “foam” material selected, right click on the color production image and select edit function.

The node in the function editor we are interested in is called “wave”. Select the node and you will notice that there are a lot of similarities between the options here and those seen in the water editor. To make the foam look a bit more realistic I changed the coast foam depth option from 0.276 to about 2, this increases the length of the foam away from the shore. When you change this number, a pop up box appears asking if you want to animate the material. click yes.

To make the wave go back down the shoreline, simply repeat the process but backwards, so move the water down again while leaving the foam at the same level until it meets the next wave coming in from the sea then becomes a small layer of foam again and pushes back up the beach. Ensure that you keep the water moving in the same direction else the water will look very strange.

There are a number of ways of doing this, but this is the way that I would do this, If you have another method and want to contribute it to the site, please contact me

Keep an eye on this thread at renderosity for other peoples suggestions and tips.

1 thought on “Animated Shoreline – Tutorial”

Comments are closed.