Activity › Forums › Adobe After Effects Expressions › Changing values to percentages
-
Changing values to percentages
Posted by Lukasz Pason on March 11, 2010 at 7:48 pmWould this be interpolation methods?
I’m trying to say that 0-20 = 0-100% as well as 0-160 = 0-100%. How is this done?
Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukaszLukasz Pason replied 16 years, 1 month ago 3 Members · 8 Replies -
8 Replies
-
Lukasz Pason
March 11, 2010 at 8:01 pmI think I got it.
opacityController = thisComp.layer("Soundkey 01").effect("Sound Keys")("Output 1") ;if ((opacityController > 0) & (opacityController < 20)) {
ease(opacityController, 0, 60);
}else{ 0; }Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz -
Darby Edelen
March 12, 2010 at 1:09 amYou’ve got the right idea, but I’m confused about the way you’ve done it.
ease() should expect fourth and fifth arguments. Are you not getting errors with the above expression? This is the way I would do it:
opacityController = thisComp.layer("Soundkey 01").effect("Sound Keys")("Output 1");ease(opacityController, 0, 20, 0, 100);
The above should work if you’re trying to stretch numbers in the range 0-20 to 0-100.
Darby Edelen
-
Lukasz Pason
March 12, 2010 at 6:40 pmHow about this? Is this only responding to an input of 20 through 50 and adjusting the opacity from 0 to 60?
opacityController = thisComp.layer("Soundkey 01").effect("Sound Keys")("Output 1");if ((opacityController >20) && (opacityController < 50)) {
easeIn(opacityController, 20, 60, 0, 60);
easeOut(opacityController, 20,60,60,0);}else{ 0; }
Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz -
Dan Ebberts
March 12, 2010 at 7:09 pmMaybe this is what you’re after:
opacityController = thisComp.layer(“Soundkey 01”).effect(“Sound Keys”)(“Output 1”);
if (opacityController < 50) ease(opacityController, 20, 50, 0, 60) else 0; Dan
-
Lukasz Pason
March 12, 2010 at 8:03 pmThanks Dan! Ill check this out! My solution kinda worked. I need to take a math class. I never made it past algebra and it seems like some of the more complex stuff is going to really make my head go bananas. Thanks for your help!
Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz -
Lukasz Pason
March 12, 2010 at 8:09 pmWhat about this?
opacityController = thisComp.layer("Soundkey 01").effect("Sound Keys")("Output 1") ;easeIn(opacityController, 120,140,0,40);
easeOut(opacityController, 120,140,0,40);
Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz -
Dan Ebberts
March 12, 2010 at 8:20 pmIf you do that, the easeIn() won’t have any effect – easeOut() will control everything. ease(opacityController, 120,140,0,40) will give you ease at both ends. Is that what you’re after?
Dan
-
Lukasz Pason
March 12, 2010 at 8:26 pmhhhhmmmmmm….
It is what I am after, but it seemed like my way looked different. Let me take a peak into it again. Thanks DanMotion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz
Reply to this Discussion! Login or Sign Up