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 CreativeCow.net.

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:

thisComp.layer("guide").position.valueAtTime(time)

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:
    when=time*timerate
    thisComp.layer("guide").position.valueAtTime(when)
    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:
    timerate=random(0.2,5)

  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:
    n=index;
    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:
    n=index;
    seedRandom(n, timeless = true);
    temp=random(min, max);
    [temp,temp,temp]

  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:

    looptime=thisComp.layer("guide").position.key(thisComp.layer("guide").position.numKeys).time;
    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:
    n=index;
    seedRandom(n, timeless = true); //make different layers have different seed
    myText = ["After Effects",
    "Encore DVD",
    "Photoshop",
    "Premiere Pro",
    "Final Cut Pro",
    "Motion",
    "Broadcast",
    "Commotion",
    "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:
    n=index;
    seedRandom(n, timeless = true);
    scalemin =thisComp.layer("control").effect("scalemin")("Slider");
    scalemax =thisComp.layer("control").effect("scalemax")("Slider");
    temp=random(scalemin, scalemax);
    [temp,temp,temp]

    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:
    n=index;
    seedRandom(n, timeless = true);
    r=random(0,1);
    g=random(0,1);
    b=random(0,1);
    [r,g,b,1]

    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:


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 CreativeCOW.net







Related Articles / Tutorials:
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.

Tutorial
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.

Tutorial
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.

Tutorial
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!

Tutorial
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!

Tutorial
Tobias Gleissenberger
Adobe After Effects
How to Make After Effects Faster with Proxies

How to Make After Effects Faster with Proxies

Learn how to make Adobe After Effects faster by using PROXIES! A proxy is a placeholder that stands in place for a very large video file or image sequence in your project. You can easily create proxies for the large source files that you are using and After Effects will automatically link them to the item in your project panel.

Tutorial
Tobias Gleissenberger
Adobe After Effects
Stabilize & Smooth: mocha 5 Plug-in for Adobe & Avid

Stabilize & Smooth: mocha 5 Plug-in for Adobe & Avid

Imagineer Systems and Boris FX product specialist Mary Poplin shows you how to stabilize with the new mocha Pro 5 plug-in inside of Avid Media Composer, Adobe Premiere Pro and After Effects. This tutorial covers artistic stabilization, such as smoothing out camera movements or stabilizing around moving objects, completely locking down shots, and automatically replacing edge fill on planar backgrounds.

Tutorial
Mary Poplin
Adobe After Effects
Adobe After Effects Puppet Tool

Adobe After Effects Puppet Tool

Become a puppet master by learning how to use the Puppet Tool in Adobe After Effects! This intermediate-level tutorial from After Effects guru Tobias will show you how the Puppet Tool allows you to add joints and animations to bring life to any static image!

Tutorial
Tobias Gleissenberger
Adobe After Effects
How to Spawn A Clone in Adobe After Effects

How to Spawn A Clone in Adobe After Effects

Want to learn how to create a cool clone spawn effect in Adobe After Effects? Follow along with After Effects whiz Tobias from Surfaced Studio in this exciting new visual effects tutorial that combines green screen using Keylight, CC Vector Blur, the Liquefy Effect, CC Particle World, and much more, delivered in Tobias' inimitable style!

Tutorial
Tobias Gleissenberger
Adobe After Effects
Creating A Flame on Your Finger with After Effects

Creating A Flame on Your Finger with After Effects

It is easy to do some motion tracking and attach a basic stock footage element of fire onto your hands, but there is a little bit of work involved if you actually want to make it look good. In this intermediate tutorial by After Effects expert Tobias, you'll see how to use a fire stock footage element to set your thumb on fire! There are lots of useful tricks for null objects, expressions, and more in this tutorial that will help you create all sorts of other cool visual effects -- or set even more things on fire!

Tutorial
Tobias Gleissenberger
MORE
© 2016 CreativeCOW.net All Rights Reserved
[TOP]