Last active
April 11, 2018 21:03
-
-
Save animoplex/77eed577a870c54a823817d4a5a33b88 to your computer and use it in GitHub Desktop.
Distance Based Opacity Fade - After Effects Expression by Animoplex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Distance Based Opacity Fade | |
// Original: https://helpx.adobe.com/after-effects/using/expression-examples.html | |
// Full Tutorial: https://www.youtube.com/watch?v=I-Acdl_l9G0&t=14s | |
startFade = 500; | |
endFade = 3000; | |
try { | |
C = thisComp.activeCamera.toWorld([0,0,0]); | |
} catch(err) { | |
w = thisComp.width * thisComp.pixelAspect; | |
z = (w / 2)/Math.tan(degreesToRadians(19.799)); | |
C = [0,0,-z]; | |
} | |
P = toWorld(anchorPoint); | |
d = length(C, P); | |
linear(d, startFade, endFade, 100, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment