Here is a previous reply I made to that question:
The speed of the various waves are not currently forced into integer relationships, so it is not directly possible to set the ocean shader such that it loops over time. This is often requested, however, so at some point we could perhaps add a loop toggle along with the number of frames. One can use other methods to get looping over time, however.
I was able to get the following cross dissolve trick to work:
1. Create an ocean( or ocean shader). Make the numFrequencies and waveHeight both zero so that the ocean is totally flat( and more optimal to render ).
2. Map the oceanShader waveHeightOffset with an ocean texture..asProjection = ON and newTexturePlacement OFF. On the projection make the rotateX = 90.
3. Map the colorOffset of this texture with another ocean texture.. asProjection = OFF and newTexturePlacement = OFF
4. Animate the time values of the two ocean textures such that the start of one is the same as the end of the other:
In the time field on oceanTexture1 type:
= frame/30 (the time parameter generally expects seconds, not frames)
In the time field on oceanTexture2 type:
= (frame-200)/30
5. Keyframe the waveHeight on the two textures to do a cross dissolve:
oceanTexture1 frame 1 = desired height, frame 200 = 0
oceanTexture2 frame 1 = 0, frame 200 = desired height
The ocean animation should now loop across 200 frames. For it to work the two ocean textures must have identical values( appart from the wave height and time ). Note that with this method you cannot preview the displacement of the ocean using heightfield node(convert displacement to poly will work, however). Also buoys and boats will not animate with wave height(texturing on the ocean shader is currently not taken into account for these effects).
Duncan