1 Reply Latest reply on Nov 2, 2014 10:17 AM by Rick Gerard

    animating png text in After effects


      I have a logo from a company that I wanted to animate to appear as if the script is being written. It is a .psd file that I imported just the layer that contains the letters I want to animate. I tried to used stroke and a pen tool to attempt to create a path that I want the text to me written in, but I think I am doing something wrong. I admit not being too familiar with how to do this in After Effects, however I am on a deadline with the customer and need some guidance. Can someone help? Here is the .png file I created from the .psd.Sand Castle Logo.png

        • 1. Re: animating png text in After effects
          Rick Gerard Adobe Community Professional & MVP

          You are going to run into problems with the intersecting lines that need to be addressed by splitting the layer when the stroke crosses the intersections. The technique is relatively simple. The more complex your text and the more overlapping lines you have the more time consuming it is.


          First add your text layer to the timeline (by the way the PNG you supplied is way too big. You could crop it so it was just exactly the size of the text), then add a Red solid to the comp and set the blend mode to Screen. You will be able to see the text through the solid. Now with the pen tool carefully trace a mask path over the text layer. Once the trace is complete add stroke to the solid layer and adjust the width of the stroke so that it is wide enough to cover all of the text. Animate the in or out point so that the stroke traces over the text, then set the stroke to On Transparent. Now use the stroke layer as a track matte for the text layer. As the stroke reveals the text there will be places where it crosses the lines of the text and spoils the effect. At each crossing point you need to add a mask to cover the intersections. I do this while scrubbing through the timeline and make my masks just big enough to cover the spoiled intersections. You set the masks to subtract or check the invert box. When you're done you'll have a bunch of holes in your text layer. Here's how you fix that.


          Scrub through the timeline until the stroke comes to the first mask. Select both the track matte and the text layer and press Ctrl/Cmnd + Shift + D to split the layer. Move forward one frame and delete the mask that is causing the hole. Move forward until the stroke appears on the other side of the hole, split the layer and delete the mask causing the hole. Repeat until you have all of the problems solved.

          Here's a start on the project using your supplied PNG file. I did the first few crossings for you so you can see how it's done. I only drew a few of the masks on the text. You'll have to do the rest. One more thing, You'll see an extra path on the Track Matte layer that is not covering anything. This stroke is there to give the pen time to move from the first mask over the S to the next letters. Adjusting the length of this stroke is an easier way to fine tune the timing than animating the end point of the stroke.  Enjoy.


          One more note, I probably would have just used a text layer in AE for this job. There's nothing special about the PNG file that couldn't have been done more efficiently with a text layer.