ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression related rotation to opacity

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Desi Diaz
Expression related rotation to opacity
on Jan 17, 2017 at 8:45:56 am

Hello! I'm relentlessly looking for an expression to get a layer to reach a rotation of -7% its opacity is turns to 0% and when I get to -6% rotation return to an opacity of 100%, I'm doing cut-out animation of One wing and I would like it to change automatically when it reaches a certain rotation.
The idea is to disappear completely from one frame to another and not gradually.
I had thought a formula like that
If object x reaches rotation -7% then opacity 0%
If object x reaches rotation -6% then opacity 100

But I know very little of expressions and I do not know if it can be done. Can anyone help me? I would be eternally grateful!
Im sorry my english is quite bad :(


Return to posts index

Coen Rens
Re: Expression related rotation to opacity
on Jan 30, 2017 at 4:01:22 pm

It can be done with a linear function, which interpolates in a linear fashion between a minimum and maximum value.

See the attached code, which should be entered to your opacity property
.
Replace 'object x layer name' with the layer name of your object x, but leave both the " quotation marks.

linear( thisComp.layer("object x layer name").rotation, -7, -6, 0, 100 )


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]