How to create complex looping animation

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

How to create complex looping animation

Postby Víctor Paredes » Thu Aug 10, 2017 8:36 pm

Hi, this is something I wanted to share here for a long time and maybe can help you:

For having complex scenes with different duration cycles and make them all coincide in the loop, I always use relative cycles and this simple rule:
2x+1
Where x is the previous smaller cycle.

So, for instance, if your smaller cycle goes back only 1 frame, the next cycle will need to go back 2*1+1, which is 3 frames.

Since this new cycle goes back 3 frames, the next one should go back 2*3+1 frames, which is 7.
Image

The next one should be 2*7+1=15, and so on.

If you continue applying this method, you will get this:

1
3
7
15
31
63
127
255
etc.

All that numbers are the cycles you can use. Any other number you use, will break the cycle.
Now, to render the animation with the cycle working, you need to have an animation as long as your longer cycle and add two more frames to it.
So, if my longer cycle goes back to 255, then my final animation needs to be 257 frames.
When my animation is 257, then I'm sure that every single cycle will loop seamlessly.

Image
Image

And finally. With the current setup, all cycles will coincide at certain point and sometimes that can look unnatural. That's why I prefer to use relative cycles. Once I know the numbers I can use for my cycles, I can move the relative cycles in the timeline, making them loop at totally different moments.

Image
If you move the cycles in timeline, then your animation will need to start at a frame different than zero (to be sure all the cycles have started) or group everything and move the group to the left in the Sequencer.

Ok, I know this is very technical, but I prefer to post it, because -at least for me- it's extremely useful.
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4801
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland

Re: How to create complex looping animation

Postby jezjones29 » Wed Aug 16, 2017 12:11 pm

Thanks Víctor. This is very handy when creating gifs!
I've created a quick tool that uses this method to work out the next numbers: https://www.animestudiotutor.com/loopcalc

It may be worth pointing out that the final exported animation is the longest length - 1
So in your above 257 frame example, it would be 256 exported frames.
User avatar
jezjones29
 
Posts: 332
Joined: Tue Jan 31, 2006 9:43 pm
Location: Wales, UK

Re: How to create complex looping animation

Postby jahnocli » Wed Aug 16, 2017 2:21 pm

Of course, Victor, you know that all the cycle numbers in your list are powers of 2 -1? (I feel like I'm stating the obvious here, but as no-one else has mentioned it...)
You can't have everything. Where would you put it?
User avatar
jahnocli
 
Posts: 3276
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Re: How to create complex looping animation

Postby hayasidist » Wed Aug 16, 2017 4:41 pm

jahnocli wrote:Of course, Victor, you know that all the cycle numbers in your list are powers of 2 -1? (I feel like I'm stating the obvious here, but as no-one else has mentioned it...)


unless you start with a cycle of 5...

the general formula for this using powers of 2 is 2^(n-1) * (smallest+1) - 1 (which, when smallest is 1, does become 2^n - 1)
User avatar
hayasidist
 
Posts: 1849
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: How to create complex looping animation

Postby Víctor Paredes » Mon Aug 21, 2017 3:14 pm

jahnocli wrote:Of course, Victor, you know that all the cycle numbers in your list are powers of 2 -1? (I feel like I'm stating the obvious here, but as no-one else has mentioned it...)

Not really, thank you for pointing it. Mathematics knowledge is one of my weaknesses (and I'm always trying to overcome that bad foundation).
jezjones29 wrote:Thanks Víctor. This is very handy when creating gifs!
I've created a quick tool that uses this method to work out the next numbers: https://www.animestudiotutor.com/loopcalc
It may be worth pointing out that the final exported animation is the longest length - 1
So in your above 257 frame example, it would be 256 exported frames.

Fantastic! Thank you very much, Jez.
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4801
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland


Return to Tips & Techniques

Who is online

Users browsing this forum: No registered users and 2 guests