Jump to content
Sign in to follow this  
bigwil357

Expression question

Recommended Posts

Hello. 

 Im not sure exactly how to make an expression for this type of animation. I have alot of objects that need to separate from each other, rotate 360 for a certain amount of frames ( ex. frame 50-100) stop rotation at it original position at 0, and then I will hand animated them back to their original position. My question is how to set this up? I can do it by hand, but I know that is not the right way. I think I did something like this with an IF expression a long time ago, but i cant remember. And its such a simple question that it is hard to find an answer for it.

Edited by bigwil357

Share this post


Link to post
Share on other sites

Step by step, you may want to try this.

 

1. Group the primitives of each object ( 10 primitives in object_1, 5 primitives in object_2, etc)

2. Use Exploded View SOP to do the separation.

3. If you want them to rotate separately as individual objects, attach a ForEach SOP with the Group Mask set to object*

4. Go inside, put a Transform SOP with the rY (rotate in Y) value set to if($F<=100,if($F>=50,360*($F-50)/50,0),0)

 

Breakdown of expression:

 

If $F is in the range 50-100,

     return [complete rotation amount]*[($F-startframe)/framerange]

Else,

     return 0

 

If you wanted them to rotate as a whole entity, skip the first grouping and the ForEach SOP, just add the Transform SOP (with the expression) after the Exploded View SOP.

Edited by Fenolis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×