Highlighted

Can I Use A Clamp Expression To Limit A Time Expression?

Explorer ,
Sep 13, 2020

Copy link to clipboard

Copied

Can I use a Clamp expression to limit a time expression?  

 

Lets say I have a bird wing on Layer A.  Layer A is 3D.  Putting a time expression (time*100) on the Y position attribute revolves the wing 360 degrees.  I would like to limit the rotation to, say, 60 degrees.  I thought that I could "clamp" the rotation, but this isn't working.  I'm new to expressions so it may be something simple I did wrong.

 

If this is even possible how would you write this?  I tried writing the clamp expression first, second, and putting it on a sperate line.  None of that worked.

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

Try something like this:

t = time - inPoint;
ease(t, 1, 1.6, 0, 60)

That expression will start rotation 1 second after the in point of the layer and increase the rotation from zero to sixty in the next .6 seconds. Your original expression rotated the layer 100º / second so ".6" seconds equals 60º.

 

 

 

Topics

Expressions

Views

60

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Can I Use A Clamp Expression To Limit A Time Expression?

Explorer ,
Sep 13, 2020

Copy link to clipboard

Copied

Can I use a Clamp expression to limit a time expression?  

 

Lets say I have a bird wing on Layer A.  Layer A is 3D.  Putting a time expression (time*100) on the Y position attribute revolves the wing 360 degrees.  I would like to limit the rotation to, say, 60 degrees.  I thought that I could "clamp" the rotation, but this isn't working.  I'm new to expressions so it may be something simple I did wrong.

 

If this is even possible how would you write this?  I tried writing the clamp expression first, second, and putting it on a sperate line.  None of that worked.

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

Try something like this:

t = time - inPoint;
ease(t, 1, 1.6, 0, 60)

That expression will start rotation 1 second after the in point of the layer and increase the rotation from zero to sixty in the next .6 seconds. Your original expression rotated the layer 100º / second so ".6" seconds equals 60º.

 

 

 

Topics

Expressions

Views

61

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Sep 14, 2020

Copy link to clipboard

Copied

You wouldn't clamp, you use linear(), ease() etc. to define upper and lower ceilings. The rest is unclear. Always post the code when talking about expressions or provide screenshots of the timeline with the expression editor visible, including which property it's applied to.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Sep 14, 2020

Copy link to clipboard

Copied

Try something like this:

t = time - inPoint;
ease(t, 1, 1.6, 0, 60)

That expression will start rotation 1 second after the in point of the layer and increase the rotation from zero to sixty in the next .6 seconds. Your original expression rotated the layer 100º / second so ".6" seconds equals 60º.

 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Sep 15, 2020

Copy link to clipboard

Copied

Thank you Rick, for your very helpful answer!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Sep 15, 2020

Copy link to clipboard

Copied

If I wanted to loop this so the wing flapped continuously, I would use a loop expression as well?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Sep 15, 2020

Copy link to clipboard

Copied

The easiest way to create flapping winds is to set two keyframes and add loopOut("pingpong"); as an expression.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...