background preloader

Recursos

Facebook Twitter

Dan Ebberts's resource for AE scripting and expressions. AE ENHANCERS • Index page. After Effects expressions library. From Mographwiki.net For general information and resources about expressions, go to the After Effects expressions page. One-sided layers Apply this expression to the opacity attribute and it'll disappear whenever it's flipped away from the camera. You need to have an active camera in your composition for this one to work. a = toWorldVec([0,0,1]); b = thisComp.activeCamera.position - toWorld(anchorPoint); c = dot(a,b)/length(b); if (c > 0) 0 else value Object bouncing on a floor This will make your layer/object bounce along an imaginary 'floor'.

Translate 3D coordinates to 2D src = comp("3D Data Comp").layer("3D Layer"); src.to_comp(src.anchor_point); Bouncy scale 'IN' Apply this expression to the 'scale' parameter of your layer. k=16; // final scale a=5; // how quickly the bounce ends b=20; // how many bounces it'll do (that is, the bounce speed) x=k*(1-Math.exp(-a*time)*Math.cos(b*time)); [x,x] Auto Layer Flip [(toCompVec([0, 0, 1])[2] > 0 ?

Scale relative to distance from camera Create a comp.