Copy link to clipboard
Copied
Hi guys is there an expression to get a gradient ramp effect to adjust to the size of the text. So if the text is shorter or longer then the ramp would adjust to it.
Also is there an expression i can use to get the gradient ramp to follow moving text as currently I can only achieve it with adding a gradient overlay from layer styles and there for I lose the ability to connect the colors to a color control?
Thanks in advance
Copy link to clipboard
Copied
The same sampleImage() and sourceRectAtTime() expressions that people use for adaptive boxes under text layers will be appropriate. Look it up. Making it follow the text would of course also be possible, but depending on how complicated the motions are it may be simpler to just pre-compose the text and move it around.
Mylenium
Copy link to clipboard
Copied
sourceRectAtTime() will give you X and Y dimensions of a text layer. You could use those values to set the starting and ending point of a gradient. You will have to compensate for the text layer's position because that method does not compensate for the layer position. You'll also need to compensate for the gradient layer position.
If I saw your comp setup with the modified properties of the layers involved showing (press uu and take a screenshot) I could tell exactly how to tell you how to set up the expression. If you are at all familiar with how expressions and layer and comp space work you should be able to work it out for yourself.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now