Atom Posted March 9, 2015 Share Posted March 9, 2015 (edited) Hi All, I have an OBJ sequence that is 24 frames long (1-24). I want to write an expression for the Frame field of the TimeShift node that will cause the sequence to play forwards then backwards as I advance forward through time. EXAMPLE: Frames 1-24 would play as normal. Frames 24-48 would play backwards. Frames 49-... play forward etc... I assume this is some kind of conditional modulus expression using $F, I just don't know the syntax. Thanks Atom Edited March 9, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 9, 2015 Share Posted March 9, 2015 Take a look inside the Time Warp SOP. It has the option to cycle, you might be able to come up with a pingpong from that. Quote Link to comment Share on other sites More sharing options...
eetu Posted March 9, 2015 Share Posted March 9, 2015 if( $F % (2 * ch("range")) < ch("range"), ( $F % ch("range") ) * ch("speed"), ch("speed") * ch("range") - $F % ch("range") * ch("speed") ) Maybe it could be simplified but at least it works ee_pingpong.hip 2 Quote Link to comment Share on other sites More sharing options...
pezetko Posted March 9, 2015 Share Posted March 9, 2015 And without branching the triangle signal: abs((abs($FF)+ch("size")-2)%((ch("size")-1)*2)-ch("size")+1)+1 Where size is length of your animation, in your case it's ch("size") = 24. 3 Quote Link to comment Share on other sites More sharing options...
Atom Posted March 9, 2015 Author Share Posted March 9, 2015 Thanks for all the help everyone. I pasted Pezetko's expression into the Frame field it worked! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.