Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how can ı Loop Path Keyframes for offset?

New Here ,
Jan 19, 2023 Jan 19, 2023

ı want loopout offset Expression on path?how can I do that?I want the ball to always land the same way on the stairs

TOPICS
Expressions , How to
791
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2023 Jan 19, 2023

Parent to looping ball to a Null and move the Null.

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 19, 2023 Jan 19, 2023

Thanks for your answer. I want to loopout(offset) Squash and Stretch movement, but I couldn't.resim_2023-01-19_195332038.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 19, 2023 Jan 19, 2023

You can create your own loop for path keyframes using modulo (%) math and valueAtTime(), like this equivalent of loopOut("cycle"):

if (numKeys > 1 && time > key(numKeys).time){
  t1 = key(1).time;
  t2 = key(numKeys).time;
  span = t2 - t1;
  delta = time - t2;
  t = delta%span;
  valueAtTime(t1 + t);
}else
  value

By the way, I think "cycle" is what you want, not "offset", but you have other issues to deal with. The main issue is that the duration of your path keframes is different than the position keyframes and the loopOut for the path will quickly get out of sync with the bouncing keyframes. So the timing needs to be driven by the position keyframes. If you delete the last two keyframes of the path animation, that makes the path and position animations the same duration and the above expression might work for you. Play around with it and see what you think.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2023 Jan 19, 2023

That's a limitation. loopOut() does not work on paths, only on numerical properties. You have to think of an alternative approach like pre-composing the animation, time-remapping it and looping that.

 

Mylenium 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 20, 2023 Jan 20, 2023
LATEST

Just check these amaizing tutorial ( 1 minute )

https://www.youtube.com/watch?v=Y0i7Wg1XF8w

2 ways to do that

 

Or just use this expression

valueAtTime(time % key(numKeys).time)

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines