LIBRARY: Tutorials Reviews Interviews Editorials Features Business Authors RSS Feed

How to make a Text Stream using Expressions

COW Library : Adobe After Effects Tutorials : Joe Chao : How to make a Text Stream using Expressions
How to make a Text Stream using Expressions
Adobe After Effects Tutorial

How to make a Text Stream in After Effects 6.5 by Joe Chao

Joe Chao (Cao Jun) Joe Chao,
Jiangsu, China
©2006 Joe Chao and

Article Focus:
In this tutorial CreativeCOW's Joe Chao demonstrates using expressions to create a text stream wrapping around a pillar. The pillar and its background are all completely made in AfterEffects.

Now, please download the project file and get started.

A little more than a month ago, I saw a post seeking some ideas about making a kind of "text stream" in Creative Cow's AE forum. The person posting said that he tried to make it with Particle Playground, but failed because the shape of the stream was too complex. I think it seems that this task is too hard for AE's particular system. I have not found any filter of AE can create a particular system warping through a certain path. Although we can bend the particulars with a boundary wall or gravity force, or distort filters, we can not make a complex-shaped stream. Later, I found that expressions might work better in creating such a stream. After making up such an effect, I felt that maybe I could write a simple tutorial and share my experience with you.

Before we get started, I want to show my gratitude to Dan Ebberts. His help was critical to my project, I couldn't have made it without him. Dan, if you are reading this tutorial, please accept my cordial thanks.

The whole scene looks like this:

Text stream

Because we mainly focus on expressions, I don't want to spend too much time on making up this scene. So just download the project file, open it, and go to the comp "textstream". I have prepared everything for you.

My main idea is to create a "guide layer". It flies through a path, which we can adjust very easily. Then, create a Text layer, it imitates the guide layer, but it often makes some random "mistakes" in imitating. Such as: speed, size, position, in point, and so on. All these mistakes can be controlled through a null layer. Thus, every time I duplicate it, it make different mistakes. When I duplicate it for tens or even hundreds of times, I can get a stream of titles!

So my job is to apply some expressions to different properties of the text layer. The expressions can make the text go after the guide layer and made some random mistakes.

First of all, we have to make a "guide". Create a solid layer, set its size as 20*20. Then, I get a problem: how can I get it to fling in a helix path from the bottom of the scene and out at top?

Adjusting its motion manually is not a bad idea, but in fact we can make it by developing some expressions. Before that let's observe a helix from different view angles:

Helix from different angles

In this chart, I identified some variables, and they have been marked in the charts above:

Vel1: outward velocity
Vel2: rotation velocity
Vel3: upward velocity
Radius: Radius of the helix's bottom
Angletemp: angle at a certain time
Radiustemp: Radius at a certain time

With little trigonometry we can get the position of the guide layer at any time:

X position: -Math.cos(angletemp)* radtemp
Y position: -vel3*time
Z position: Math.sin(angletemp)* radtemp

That's it! Now we can develop the expressions of the path, add these expressions to position property of "guide":

vel1=20; // outward velocity
vel2=40; // rotation velocity
vel3=50; // upward velocity
radius=30; // Radius of the helix's bottom
radtemp=radius+vel2*time; // Radius at a certain time
angletemp=vel1*time; // angle at a certain time
a= -Math.cos(angletemp)* radtemp; // X position
b= -vel3*time; // Y position
c=Math.sin(angletemp)* radtemp; // Z position
[a,b,c] //output the position

These expressions are based on the requirement that the bottom center of the helix is at (0,0,0), but it is not the truth. So I created a solid layer, named it "center", converted it into 3D layer. Then, adjust the last line of the expression to:

[a,b,c]+thisComp.layer("center").position //output the position

Now we can control the motion of the guide layer by moving the "center" layer and adjusting the variables. Adjust them until you feel satisfied with the motion path.

Convert the expressions to keyframes by the menu "animation/keyframe assistant/convert expression to keyframes".

Change the expressions to: loopOut(type = "cycle", numKeyframes = 0). Now, our guide layer has been able to work perfectly. It flies around the pillar again and again. That's just what we want.

Since the guide layer is ready, our next step is to create the text.

Create a text layer, input any text you like, that doesn't matter. (I inputted "title"). Convert it into a 3D layer. Adjust its size & font.

Secondly, we are going to develop some expressions to make the titles be able to imitate the guide layer. Go to the position property of the title layer, and try adding this expression:


It works well. Then we will have to let it make mistakes.

  1. Random speed:
    Suppose that one layer has a new speed and it takes the layer certain time (new time) to cover the distance on which the guide spends certain time (original time).
    Thus: timerate = new time/original time
    If the current time is "time", where should our title be? The position must equal to the position of "guide" at "timerate*original time".
    Then, the expression for position has been developed to:
    Thus, as long as we set the variable "timerate" a random value, the title layer can have a random speed. So add this line for it:

  2. Random start time
    Suppose the all the titles are "latetime"'s later, and the time variable "latetime" have random values, than we can adjust the expression above into:
    seedRandom(n, timeless = true); //make different layers have different seed
    timerate=random(0.8,1.25); //add a random factor in speed
    latetime= random(0,10); // add a random factor in emitting the particulars
    when= (time-latetime)*timerate;
    thisComp.layer("guide").position.valueAtTime(when) //out put the position
    now, select the title, set its auto-rotation property to "orient along path".

    Try duplicating the title about 100 times. Yes, or 50~100 times. Then you will be able see such a result.

    Text Wrapping

    Interesting? The titles are moving along the path in random speed & order. Next we are going to add more random factors into their motions.

  3. Random offset:
    Create these expressions:
    xoffset=random(-20, 20);
    yoffset= random(-20, 20);
    zoffset= random(-20, 20); //these offsets can affect the thickness of the stream
    adjust the last line into:
    thisComp.layer("guide").position.valueAtTime(when)+[xoffset, yoffset, zoffset]

  4. Random path
    To let different titles have different paths, I think the expression wiggle can work in this case. But unfortunately, it seems that "wiggle. thisComp.layer("guide").position.valueAtTime(when)" can't work well. Dan advised me to appeal to "wiggle" itself. With his help, I got this expression for position property:
    thisComp.layer("guide").position.wiggle(amp, freq, 1, .5, when)+ [xoffset, yoffset, zoffset]

  5. Scale
    Add these expressions to Scale property:
    seedRandom(n, timeless = true);
    temp=random(min, max);

  6. Etc
    In the paragraph about random start time, I added some random factors into the start time of the titles. Since the guide are making a looping animation. I think the length of the guide's animation can work well as the maximal value of "latetime". So if we let expressions control the maximal value of the random "latetime" is better. Thus, we can develop this line into:

    latetime= random(0,looptime);
    Thus, the data of maximal random value can get updated automatically.

    Similar as the "freq" in "Random path". "Freq" means "how many times every second", if we replaced it with "freq/looptime", it would become "how many times every cycle". It might make our work simple if we have to adjust the path again and again.

  7. Text
    Apply these expressions to "source text" property:
    seedRandom(n, timeless = true); //make different layers have different seed
    myText = ["After Effects",
    "Encore DVD",
    "Premiere Pro",
    "Final Cut Pro",
    "Cinema 4D",
    "Particle Illusion"]; // make up a list of titles
    myIndex = Math.floor(random(myText.length)); //count the number of the titles in the list
    myText[myIndex] // random pick up a title

  8. Control
    With all expressions above, we have been able to create a stream of titles. What we need to do is just to duplicate the title layer for 50~100 times. But if you need to adjust the factor after that, you might have trouble in opening all the layers and update the variables' values. So we need something to administrate all these factors.

    My idea is create a Null layer and apply "expression controls" filters to control them. Let's take the max & min value of Scale property for example.

    Create a null layer named "control". Apply effects/expression controls/slider control to it. Rename the filter as "scalemin", change the slider range into 0~100. Duplicate this filter and rename it as "scalemax", Go to the expressions of scale property. Adjust them into:
    seedRandom(n, timeless = true);
    scalemin =thisComp.layer("control").effect("scalemin")("Slider");
    scalemax =thisComp.layer("control").effect("scalemax")("Slider");
    temp=random(scalemin, scalemax);

    Now, we can adjust the scale of all the titles with this slider at any time. We can also adjust all other factors in the same way. In my project file, I made a lot of sliders to take control of many other factors.

  9. Random color
    Add text animation for the title, apply these expressions to fill color property:
    seedRandom(n, timeless = true);

    BTW, you can also add some other text animations for the titles.

  10. Orient along path
    In my case, I found an odd thing, that sometimes "orient along path" could work well. I think it might because there are some little jags along the path. Sometimes, the title, which should "orient along path", rotates like mad! So, I developed these expressions for orientation property:

    lookAt(position.valueAtTime(time), position.valueAtTime(time+1/25))

    BTW, if your "orient along path" worked well, these expressions are not necessary.

At last, after finishing all the steps above, we have only one thing to do: duplicate, duplicate, duplicate, duplicate, duplicate, duplicate, duplicate, duplicate………keep duplicating until you get enough titles. If there is anything you are unsatisfied with, just adjust the responsible sliders.

Here are my results:


Amazing animation

Nice? We at last go through so much trouble for this effect, but I think if we use these techniques for more animations, we can surely get more amazing animations.

Feel free to ask questions or make comments in the After Effects forum at CreativeCOW.

If you found this page from a direct link, please visit our forums or read other articles at

Related Articles / Tutorials:
Adobe After Effects
Adobe After Effects: Glitch Effects Without Using Plug-ins!

