Activity › Forums › Adobe After Effects Expressions › Finding the time when a prop reaches a specific value
-
Finding the time when a prop reaches a specific value
Posted by Roland R. kahlenberg on June 2, 2017 at 2:56 amFinding the time when a prop reaches a specific value.
Cheers
TypeGEMs – the Definitive Type Gizmo for AE
https://broadcastgems.com/typegems/Intensive mocha & AE Training in Singapore and Other Dangerous Locations
Adobe After Effects CC ACE/ACI
Imagineer Systems (mocha) Certified InstructorRoland R. kahlenberg replied 8 years, 11 months ago 2 Members · 6 Replies -
6 Replies
-
Dan Ebberts
June 2, 2017 at 12:55 pmThere are a number of ways to approach it, all of which are messy and involve a frame-by-frame search. The best solution depends on whether you need the first occurrence, the most recent occurrence, or all occurrences, and whether the value will be coming from above the target value, below the target value, or either.
Dan
-
Roland R. kahlenberg
June 2, 2017 at 1:08 pmBut Dan, we mostly love only messy stuff. ☺
I think based on all occurrences and from both above or below (the value) will provide an ideal/robust solution. I feel that the robustness of the solution will more than make up for the slow compute times of the Expressions.
Cheers
– RolandTypeGEMs – the Definitive Type Gizmo for AE
https://broadcastgems.com/typegems/Intensive mocha & AE Training in Singapore and Other Dangerous Locations
Adobe After Effects CC ACE/ACI
Imagineer Systems (mocha) Certified Instructorhttps://www.broadcastgems.com/mographintensity_shapestext/
-
Roland R. kahlenberg
June 2, 2017 at 1:53 pmThis is what I have now. It’s of course incomplete.
I want a layer to inherit specific colors based on the value of a rotation prop. I don’t want the color values to pop (change immediately) but instead to have a slow change of the colors. Hence, I thought I would use the Interpolation Method.targetProp = thisComp.layer(“Hand”).transform.rotation;
targetVal1 = linear(time,0,1,effect(“Color Control”)(“Color”),effect(“Color Control 2”)(“Color”));
targetVal2 = linear(time,0,1,effect(“Color Control 2”)(“Color”),effect(“Color Control 3”)(“Color”));
targetVal3 = linear(time,0,1,effect(“Color Control 3”)(“Color”),effect(“Color Control 4”)(“Color”));if (targetProp >=0 && targetProp<1001)
{ targetVal1 }
else if (targetProp >= 1001 && targetProp<2001)
{ targetVal2 }
else if(targetProp< 0)
{ targetVal3 }
else {effect(“Color Control 4”)(“Color”)}Sense make?
TypeGEMs – the Definitive Type Gizmo for AE
https://broadcastgems.com/typegems/Intensive mocha & AE Training in Singapore and Other Dangerous Locations
Adobe After Effects CC ACE/ACI
Imagineer Systems (mocha) Certified Instructorhttps://www.broadcastgems.com/mographintensity_shapestext/
-
Dan Ebberts
June 2, 2017 at 4:12 pmWouldn’t something like this work?
targetProp = thisComp.layer("Hand").transform.rotation;
c1 = effect("Color Control")("Color");
c2 = effect("Color Control 2")("Color");
c3 = effect("Color Control 3")("Color");
c4 = effect("Color Control 4")("Color");if (targetProp < 50)
ease(targetProp,-50,50,c1,c2)
else if (targetProp < 1050)
ease(targetProp,950,1050,c2,c3)
else
ease(targetProp,1950,2050,c3,c4);
Dan
-
Roland R. kahlenberg
June 2, 2017 at 6:20 pmHAH!!!
I knew my problem solving was a major issue. I’ve not written Expressions for a while – and it shows.Thanks Dan!
TypeGEMs – the Definitive Type Gizmo for AE
https://broadcastgems.com/typegems/Intensive mocha & AE Training in Singapore and Other Dangerous Locations
Adobe After Effects CC ACE/ACI
Imagineer Systems (mocha) Certified Instructorhttps://www.broadcastgems.com/mographintensity_shapestext/
Reply to this Discussion! Login or Sign Up