Jump to content
Sign in to follow this  
dotcommer

Link rotation to position of a layer

Recommended Posts

Trying to set up something here. I have a layer that rotates a certain amount as a null object is moved up or down on Y. I'm trying to figure out how to get said layer to move up or down in Y in relation to its rotation. How do I do this? I assume its more complicated and may have to do something like convert radians to degrees or something like that, but I haven't ventured into things like that before so I'm looking for guidance. Thanks.

Share this post


Link to post
Share on other sites

Have you tried constraints?

 

It's under Character > Constraints > Your choice.

 

Where's "Character"? I've been using AE for years and the only character menu option I've ever used is related to text....

Share this post


Link to post
Share on other sites

I thought you meant C4D. (Yes, the word layer should have been a giveaway it was about AE. I skipped the title and went straight to the question :( )

 

Sorry, couldn't answer your AE question.

 

I'm sure it's doable via expressions and someone will help you out soon. :)

Edited by pix3l

Share this post


Link to post
Share on other sites

Trying to set up something here. I have a layer that rotates a certain amount as a null object is moved up or down on Y. I'm trying to figure out how to get said layer to move up or down in Y in relation to its rotation. How do I do this? I assume its more complicated and may have to do something like convert radians to degrees or something like that, but I haven't ventured into things like that before so I'm looking for guidance. Thanks.

 

Your question is kinda confusing, but maybe this helps:

 

• make a null, add a slider control

 

• add this expression to the position

 

y = (transform.rotation)*effect("Slider Control")("Slider");

 

[value[0], y];

Share this post


Link to post
Share on other sites

Ok, let me try to rephrase my question.

 

I have a solid. It rotates. I want that solid to use its rotation to drive its position along an axis. It must be driven by the rotation and not a separate slider control for various reasons related to my animation. How would you go about this?

 

My hope is that I can pair a couple of these together with variations of the code and create a string of solids that can collapse and expand like an accordion or a fan. Does that help?

Edited by dotcommer

Share this post


Link to post
Share on other sites

My hope is that I can pair a couple of these together with variations of the code and create a string of solids that can collapse and expand like an accordion or a fan. Does that help?

 

Umm, no. This is still far too vague. In your use case just rigging a generic linear(rotation,minAngle,maxAngle,minPos,maxPos) would not work as clearly you want to figure in the rotation and position of previous elements and that is much more complex. There simply is no generic formula that would work under any conditions and neither does your intended way of animation strike me as the most efficient then - for an accordeon, one would simply pull out the start and end points and calculate the rotations, rather then the reverse... Similarly, for a fan you'd use a spread slider and calculate the segments... Provide a clear sketch or template project, otherwise this is going nowhere.

 

Mylenium

Share this post


Link to post
Share on other sites

Shot in the dark but why can't you use the rotation values with some math to translate to the correct values for the position? You rotate 30 degrees it moves 60 units with a times 2 expression. Granted, if Mylenium says no, then it's no but I'm just throwing stuff out.

Share this post


Link to post
Share on other sites

This might not be what you want since I don't know what you are exactly looking for but I assume you were able to link the rotation to position. Easy enough...

Then maybe use valueAtTime on the rest of the layers?

Share this post


Link to post
Share on other sites

Is it not just to add:

 

value + [0,10*(transform.rotation)]

 

to the the position?

 

10 multiplies the rotation value so if you set the rotation to say 360° the object moves 3600px on the y-axis

 

Yeah, that's what I was thinking.

Share this post


Link to post
Share on other sites

This is about as laymen'ly rigged as you can get, but is this sort of what you're going for?

 

Thats exactly what I was looking for. And interestingly enough, when I checked up on this thread tonight, I also came across this resource: http://www.mattrunks.com/tutoriaux/tutorial-video-after-effects-accordeon-3d-images-videos/?tab=2

 

His steps seem very similar to yours. Both great resources and hopefully this will help others in the future looking for an effect like this. As of yet I have not tried either of these, but i'm hopeful and eager to see what I can make out everything. Thanks a lot.

Share this post


Link to post
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.

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.

Sign in to follow this  

×
×
  • Create New...