Adobe After Effects: Glitch Effects Without Using Plug-ins!

Join VFX guru Tobias Gleissenberger for a fun, high-energy look at how to create all sorts of digital noise, glitch, and other disturbing video effects with any version of Adobe After Effects, without using any plug-ins!

Tobias Gleissenberger
Adobe After Effects
Adobe After Effects Energy Ball

Adobe After Effects Energy Ball

In his latest high-energy Adobe After Effects tutorial, VFX guru Tobias Gleissenberger of Surfaced Studio combines a variety of effects to create the pulsating energy ball, composited with motion tracking, optical flares, and more.

Tobias Gleissenberger
Adobe After Effects
Stabilize 360 Video with Mocha VR

Stabilize 360 Video with Mocha VR

In this intermediate tutorial, Mocha Product Manager Martin Brennand takes you through smoothing the horizon in a Samsung Gear 360 shot using the Reorient Module in Mocha VR. Jittery 360 video footage can be made more watchable by stabilizing with Mocha’s planar tracking tools. The tutorial is done via the Adobe After Effects plug-in, but the techniques apply to all versions of Mocha VR.

Imagineer Systems
Adobe After Effects
Adobe After Effects April 2017 New Features

Adobe After Effects April 2017 New Features

The April 2017 release of Adobe After Effects (version 14.2) is packed with new features, and Tobias Gleissenberger of Surfaced Studio is here to show you the latest and greatest. Highlights include the Essential Graphics panel and Motion Graphics templates (with Adobe Premiere Pro integration), the addition of Lumetri Scopes and Color Correction effects, new effects organization, the Camera Shake Deblur filter and more.

Tobias Gleissenberger
Adobe After Effects
Adobe After Effects Advanced Title Tutorial

Adobe After Effects Advanced Title Tutorial

Learn how to create complex title animations in Adobe After Effects! In my last tutorial I covered how to create, customise and animate simple titles in Adobe Premiere Pro: In this tutorial we will take things one step further and create titles that are too complex to create with Premiere alone. We will be working with and customising presets, creating character by character animations and we will look at the power of custom Text Animators. Want to learn more about how to animate text? Check out the Adobe help page:

Tobias Gleissenberger
Adobe After Effects
Imagineer mocha Pro 5 Plug-In for Adobe: An In Depth Review

Imagineer mocha Pro 5 Plug-In for Adobe: An In Depth Review

Imagineer mocha Pro 5 Plug-in for Adobe brings all the amazing features of the professional version of the mocha Planar Tracker directly into After Effects and Premiere Pro in the form of a plugin. In this in-depth review, After Effects tutorial guru Tobias Gleissenberger of Surfaced Studio will show you what you can do with this new plug-in, and discuss what he likes and doesn't like about the new update.

Tobias Gleissenberger
Adobe After Effects
After Effects 2015.3 - My Favorite Features

After Effects 2015.3 - My Favorite Features

Learn why you should upgrade to After Effects CC 2015.3 - 13.8.1 - a close and detailed look at the latest release of After Effects (August 2016). Roei Tzoref will be focusing on his favorite features that set this release apart from previous versions: Performance, Queue in AME, Lumetri Color new features, and more.

Roei Tzoref
Adobe After Effects
Advanced Masking in Adobe After Effects

Advanced Masking in Adobe After Effects

Some of the coolest stuff you can do inside of Adobe After Effects is only possible once you unlock the power of masks. Join After Effects whiz Tobias Gleissenberger of Surfaced Studio to learn about mask animation and interpolation, using the variable width feathering tool, managing mask modes and ordering, and more.

Tobias Gleissenberger
Adobe After Effects
Fixing Common After Effects Problems and Mistakes

Fixing Common After Effects Problems and Mistakes

Got problems using Adobe After Effects? Exported files too large, Expressions not working, mixing shapes and makes, modes/switches, selecting previews for layers vs. comps - Surfaced Studio's Tobias Gleissenberger shows you fast fixes for these and more!

Tobias Gleissenberger
Adobe After Effects
mocha AE Planar Tracker for Absolute Beginners

mocha AE Planar Tracker for Absolute Beginners

Want to learn how to create advanced visual effects? Learn how to use mocha AE to track your shot and add advanced visual effects to live action footage inside Adobe After Effects. mocha can help you track shots that would be hard to track using traditional 2D point or feature trackers because it is a PLANAR TRACKER. A planar tracker uses planes and textures to track as opposed to points or groups of pixels. This allows the tracker to stay on track even if your shot contains motion blur or a very shallow depth of field. mocha AE comes included with Adobe After Effects and is available since CS3 and there is no reason for you not to use this awesome tool to make it easier for you to track your shot, replace screens or rotoscope!

Tobias Gleissenberger
© 2017 All Rights Reserved