3
$\begingroup$

How would one create an animated displacement that could loop seamlessly? In other words, the end of the animation needs to be able to loop to the beginning without a noticeable skip or jump.

The below GIF demonstrates my problem:

enter image description here

See how you can tell when it's transitioning between the last and first frames? That's what I want to avoid.

The method I used to make that animation was to displace a sphere of liquid with a turbulence force field. I am going to assume that it's not possible to create the effect I'm looking for with that approach, and so long as it creates a similar visaual look as the above animation, any methods are good.

In other words, I don't care wether or not I stick to a fluid simulation, so anything works even if it uses shape keys or scripting instead of a turbulence field with a fluid sim.

Thanks in advance!!

$\endgroup$
  • 1
    $\begingroup$ Looks like Naruto's Rasengan training. Maybe helpful: seamless ocean $\endgroup$ – Haunt_House Mar 20 '18 at 0:33
  • $\begingroup$ I would have solved it like in the following answer: blender.stackexchange.com/a/48915/11287 Instead of displacing the plane, i would have displaced a sphere. $\endgroup$ – PHEDev May 21 '18 at 7:26
9
$\begingroup$

You generate the displacement mathematically by combining multiple Sine waves at different amplitudes, frequencies and orientations. By carefully selecting the frequencies of the waves you can ensure that they all coincide at the start/end so that the animation can be looped.

Here's the result :

animated

This is produced by the following material :

material

This looks complicated but look closely and you'll see that it is actually made up of 5 virtually identical sets of nodes - to combine 5 waves.

Here the coordinates (adjusted to move the origin to (0.5,0.5) by the Subtract RGB node) are passed through a Mapping node so as to rotate them by a variable amount and this is then separated into its X coordinate (since we only need a linear value per wave). This is then passed through a Multiply node to set the frequency of each 'wave', with the multiplier for each being set to a multiple of 2*pi - this is what ensures the animation will loop correctly. This used to drive the Sine function and scaled by variable amounts (so the different waves have different influences) before being added together and passed to the displacement. The Value node varies the offset between 0.0 (on frame 1) to 1.0 on frame 51, with the animation running from frame 1 to 50 (since 51 should be identical to 1) - ensure to use Linear interpolation on your f-curve for the keyframed Value node.

Play around with the Mapping node orientations and the multipliers (for amplitude and frequency - but keeping the frequencies as multiples of 2*pi!) until you get suitably pleasing results.

Blend file included

$\endgroup$
  • 1
    $\begingroup$ OMG you're a legend thank you so much it's perfect. $\endgroup$ – Dr. Farquaad Mar 20 '18 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.