Jump to content

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
Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...