-
Reveal Text using ease(), inPoint, outPoint
Hi expression folks,
I’m trying to create a preset that reveals and hides lines of text – trying to approximate the manual masking effect, or “shape reveal” text effect you see frequently.
Using a combination of Fast Box Blur, Curves, and CCcomposite (creates a box to use as an alpha), plus two different Transform effects (moving the text in and out of the alpha box) I was able to get a single text layer that reveals and hides itself based on the In and Out points… However, when saved as a preset and applied in a new Comp, it does not work anymore.
I must’ve made a mistake. If anyone can help me spot it, I’d really appreciate it!
p.s. if there’s an existing preset for this, that’s good too ☺

//##########First Transform Effect#################//need the height of the text layer
var x = sourceRectAtTime();
//adding a few extra points padding
x_distance = x.height+3//set duration equal to slider
durationIn = effect("durationIn")("Slider");
durationOut = effect("durationOut")("Slider");if(time<(inPoint+outPoint)/2)
//using easeOut with duration to slide the layer up
easeOut(time,inPoint,inPoint+durationIn,[this.position[0],this.position[1]-x_distance],[this.position[0],this.position[1]]);else
easeIn(time, outPoint-durationOut, outPoint, [this.position[0],this.position[1]],[this.position[0],this.position[1]+x_distance]);//##########Second Transform Effect#################
var x = sourceRectAtTime();x_distance = x.height+3
//set duration equal to slider
durationIn = effect("durationIn")("Slider");
durationOut = effect("durationOut")("Slider");if(time<(inPoint+outPoint)/2)
easeOut(time,inPoint,inPoint+durationIn,[this.position[0],this.position[1]+x_distance],[this.position[0],this.position[1]]);else
easeIn(time, outPoint-durationOut, outPoint, [this.position[0],this.position[1]],[this.position[0],this.position[1]-x_distance]);