Isotropix Forums

Ping Pong animation of abc

General Discussion about Isotropix and CG related topics

Ping Pong animation of abc

Unread postby qinyao » Mon Nov 11, 2019 4:19 am

Hi, friends:
I have a plant with 5seds wind animation, how can I make it to a ping pong loop? Need I use some expression on the frame attr of abc?

Thanks!
qinyao
 
Posts: 85
Joined: Fri Aug 26, 2016 11:29 am

Re: Ping Pong animation of abc

Unread postby dboude » Tue Nov 12, 2019 10:26 am

Hi,

There is no ping pong loop behavior for animation. I guess it would be doable with expressions.

Cheers ;)
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1603
Joined: Mon Jul 03, 2017 10:51 am

Re: Ping Pong animation of abc

Unread postby machieb » Thu Oct 14, 2021 11:02 am

Hello,

I need this ping pong animation of abc files behavior in a project. Is there a way with an expression in the animation behavior option to get this working?
Please help!

Thanks Marcus
machieb
 
Posts: 66
Joined: Fri Nov 29, 2019 11:20 am

Re: Ping Pong animation of abc

Unread postby mdkai » Mon Oct 18, 2021 9:05 am

You can utilize expressions to ping pong any animation.
Code: Select all
abs((abs(F)+(25)-2)%(((25)-1)*2)-(25)+1)+1

Where 25 is the range so it will go 23,24,25,24,23 etc.

Feel free to adjust is as needed

Cheers
Kai
Join us at the Discord https://discord.gg/G5cJj9A
mdkai
 
Posts: 363
Joined: Tue Oct 07, 2014 7:24 pm

Re: Ping Pong animation of abc

Unread postby aaute » Mon Oct 18, 2021 10:13 am

you can also use this expression :
Code: Select all
rangeStart = 0;
rangeEnd = 25;
currentRangeId = ceil(F / rangeEnd);
fwd = cycle(F, rangeStart, rangeEnd );
bck = rangeEnd - fwd;

if (currentRangeId % 2) {
output = fwd;
} else {
output = bck;
}
output


And change the rangeStart and rangeEnd base on your animation range. You may need to change the code if the animation doesn't start at 0 to identify the proper chunk.

You can multi-select all the components inside your reference and paste this expression or do it on one and copy this expression get_double("NAME_OF_THE_OBJECT_WITH_EXPRESSION.frame")

Cheers
Aymeric
Isotropix
Technical Artist - Clarisse Specialist
User avatar
aaute
 
Posts: 93
Joined: Mon Nov 02, 2020 11:59 am

Re: Ping Pong animation of abc

Unread postby machieb » Tue Oct 19, 2021 3:28 pm

Thank you very much!
I will try these expressions!

Cheers Marcus
machieb
 
Posts: 66
Joined: Fri Nov 29, 2019 11:20 am

Re: Ping Pong animation of abc

Unread postby flansrjf » Sat Oct 23, 2021 1:20 pm

qinyao wrote:Hi, friends:
I have a plant with 5seds wind animation, how can I make it to a ping pong loop? Need I use some expression on the frame attr of abc?

Thanks!

abs(313*sin(F*PI/rand(20,30))) 313是总帧数,我是用来模拟树的延时摄影,不知道是不是这个意思
flansrjf
 
Posts: 64
Joined: Sat Dec 22, 2018 1:56 am


Return to General Discussion