Utility for keyframing repetitive or cyclic motions?



  • Just wondering if there is a utility or script out there which can keyframe repetitive motions, given a few parameters?

    I'm playing with a beach animation that has lots of different frequency cycles of wave motion overlaid on parameters controlling different sizes of waves to give a random effect (I chose mostly prime numbers for the cycle frame lengths). I discovered that the breathing and motion cycle for the figure I loaded is for a completely different frame rate to the wave animation, so I need to retime everything. The figure is done ('cause that's the one that needed to go from 2.5 frames per second to 30 fps), but the waves need keyframes added to match the new animation length for dozens of different frequency cycles.

    Manually replicating the existing cycles will be tedious, because I now have 12 times more frames to fill, and each wave parameter has to be done separately to maintain their individual phases, since they all have different frequencies.

    I just know I'm going to have to write this myself, but was hoping to be spared some time...

    Would anyone else find such a utility useful, or is it just too esoteric?
    0_1534992927876_Shore Foam Néréide.png



  • PhilC made his Idle script that did something like that, just for a figure (at least if we're talking about the same) - in the Idle script, it made little movements on a figure so they didn't stand stock still but moved slightly, breathed ect. Something like that must be possible for the waves as well.

    But alas .. all PhilC's stuff is gone the way of the dodo :( So I'm not sure if it's still available anywhere? PÅERHAPS on Renderosity...



  • @trekkiegrrrl said in Utility for keyframing repetitive or cyclic motions?:

    PhilC made his Idle script that did something like that, just for a figure (at least if we're talking about the same) - in the Idle script, it made little movements on a figure so they didn't stand stock still but moved slightly, breathed ect. Something like that must be possible for the waves as well.

    But alas .. all PhilC's stuff is gone the way of the dodo :( So I'm not sure if it's still available anywhere? PÅERHAPS on Renderosity...

    Oh and it's not there. Just looked.

    PhilC is on FB, and just perhaps you could contact him for a copy if you don't have it already?

    I think I have it ... somewhere. but I'm not sure if it's distributable.



  • Ah WAIT! It might have been Ockham and not PhilC.

    Ockham has a Repeater script on Rosity. That might do what you need?



  • @trekkiegrrrl thanks. I probably have that, just have to delve into old Python trees. I think Ockham had something similar, too. I once did an internet search for saccades/saccadic eye movement, which was a modelling of the semi-random movements people's eyes follow when they're not focused on a single object.

    I'll probably just throw together enough script lines to get done what I want to do. It will require input from others on what they might expect to specify to make any kind of useful product/freebie. I'm thinking along the lines of specifying a parameter or parameter name as dict key and a tuple of half-period (how many frames between keyframes) and a list of min and max value pairs (possibly more than one pair, so cycle amplitudes can have some variation), then just loop through the scene frames setting keyframes according to lots of modulo arithmetic hitting the cycle peaks and troughs.



  • @anomalaus Yes I forgot about Ockham for a moment there. And I think the Repeater script can do what you need :) (crossposted, so just in case you missed it ;) )



  • @trekkiegrrrl nearly, but not quite. You get to select one range of frames to be repeated. What I need is the individual parameters' cycle periods, which are all different, need to continue seamlessly, so I can't specify any frame range overall that can be repeated. Each parameter has to have it's own period determined (or specified) and propagated till the last frame in the scene, with proper handling of partial cycles at each end.

    Thanks for the suggestion, though. Ockham had lots of great stuff. Much of which can be done more elegantly now, with the continual improvements to Poser Python functionality over the years.