Some time ago I needed loop-shaped animated clouds for a project. The cloud needed to end in the same shape it started, because the animation would play without intervals like a GIF. Since I did not find any examples of animated looping clouds, I decided to create this topic to help people who are in need of this too. The work I already finished long ago, but at the time I took a whole month to create this solution, because I am not an advanced Terragen user and had never worked with nodes.
I found in this topic an example provided by the user named "Hetzen".http://www.planetside.co.uk/forums/index.php?topic=13948.0
In this exemple the cloud displacement is based on the number of the current frame in the sequence. And the amount(speed) that the cloud moves every frame will depend on the value you assign to the node within the group called "Set Cloud Speed", in the example the value is 10 meters per frame. If the frame number is zero will not move the cloud. When the frame number is 50, the clouds have moved 500 meters (10 * 50). So when rendering the last frame, which in the my example is 3000, the clouds have moved 30000 meters (10 * 3000).
Starting from this principle, I duplicated the group of nodes that does the animation of the clouds, except that in this group I did the inverse logic. In the first frame of the animation the clouds begin with maximum displacement(10 * 3000) equal to the last frame of the first group of nodes and it loses the displacement until arriving at the last frame of the animation and get the same shape that began in the other group.
After that using only basic math, I just mixed the two groups of nodes using the node called "Merge Shader". This node mixes the two animation groups based on a value between 0-1. If the input value is zero, it will show only the first group of animated clouds. If the input value is 0.5 it will show the two groups equally mixed. If the input value is 1 it will only show the clouds of the second group with the inverse animation.
The mathematics behind this is very simple, we need to pass as the input value the number referring to the current frame of the animation, but before we need to normalize the value between 0 -1 with the following calculation:1.0 / SequenceSize * frame.
Then just render the animation, and like a magic pass we have a beautiful loop animation.
I'll attach the file with the example to get saved in the forum in case the direct download link no longer works.Download Here
Sorry if my explanation was not easy to understand, my language is not English!