As you can see from the scene below , I have a plane setup to simulate a lake :
The plane is using a displacement mod to simulate water ripples. The displacement texture is animated by means of an empty that is parented to a bone in an armature. I have set the bone to rotate on its Y axis 360 degrees so that as it rotates full circle , it creates a looping seamless animation of the water rippling gently.
This is all good , however, I have to make the whole rotation 3500 frames long to get the water ripples to go slow enough to look the way I want. However , as this animation is to be used in game , I really need it to be 48 - 96 frames max. The issue I have though is that I can't find a single section of the 3500 frame animation where I can cut such a segment from that gives a believable loop that does not jump.
Can anybody offer any advice? @waylow this is probably something you know all about?
Thanks in advance guys :)
If I remember correctly, Greg Zaal showed a technique which could be used for something like this here:
https://cgcookie.com/tutorial/creating-a-looping-cloth-simulation
I can't recall how many frames the loop was in the Halloween animation but check out this video
https://cgcookie.com/lesson/procedural-pond-surface-animation
But this type of thing seems right in Kent's wheelhouse( @theluthier )
Ahh I remember dealing with this exact same issue! At that time I took the easy route and simply dissolve transitioned the image sequence during video editing. If you look close you can see a subtle jump.
However as I'm rethinking this problem, you could try a similar "dissolve transition" in the shader instead. For this to work you'll need to go with shader bump instead of geo displacement. I suppose you could bake the resulting procedural texture to an image sequence to then plug into a displacement modifier..but that's too convoluted and unnecessary since the pond surface displacement is so subtle anyway.
Ok, here's my attempt to describe the approach clearly:
The result should be a seamless loop of the textures at the beginning and end with the transition in the middle.
Does that make sense frikkr?
EDIT: I couldn't resit making an example .blend file: https://www.dropbox.com/s/2051gs1vrls2yq3/looping-pond.blend?dl=0
The speed of the waves can be adjusted by extending / shrinking the second keyframe of both mapping nodes.
Well, if you want to use a Shader for the displacement, you might be able to use this Node setup (the second, improved one):
https://cgcookie.com/questions/11218-want-to-loop-a-noise-texture-here-s-a-way-to-do-that
This works because we now have 4D Textures
The above mentioned node setup for looping a noise texture was made with the procedural fire by @theluthier in mind and gives a choppy effect. So here is a smoother variant that is more suited for a water surface:
By the way if you take a Value Node and type #frame in the number field, Blender automatically sets up a Driver for you....
Great stuff guys , thankyou all for your help. I have lots to try out now and I will keep you posted on the outcome :)