How can I loop an alembic animation?

   13880   4   2
User Avatar
Member
9 posts
Joined:
Offline
That is the question, I have a walking character, and I want to loop it, the ABC file has the base loop, 24 frames of animation, and I want to make this loop as an infinite loop, so no matter if the scene is 240 or 500 frames, it will continue walking.

I don't care if I have to specify the number of loops I want or the final frame I need, but how can I loop it?

Cheers and thanks in advance!
User Avatar
Member
9 posts
Joined:
Offline
I kind of solved it with a expression but I think it's a pretty bad solution:

“if($FF <= 30,$FF,if($FF <= 60,$FF-30,if($FF <= 90,$FF-60,if($FF <= 120,$FF-90,$FF-120))))”

basically what I do is to use an IF expression, and then in the false statement I repeate the same expression changing values, that until the frame I want, but if for example I want to repeat the 30 frames cycle 1000 times could be crazy.

Some idea on how to do it better?

Cheers!
User Avatar
Member
387 posts
Joined: Nov. 2008
Offline
Use modulo function:
$FF%24
User Avatar
Member
76 posts
Joined: Sept. 2011
Online
You can as well use the wrap expression: wrap($FF, 0, 24)
would give you the same result as $FF%24


/ -> exhelp wrap
float wrap (float value, float minimum, float maximum)
REPLACED BY
hou.hmath.wrap()

Wraps a value between a minimum and maximum.

Similar to the clamp expression in that the resulting value will always
fall between the specified minimum and maximum value. It will, however,
create a sawtooth wave for continuously increasing or decreasing values
of the value.

EXAMPLES
wrap ($F, 5, 10)

Creates a sawtooth function between 5 and 10.
User Avatar
Member
9 posts
Joined:
Offline
Thank you all, great answers

I'll try everything to see how this affects and works, always learning!

Cheers
  • Quick Links