Activity › Forums › Adobe After Effects › letters to numbers morph?
-
letters to numbers morph?
Posted by 149047 on August 18, 2007 at 6:39 pmhi everyone!
i am trying to achive the following effect:
i there a way to make the letters of a word become numbers, with the “ordered?? chaos” effect (“geordnetes chaos” in german) activated at the same time. the order chaos effect would generate a random sequence of letters between start and end of the animation.
the effect would be a random sequence of letters from a given word, gradually turning into numbers.
ps: if yes, is it also possible to finish the animation on a specific (not random) number? so that eg: pear -> turns into 1324???
hoping for help
markus
Valerio Vecchi replied 12 years, 6 months ago 3 Members · 5 Replies -
5 Replies
-
Mike Clasby
August 18, 2007 at 9:19 pmIf one knew AE’s Text Animator well (which I definitely don’t) you should be able to do this that way, but, here’s an expression that does what you asked for.
OVERVIEW
Type in “1324” then add the expression and four markers to tell it when to switch expressions.First with the Text Tool, type in the numbers you want for the final result, you said… 1324.
Now twirl down the layer until you see Text, twirl that down to reveal “Source Text”. Put the following expression on source text. (to add an expression, Copy the expression, Alt-Click the Source Text Stopwatch, then Paste, then click outside the expression box)
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n–;
}
}switch (n) {
case 1:
“pear”//change this to change the initial word
break;case 2:
numRows = 1;
numChars = 4;
holdFrames = 5;seed = Math.floor(time/(holdFrames*thisComp.frameDuration));
seedRandom(seed,true);s = “”;
j = 0;
while(j < numRows){ k = 0; while (k < numChars){ c = Math.floor(random(65,91)); s += String.fromCharCode(c); k += 1; } s += "\r"; j += 1; } s s.toLowerCase() break; case 3: numRows = 1; numChars = 4; holdFrames = 5; seed = Math.floor(time/(holdFrames*thisComp.frameDuration)); seedRandom(seed,true); s = ""; j = 0; while(j < numRows){ k = 0; while (k < numChars){ c = Math.floor(random(48,57)); s += String.fromCharCode(c); k += 1; } s += "\r"; j += 1; } s break; default: value } Now you need to place some markers to make it work. Set a marker ( select the layer, then * on the numeric pad) at the beginning of the layer ("I" takes you to the inpoint). Now the text should say "pear". Change the "pear in line 11 of the expression to change the starting word. If you don't add a marker at the beginning, it will default to the original number you typed in, then switch to pear at the first marker, so put that marker at the beginning of the layer. Now go down the timeline and set a marker where you want pear to start into random letters, then set another marker later where you want them to switch to random numbers, then a final fourth marker where you want the "1324" (the number you typed in originally) to be the final number. CHANGES YOU CAN MAKE One thing you might want to change in the expressions is the number of holdFrames, that tells them how long to hold that random sequence of numbers or letters. Also if you wanted the random letters to be Capital letters, change line 35 from s.toLowerCase() to s.toUpperCase() If you want to change the word banana to 6 letters/numbers.You would also need to change the numChars = 4; to numChars = 6; and make the initial number you typed in 6 numbers. Also, just so you know, the c = Math.floor(random(65,91)); means random letters, a-z, and the c = Math.floor(random(48,57)); means random numbers, 1-9. This expression is a hack from several Dan expressions, the shell is from this: Re: multiple expressions on one track over time - How? https://forums.creativecow.net/readpost/227/7633And the text/number random grid from this:
https://library.creativecow.net/articles/ebberts_dan/ae6_exp.php
-
149047
August 19, 2007 at 8:00 amyikesmikes!!! you sure know what you’re talking about – that was just amazing. thank you so much for your time und patience. you guessed right: i am a complete AE newbie 🙂
i will go through your script now again in more detail – looking forward to the output –thanx
markus -
149047
August 21, 2007 at 9:26 pmone more question if i may 🙂
is there a chance to let each letter of the word individually switch through the alphabet randomly so the animation becomes a little more dynamic.thanx
markus
-
Mike Clasby
August 22, 2007 at 6:21 pm“…is there a chance to let each letter of the word individually switch through the alphabet randomly…”
I’m not sure what you mean. Do you mean you want one letter to run the cycle, then the next, etc. ?
If so, this should work.You need to put the expression on each of four text layers and change the expression, then move the markers so they stagger in the timeline.
So on the layer you have do this (You might want to do this in a duplicated comp or duplicated layer at the least so you don’t destroy what you already have):
1) Double click the text layer and change the highlighted text from ” 1324″ to just “1”, this will then be the first number in the end result 1324.
2) Change the “pear” in line 11 to just “p” as in p for pear.
3) In lines 16 and 41 change the “numChars = 4” to “numChars = 1”.
You should now have one character “p” that goes through that same cycle ending up at “1”.
Duplicate the layer (Ctrl D), then reposition (Shift-drag or arrow keys) it to the right of the first letter.
1) Double click the text and change the “1” to “3” to get that final 3 in the 1324 you wanted.
2) Change the “p” in line 11 to just “e” as in the e in pear.
Duplicate the text two more times and reposition them, then change the settings to make “a and r” morph to “2 and 4” same steps as above.
OK, this looks exactly like the setup we started with, what the … ????
Now in the layer “e/3”, the second layer you changed, leave the first marker at the beginning of the layer, but slide all of the other markers to the right of that last marker in the first layer (p-1 layer). Just drag them right. This should give you a “p that morph to a 1” in the first layer, followed by an “e that morphs to a 3 in the second layer. So the first layer finishes, before the second layers morphs, etc.
Is that what you want?
PS – I’m sure the grid stuff can be dropped from the expression but changing the numChars seemed easier. Also I really like the “holdFrames = 5” in lines 17 and 42 changed to 1 or 2, then they really rip through the sequence.
Chow.
-
Valerio Vecchi
November 8, 2013 at 12:17 pmHi
i got a problem with the expression.
AE tells me there is an error:—
After Effects warning: Expected: )
Expression disabled.Error occurred at line 25.
Comp: ‘frase iniziale’
Layer: 3 (‘Tutto è numero.’)
Property: ‘Source Text’
—How can i manage it?
Reply to this Discussion! Login or Sign Up