Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Re: balance

Cow Forums : Adobe After Effects
FAQ   •   VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


Re: balance
by Roland R. Kahlenberg on Nov 1, 2009 at 5:34:55 pm

You'll need to create two relationships -
1) between the two trays
When one tray moves down by a value, the other tray has to move up by the same amount.

2) between the trays and the horizontal bar
When either one of the tray moves, the horizontal bar's rotation values kicks in. We will use the right tray to drive the horizontal bar's rotation values as well as the left tra's Y-position.

It's best to create a Null to use as a Controller Layer that holds the Expression Sliders that we'll be using.

Create the Null and apply the Expression Slider five times and change each of their names to -
MaxRotation
MinRotation
MaxYPosition
MinYPosition
StartRightYPos

Type the following values in the Slider value inpit parameterfor the above Expression Controllers-

MaxRotation = 70
MinRotation = -70
MaxYPosition = 530
MinYPosition = 0
StartRightYPos = 400

While most of the values can be adjusted, the StartRightYPos parameter has to be exactly the starting values for the trays. I am assuming that the trays start off at equal heights.

Now put the following script into the horizontal bar's Rotation Expression -

//Start Script
MaxRotation = thisComp.layer("Null 1").effect("MaxRotation")("Slider");
MinRotation = thisComp.layer("Null 1").effect("MinRotation")("Slider");
MaxYPos = thisComp.layer("Null 1").effect("MaxYPos(right)")("Slider");
MinYPos = thisComp.layer("Null 1").effect("MinYPos(right)")("Slider");
LayerProp = thisComp.layer("right").position[1];
LeftYPos = thisComp.layer("left").position[1];
RightYPos = thisComp.layer("right").position[1];
if (LeftYPos==RightYPos)
0
else
linear(LayerProp,MinYPos,MaxYPos,MinRotation,MaxRotation)

// End of SCript

And for the left tray, put the following script into its Position property's Expression box -
// Start Script
RightYPos = thisComp.layer("right").position[1];
StartYPosRight = thisComp.layer("Null 1").effect("Start RigthYPos")("Slider");
[value[0],((value[1]-RightYPos)+StartYPosRight)]
// End SCript

Once you have these setup, you simply have to animate the Y-positionof the right tray to get the Horizontal bar to rotate. How much it rotates depends on the values for MinRotation and MaxRotation and even MinYPosition and MaxYPosition value adjustments will affect the sensitivity of the amount of rotation depending on the y movement of the right tray.

HTH
RoRK

Sell your AEPs with broadcastGEMs' DVD series of templates. Click here for more


Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:
  • balance by Aqeel Sami on Oct 31, 2009 at 4:28:05 pm
    • Re: balance by Erik Waluska on Nov 1, 2009 at 5:09:27 pm
      • Re: balance by Erik Waluska on Nov 2, 2009 at 1:17:54 am
    • Re: balance by Roland R. Kahlenberg on Nov 1, 2009 at 5:34:55 pm


Related Threads:
Good balance between quality and file size?   |   White Balance In AE   |   Unbalanced Layer Check Out Memory Inefficiency   |   Color Balance   |   auto white balance, as in Photoshop?   |   White Color Balance to daylight in AE?   |   Memory Buffer and Unbalanced Checkouts   |   white balance, correction   |   Color Balance



Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]